Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to disable and enable log shipping if the SQL server has to be shutdown due to power maintenance?

Posted on 2014-10-08
11
1,105 Views
Last Modified: 2014-10-10
Hello there,

How to disable and enable log shipping if the SQL server has to be shutdown due to power maintenance? without having to repeat the whole process.

Thanks and Regards
0
Comment
Question by:goprasad
  • 6
  • 5
11 Comments
 
LVL 48

Expert Comment

by:Vitor Montalvão
ID: 40368157
To stop just right-click on the primary database, then chose log shipping options and uncheck the Enabled option for the secondary server.

For resume, right-click on the primary database, then chose log shipping options and check the Enabled option for the secondary server.

What this does is to Enable or Disable the Restore job on the secondary server, so you can do it directly on the job in the secondary server if you want.
0
 

Author Comment

by:goprasad
ID: 40369545
By doing this way, I will need to backup, copy and restore DB to enable log shipping.

I am sure there is another way to temporarily disable log shipping jobs and then enable it when the server comes online, without having to repeat backup, copy and restore operation.
0
 
LVL 48

Expert Comment

by:Vitor Montalvão
ID: 40370093
By doing this way, I will need to backup, copy and restore DB to enable log shipping.
I don't think so. This way you are only stopping the copy and restore of transaction log backups. And when you enable it again it will start to copy and restore the tlog backups from where it stopped.
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 

Author Comment

by:goprasad
ID: 40372576
The easiest way I thought was to stop and start LS_Backup, LS_Copy and LS_Restore SQL agent jobs for the respective Log Shipped DB's.

Please advise, if this works.
0
 

Author Comment

by:goprasad
ID: 40372581
Sorry I meant Disable and Enable LS LS_Backup jobs in Primary server and then  LS_Copy and LS_Restore jobs in Secondary server?
0
 
LVL 48

Expert Comment

by:Vitor Montalvão
ID: 40372589
If you don't want to do it from the log shipping options I already told you that you can do:
What this does is to Enable or Disable the Restore job on the secondary server, so you can do it directly on the job in the secondary server if you want.
If you aren't comfortable with this option then you can disable as much jobs you want but only the Restore job stops and starts the log shipping.
0
 

Author Comment

by:goprasad
ID: 40372689
Since the Secondary server will be shutdown for maintenance and then restarted, I was planning to just disable copy and restore jobs in Secondary server.
As primary server is in different site  and not affected, I will not disable backup jobs here, Then the  question arise, when I enable copy and restore jobs after 24 hours in Secondary server, will it then restore the backlogs first?

Please advise.
0
 
LVL 48

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 40372697
The log shipping It gonna restart from the point where was stopped. Simple as that. Will copy and restore only the files that it missed since it was stopped.
0
 

Author Comment

by:goprasad
ID: 40372703
Thank you so much. As this is the first time, I need to confirm if my following understanding is correct:
So in that case, just disable Copy and restore jobs in Secondary server and leave the backup job intact in Primary server.
As and when Secondary server comes online after power maintenance, I will enable it, and Log shipping should start from where it left.
0
 
LVL 48

Expert Comment

by:Vitor Montalvão
ID: 40372707
As and when Secondary server comes online after power maintenance, I will enable it, and Log shipping should start from where it left.
Exactly. You got it :)
0
 

Author Closing Comment

by:goprasad
ID: 40372720
Brilliant support.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Access SQL Server instance by NONE-admin Windows user 12 27
Location of Dynamics AX Service accounts in SQL 3 15
TSQL XML Namespaces 7 21
Are triggers slow? 7 10
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question