Restart log shipping when out of sync
up vote
3
down vote
favorite
The scenario is. A database secondary server are for different reason out of sync or is suspected that is not sync. Someone has made the secondary databases online by mistake or other mishaps. If you now want to make sure that they are set back on track. How do you do that? Preferably swiftly and for many databases at once.
When you set up a log shipping between two servers using the guide it takes care of the initial backup and copying of backup file and then the initial restore.
If I have to redo that I have to unable/enble and redo the loghipping and fill all the parameters again. Is there an other way? Can I use sqllogship application?
I there a "C:Program FilesMicrosoft SQL Server100ToolsBinnsqllogship.exe
" -Restart -server SQLServPROD2
Or is there something that could be done easily with powershell and SQL Server Management Objects - SMO?
I want to use all the parameters that are already in tables like log_shipping_secondary
.
I have not found any scripts for doing this. I looked at the generated script when I used the guide but that does not contain the inital backup and copy. I can write my own script. I am just afraid someone will say: Why did you not just run: $smoLogShipping.Redo
sql-server powershell smo failover
add a comment |
up vote
3
down vote
favorite
The scenario is. A database secondary server are for different reason out of sync or is suspected that is not sync. Someone has made the secondary databases online by mistake or other mishaps. If you now want to make sure that they are set back on track. How do you do that? Preferably swiftly and for many databases at once.
When you set up a log shipping between two servers using the guide it takes care of the initial backup and copying of backup file and then the initial restore.
If I have to redo that I have to unable/enble and redo the loghipping and fill all the parameters again. Is there an other way? Can I use sqllogship application?
I there a "C:Program FilesMicrosoft SQL Server100ToolsBinnsqllogship.exe
" -Restart -server SQLServPROD2
Or is there something that could be done easily with powershell and SQL Server Management Objects - SMO?
I want to use all the parameters that are already in tables like log_shipping_secondary
.
I have not found any scripts for doing this. I looked at the generated script when I used the guide but that does not contain the inital backup and copy. I can write my own script. I am just afraid someone will say: Why did you not just run: $smoLogShipping.Redo
sql-server powershell smo failover
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
The scenario is. A database secondary server are for different reason out of sync or is suspected that is not sync. Someone has made the secondary databases online by mistake or other mishaps. If you now want to make sure that they are set back on track. How do you do that? Preferably swiftly and for many databases at once.
When you set up a log shipping between two servers using the guide it takes care of the initial backup and copying of backup file and then the initial restore.
If I have to redo that I have to unable/enble and redo the loghipping and fill all the parameters again. Is there an other way? Can I use sqllogship application?
I there a "C:Program FilesMicrosoft SQL Server100ToolsBinnsqllogship.exe
" -Restart -server SQLServPROD2
Or is there something that could be done easily with powershell and SQL Server Management Objects - SMO?
I want to use all the parameters that are already in tables like log_shipping_secondary
.
I have not found any scripts for doing this. I looked at the generated script when I used the guide but that does not contain the inital backup and copy. I can write my own script. I am just afraid someone will say: Why did you not just run: $smoLogShipping.Redo
sql-server powershell smo failover
The scenario is. A database secondary server are for different reason out of sync or is suspected that is not sync. Someone has made the secondary databases online by mistake or other mishaps. If you now want to make sure that they are set back on track. How do you do that? Preferably swiftly and for many databases at once.
When you set up a log shipping between two servers using the guide it takes care of the initial backup and copying of backup file and then the initial restore.
If I have to redo that I have to unable/enble and redo the loghipping and fill all the parameters again. Is there an other way? Can I use sqllogship application?
I there a "C:Program FilesMicrosoft SQL Server100ToolsBinnsqllogship.exe
" -Restart -server SQLServPROD2
Or is there something that could be done easily with powershell and SQL Server Management Objects - SMO?
I want to use all the parameters that are already in tables like log_shipping_secondary
.
I have not found any scripts for doing this. I looked at the generated script when I used the guide but that does not contain the inital backup and copy. I can write my own script. I am just afraid someone will say: Why did you not just run: $smoLogShipping.Redo
sql-server powershell smo failover
sql-server powershell smo failover
edited Nov 16 '11 at 21:16
Soner Gönül
79.4k26147270
79.4k26147270
asked Apr 14 '11 at 15:18
Patrik Lindström
70031016
70031016
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
If you bring a standby database on-line (i.e.) restore it with_recovery then this will break the log-shipping. The only way to re-establish log shipping is to restore the standby database from a full backup of the source again and use no_recovery / standby mode.
>The only way to re-establish log shipping is to restore the standby database from a full backup.
– Patrik Lindström
May 22 '11 at 14:29
>The only way to re-establish log shipping is to restore the standby database from a full backup. Yes I have understood that. I wondered if there was a feature to do these steps automatically. Since all the information about logshipping is stored in log_shipping_secondary.
– Patrik Lindström
May 22 '11 at 14:34
add a comment |
up vote
0
down vote
I do not know of any community supported script to do what you ask but it can be scripted easy enough. The GUI can handle most of the process, you would then just need to tweak it be parameterized and customized to the work flow that you are after. The link below gives an example of what I'm talking about.
Scripting Log Shipping Automation
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
If you bring a standby database on-line (i.e.) restore it with_recovery then this will break the log-shipping. The only way to re-establish log shipping is to restore the standby database from a full backup of the source again and use no_recovery / standby mode.
>The only way to re-establish log shipping is to restore the standby database from a full backup.
– Patrik Lindström
May 22 '11 at 14:29
>The only way to re-establish log shipping is to restore the standby database from a full backup. Yes I have understood that. I wondered if there was a feature to do these steps automatically. Since all the information about logshipping is stored in log_shipping_secondary.
– Patrik Lindström
May 22 '11 at 14:34
add a comment |
up vote
0
down vote
If you bring a standby database on-line (i.e.) restore it with_recovery then this will break the log-shipping. The only way to re-establish log shipping is to restore the standby database from a full backup of the source again and use no_recovery / standby mode.
>The only way to re-establish log shipping is to restore the standby database from a full backup.
– Patrik Lindström
May 22 '11 at 14:29
>The only way to re-establish log shipping is to restore the standby database from a full backup. Yes I have understood that. I wondered if there was a feature to do these steps automatically. Since all the information about logshipping is stored in log_shipping_secondary.
– Patrik Lindström
May 22 '11 at 14:34
add a comment |
up vote
0
down vote
up vote
0
down vote
If you bring a standby database on-line (i.e.) restore it with_recovery then this will break the log-shipping. The only way to re-establish log shipping is to restore the standby database from a full backup of the source again and use no_recovery / standby mode.
If you bring a standby database on-line (i.e.) restore it with_recovery then this will break the log-shipping. The only way to re-establish log shipping is to restore the standby database from a full backup of the source again and use no_recovery / standby mode.
answered May 20 '11 at 12:37
Wes Price
173412
173412
>The only way to re-establish log shipping is to restore the standby database from a full backup.
– Patrik Lindström
May 22 '11 at 14:29
>The only way to re-establish log shipping is to restore the standby database from a full backup. Yes I have understood that. I wondered if there was a feature to do these steps automatically. Since all the information about logshipping is stored in log_shipping_secondary.
– Patrik Lindström
May 22 '11 at 14:34
add a comment |
>The only way to re-establish log shipping is to restore the standby database from a full backup.
– Patrik Lindström
May 22 '11 at 14:29
>The only way to re-establish log shipping is to restore the standby database from a full backup. Yes I have understood that. I wondered if there was a feature to do these steps automatically. Since all the information about logshipping is stored in log_shipping_secondary.
– Patrik Lindström
May 22 '11 at 14:34
>The only way to re-establish log shipping is to restore the standby database from a full backup.
– Patrik Lindström
May 22 '11 at 14:29
>The only way to re-establish log shipping is to restore the standby database from a full backup.
– Patrik Lindström
May 22 '11 at 14:29
>The only way to re-establish log shipping is to restore the standby database from a full backup. Yes I have understood that. I wondered if there was a feature to do these steps automatically. Since all the information about logshipping is stored in log_shipping_secondary.
– Patrik Lindström
May 22 '11 at 14:34
>The only way to re-establish log shipping is to restore the standby database from a full backup. Yes I have understood that. I wondered if there was a feature to do these steps automatically. Since all the information about logshipping is stored in log_shipping_secondary.
– Patrik Lindström
May 22 '11 at 14:34
add a comment |
up vote
0
down vote
I do not know of any community supported script to do what you ask but it can be scripted easy enough. The GUI can handle most of the process, you would then just need to tweak it be parameterized and customized to the work flow that you are after. The link below gives an example of what I'm talking about.
Scripting Log Shipping Automation
add a comment |
up vote
0
down vote
I do not know of any community supported script to do what you ask but it can be scripted easy enough. The GUI can handle most of the process, you would then just need to tweak it be parameterized and customized to the work flow that you are after. The link below gives an example of what I'm talking about.
Scripting Log Shipping Automation
add a comment |
up vote
0
down vote
up vote
0
down vote
I do not know of any community supported script to do what you ask but it can be scripted easy enough. The GUI can handle most of the process, you would then just need to tweak it be parameterized and customized to the work flow that you are after. The link below gives an example of what I'm talking about.
Scripting Log Shipping Automation
I do not know of any community supported script to do what you ask but it can be scripted easy enough. The GUI can handle most of the process, you would then just need to tweak it be parameterized and customized to the work flow that you are after. The link below gives an example of what I'm talking about.
Scripting Log Shipping Automation
edited May 23 '17 at 12:02
Community♦
11
11
answered Feb 10 '15 at 2:11
SQL Hammer
196211
196211
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f5665490%2frestart-log-shipping-when-out-of-sync%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown