disaster recovery with sql server
DESCRIPTION
TRANSCRIPT
![Page 1: Disaster recovery with sql server](https://reader036.vdocument.in/reader036/viewer/2022081209/553a9f114a7959fe7f8b45a5/html5/thumbnails/1.jpg)
Disaster Recovery in SQL Server
Rajib Kunduhttp://www.Citagus.com
![Page 2: Disaster recovery with sql server](https://reader036.vdocument.in/reader036/viewer/2022081209/553a9f114a7959fe7f8b45a5/html5/thumbnails/2.jpg)
Agenda
DefinitionsFailover ClusterDatabase SnapshotsLog shippingDatabase Mirroring
![Page 3: Disaster recovery with sql server](https://reader036.vdocument.in/reader036/viewer/2022081209/553a9f114a7959fe7f8b45a5/html5/thumbnails/3.jpg)
Definitions
“Disaster recovery planning is the work that is devoted to preparing all the actions that must occur in response to a disaster. The planning includes the selection of a strategy to help recover valuable data. The selection of the appropriate disaster recovery strategy depends on your business requirements.”
![Page 4: Disaster recovery with sql server](https://reader036.vdocument.in/reader036/viewer/2022081209/553a9f114a7959fe7f8b45a5/html5/thumbnails/4.jpg)
Disaster Recovery Comparisons
![Page 5: Disaster recovery with sql server](https://reader036.vdocument.in/reader036/viewer/2022081209/553a9f114a7959fe7f8b45a5/html5/thumbnails/5.jpg)
Prepare a DRP documentInclude every possible information:
System architecture (How the system/application works)How many systems are involved and what their names are.Their IP Addresses, drive information, file locationsSoftware installed, Contact information of DBA’s, or other key people.Know your SLAs and choose appropriate technology.
![Page 6: Disaster recovery with sql server](https://reader036.vdocument.in/reader036/viewer/2022081209/553a9f114a7959fe7f8b45a5/html5/thumbnails/6.jpg)
Prepare a DRP document(cont.)
Include every possible information…Step by step guide on how to recover each of your system based on different disaster scenarios (Including timelines for recovery)Security information, jobs/schedule information, etc.Make it a reminder for self that any system changes should be updated in this guide.Test, test and test!!!
![Page 7: Disaster recovery with sql server](https://reader036.vdocument.in/reader036/viewer/2022081209/553a9f114a7959fe7f8b45a5/html5/thumbnails/7.jpg)
Failover Clustering
![Page 8: Disaster recovery with sql server](https://reader036.vdocument.in/reader036/viewer/2022081209/553a9f114a7959fe7f8b45a5/html5/thumbnails/8.jpg)
Log Shipping
An automated method of maintaining a warm standby serverBased on SQL Server's backup and restore architecture. Uses the transaction log to track changesRelatively low-tech and inexpensive‘Ships' (copies and restores) a production server's transaction logs to a standby server
![Page 9: Disaster recovery with sql server](https://reader036.vdocument.in/reader036/viewer/2022081209/553a9f114a7959fe7f8b45a5/html5/thumbnails/9.jpg)
Log Shipping (Key terms)
Primary Server: Contains your primary database. SQL Server Agent makes periodic transaction log backups to capture changes.
Secondary ServerContain an unrecovered copy of the production database.One standby server can contain standby databases from multiple primary servers.
![Page 10: Disaster recovery with sql server](https://reader036.vdocument.in/reader036/viewer/2022081209/553a9f114a7959fe7f8b45a5/html5/thumbnails/10.jpg)
Log Shipping (Key terms) cont…
Monitor Server (Optional) Monitors the status of the log-shipping jobs on the primary and each standby server.One monitoring server can monitor multiple primary-standby server pairs. Should use a server other than the primary or the standby to detect problems on either server.
![Page 11: Disaster recovery with sql server](https://reader036.vdocument.in/reader036/viewer/2022081209/553a9f114a7959fe7f8b45a5/html5/thumbnails/11.jpg)
Log Shipping
![Page 12: Disaster recovery with sql server](https://reader036.vdocument.in/reader036/viewer/2022081209/553a9f114a7959fe7f8b45a5/html5/thumbnails/12.jpg)
Database MirroringNewly introduced with SQL Server 2005.Maintains a copy of the principal database as a mirror.Transfers log records from principal to mirror server instance.Works with all hardware that supports SQL Server 2005.Automatic client redirection (using .NET 2.0)Can have a third optional server called Witness server for Auto Failover.
![Page 13: Disaster recovery with sql server](https://reader036.vdocument.in/reader036/viewer/2022081209/553a9f114a7959fe7f8b45a5/html5/thumbnails/13.jpg)
Database Mirroring -Synchronous
Commit
Write to local log
Transmit to mirror
Write to remote log
Log
Acknowledge
Committed in log
Constantly redoing on mirror
Acknowledge
DBDB Log
1
2
2
3
4
5
6
7
![Page 14: Disaster recovery with sql server](https://reader036.vdocument.in/reader036/viewer/2022081209/553a9f114a7959fe7f8b45a5/html5/thumbnails/14.jpg)
Database Mirroring Enhancements
Enhancements in SQL 2008Compression of stream data for which at least a 12.5 percent compression ratio can be achieved.Automatic Recovery from Corrupted Pages.Page read-ahead during the undo phase.Improved use of log send buffers.
![Page 15: Disaster recovery with sql server](https://reader036.vdocument.in/reader036/viewer/2022081209/553a9f114a7959fe7f8b45a5/html5/thumbnails/15.jpg)
General Recommendations
Backup your system databases after modifications.Test if backups are restorable.Practice / Test your disaster recovery plans.Documentation is not only for you.Keep dedicated DR Server ready.Use BACKUP CHECKSUM features.Run DBCC CHECKDB regularly.Don’t ignore any runtime errors.