Setup Custom Log Shipping in SQL Server
When it comes to Disaster Recovery Setup, every DBA has its own preference. I personally prefer Log Shipping since it involves very little effort to setup. Log shipping has many benefits as stated below:-
- Multiple Secondary copies with different delay and uses
- Can be used as Disaster Recovery Technique
- Can be used for Limited Reporting Workload
- Can be used to migrate data to a new location with minimum downtime
- SQL Server Upgrade
- No additional load on Primary instance
- Works well in combination with other HADR features like Mirroring, AlwaysOn, Clustering etc.
But, like in my current organization, if you use Domain Account for SQL Services, then Log Shipping using Custom scripts could be established in much easier way than the default log shipping method. For this purpose, I have created by own Log Shipping procedure [dbo].[usp_DBAApplyTLogs]. Code for this procedure can be found at my github repository SQLDBA-SSMS-Solution. Below is the url:-
For more information on how to setup Log Shipping using above script, Watch below video:-
Friends! Please feel free to connect with me using comments. If you like the article, do Like & Share. Happy Coding 🙂
Hey Ajay love the script was just what I needed to do LS with out access to the primary. One thing I was wondering is there a way to include a delete after the trn files have been applied?