Presentation is loading. Please wait.

Presentation is loading. Please wait.

It is one of the techniques to create a stand by server. Introduced in SQL 2000,enhanced in 2005. It is a High Availability as well as Disaster recovery.

Similar presentations


Presentation on theme: "It is one of the techniques to create a stand by server. Introduced in SQL 2000,enhanced in 2005. It is a High Availability as well as Disaster recovery."— Presentation transcript:

1 It is one of the techniques to create a stand by server. Introduced in SQL 2000,enhanced in 2005. It is a High Availability as well as Disaster recovery solution. Basic idea The idea is to backup & restore the database and transaction logs from Primary server to Secondary server.

2 Log shipping allows you to automatically send transaction log backups from a primary database on a primary server instance to one or more secondary databases on separate secondary server instances. The transaction log backups are applied to each of the secondary databases individually. An optional third server instance, known as the monitor server, records the history and status of backup and restore operations and, optionally, raises alerts if these operations fail to occur as scheduled.

3 3 instances to configure Log shipping 1)Primary 2)Secondary/Standby 3)Monitor Log Shipping Jobs 1)Backup Job (Name-Log Shipping Backup)- created on the primary server instance. It performs the backup operation, logs history to the local server and the monitor server, and deletes old backup files and history information. By default, this job will run every 15 minutes, but the interval is customizable.

4 2)Copy Job (name-Log Shipping Copy)-created on each secondary server instance. This job copies the backup files from the primary server to a configurable destination on the secondary server and logs history on the secondary server and the monitor server. 3)Restore Job(Name-Log Shipping Restore)-created on the secondary server instance. This job restores the copied backup files to the secondary databases. 4)Alert Job (Name-Log Shipping Alert)-If a monitor server is used, an alert job is created on the monitor server instance

5 1)Backup the t-Log at the primary server instance 2)Copy the T-log file to the Secondary server Instance 3)Restore the log backup on the secondary server Instance.

6 1)Both source and target instances of log shipping must be running SQL Server 2005 or 2008 Enterprise Edition, Workgroup Edition or Standard Edition 2)Account(s) running SQL Server service on source and destination instance must have access to the network folder where you will store transaction log backup files. 3)Computers hosting primary and standby SQL Servers must be connected to a network. 4)SQL Server Agent service must be running on both source and destination servers. Log shipping is implemented as a collection of jobs. If SQL Server Agent service isn't running, none of the jobs will execute. Log shipping must be setup at the database level. The database must use either full or bulk logged recovery model. Simple recovery model truncates transaction log during each checkpoint and does not support transaction log backups. Therefore databases that use simple recovery model cannot participate in log shipping 5)It is a good idea to ensure that the Standby server has the same Hardware Configuration as the Primary Server

7 6. The servers involved in log shipping should have the same case sensitivity settings. * Read/Write permission required --->For SQL service account of Primary for the tran log backup to be successful * Read/Write permission required --->For SQL Agent account of Secondary for the copy job to be successful * Read/Write permission required --->For SQL Service Account of Secondary for the restore job to be successful

8 Imp Points:1)Standby recovery mode: partial availabilty of database. It completes analysis, Redo but undo files are saved in TUF Format. 2) The log can be shipped to multiple secondary server instances. In such cases, operations Copy and Restore jobs are duplicated for each secondary server instance. 3) A log shipping configuration does not automatically fail over from the primary server to the secondary server. If the primary database becomes unavailable, any of the secondary databases can be brought online manually 4) You can use a secondary database for reporting purposes. 5)Transaction log shipping status: Right click the servername of primary- reports-standard reports-transaction log shipping status.

9 Manual Failover. 2 Scenarios 1)Machine Fails (Instance unavailable)-There would not be any new backups,so there is nothing to copy. Disable the copy Job. Disable the restore job. Go to Alert Monitor. Check which is the last trn file that was restored. If in the Copy Folder you have any.trn file that has not been restored yet, then restore this file with recovery. 2) Database corrupted (Instance Available): Disable Back up job. Take tail backup in the primary server. Move it to a network folder. Disable copy & restore Jobs. Restore manually.

10 backup log AdventureWorksLT to disk ='D:\SqlBack\adtail.trn‘ How to restore tailback up. restore database AdventureWorksLT from disk = 'D:\SqlBack\adtail.trn' with recovery How to remove Logshipping DatabaseName-rightclick-properties-uncheck the enable option.All Jobs get deleted Automatically.


Download ppt "It is one of the techniques to create a stand by server. Introduced in SQL 2000,enhanced in 2005. It is a High Availability as well as Disaster recovery."

Similar presentations


Ads by Google