SlideShare ist ein Scribd-Unternehmen logo
1 von 34
SQL Server Log Shipping
By
Zeba Tabassum
Agenda
• High Availability Options
• Log shipping
• Recovery Option
• Role Change
• Requirement
• Demo
• Log Shipping Jobs
• Permissions
• Monitor Server
• Benefits
• Drawbacks
• Combining log shipping and mirroring
• Combining log shipping and replication
High Availability Options
• At a high level, there are five main high availability options including a new
feature set to be release with SQL Server 2012:
• Log Shipping
• Mirroring
• Replication
• Clustering
• AlwaysON
Log Shipping
Replication
Mirroring
Log Shipping
Definition
Log shipping is the process of automating the backup of database and
transaction log files on a production SQL server, and then restoring them onto
a standby server. The key feature of log shipping is that it will automatically
backup transaction logs throughout the day (for whatever interval you
specify) and automatically restore them on the standby server. This in effect
keeps the two SQL Servers Databases in “synch”.
Log Shipping
Log Shipping
Log Shipping
Log Shipping
• Log shipping consists of two servers:
– The primary server in a log shipping configuration has the primary
database you want to back up and restore on another server.
– The secondary server hosts the database that maintains a copy of
your primary database; and, of course, it is common that a server can
maintain and host multiple copies of primary databases coming from
multiple servers.
Recovery Option
• The last step in configuring log shipping is to configure the recovery mode
on the Restore Transaction Log tab of the Secondary Database Setting
dialog box.
• For this recovery option, you have two options:
– No Recovery Mode
– Standby Mode
Role Change
To perform a role change from the primary server to the secondary server,
you need to perform an initial role change to be able to make future role
changes. You can do this by following these steps:
1. Manually fail over from the primary server to the secondary server.
2. Disable the log shipping backup jobs on the initial primary server.
3. Configure log shipping on the secondary server (using the wizard).
Minimum Requirements
• SQL Server 2005 or later.
• Standard, Workgroup or Enterprise editions must be installed on all server
instances involved in log shipping.
• The servers involved in log shipping should have the same case sensitivity
settings.
• The database must use the full recovery or bulk-logged recovery model.
• Shared folders for transaction log files,copying T-Log backup files.
• SQL Server Agent Service must be configured properly.
Additional Requirements
• We should use the same version of SQL Server on both ends.
• It is possible to Log Ship from SQL 2005 to SQL 2008, but you can not do it
the opposite way.
• Log Shipping can be used for failover only if you have the same versions of
sql server on each end.
Demo
Demo
Demo
Log Shipping Jobs
• Internally when Log Shipping is configured, there are 4 jobs created
between Primary Server and Secondary Server, they are Backup Job, Copy
Job, Restore Job and Alert Job
• Backup job: This job is created on Primary Server; this job takes the
transaction log backup of the Database on a scheduled time
• Copy Job: This job is created on Secondary Server, this job Copies the
transaction log Backup from Primary Server to the Standby/Secondary
Server.
• Restore Job: This job is created on Secondary Server; this job restored
the copied transaction log backup on the Secondary Server.
Permissions on Shared folders
• For the backup job, read/write permissions to the backup directory are
required to the following account: SQL Server service account on the
primary server instance.Proxy account of the backup job. By default, this is
the SQL Server Agent account on the primary server instance.
• For the copy job, read permissions to the backup directory and write
permissions to the copy directory are required by the proxy account of the
copy job. By default, this is the SQL Server Agent account on the
secondary server instance.
• For the restore job, read/write permission to the copy directory are
required by the following: The SQL Server service account on the
secondary server instance. The proxy account of the restore job. By
default, this is the SQL Server Agent account on the secondary server
instance.
Monitor Server
An optional instance of SQL Server that tracks all of the details of log
shipping, including:
• When the transaction log on the primary database was last backed up.
• When the secondary servers last copied and restored the backup files.
• Information about any backup failure alerts.
Benefits Of Log shipping
• Log shipping doesn’t require expensive hardware or software. While it is
great if your standby server is similar in capacity to your production server,
it is not a requirement.
• Once log shipping has been implemented, it is relatively easy to maintain.
• Assuming you have implemented log shipping correctly, it is very reliable.
• The manual failover process is generally very short, typically 15 minutes or
less.
• Implementing log shipping is not technically difficult.
Drawbacks of Log Shipping
• Log shipping failover is not automatic. The DBA must still manually failover
the server, which means the DBA must be present when the failover
occurs.
• The users will experience some downtime. How long depends on how well
you implemented log shipping, the nature of the production server failure,
your network, the standby server, and the application or applications to be
failed over.
• Some data can be lost, although not always. How much data is lost
depends on how often you schedule log shipping and whether or not the
transaction log on the failed production server is recoverable.
Drawbacks of Log Shipping
• The database or databases that are being failed over to the standby server
cannot be used for anything else. But databases on the standby server not
being used for failover can still be used normally.
• When it comes time for the actual failover, you must do one of two things
to make your applications work: either rename the standby server the
same name as the failed production server (and the IP address), or re-
point your user’s applications to the new standby server. In some cases,
neither of these options is practical.
Combining Log Shipping & Mirroring
Combining Log shipping and
Replication
Sql server logshipping

Weitere ähnliche Inhalte

Was ist angesagt?

Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuning
Simon Huang
 

Was ist angesagt? (20)

Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability
 
Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기
 
What is new in MariaDB 10.6?
What is new in MariaDB 10.6?What is new in MariaDB 10.6?
What is new in MariaDB 10.6?
 
Oracle Performance Tools of the Trade
Oracle Performance Tools of the TradeOracle Performance Tools of the Trade
Oracle Performance Tools of the Trade
 
InnoDB Performance Optimisation
InnoDB Performance OptimisationInnoDB Performance Optimisation
InnoDB Performance Optimisation
 
Mirroring in SQL Server 2012 R2
Mirroring in SQL Server 2012 R2Mirroring in SQL Server 2012 R2
Mirroring in SQL Server 2012 R2
 
MySQL Atchitecture and Concepts
MySQL Atchitecture and ConceptsMySQL Atchitecture and Concepts
MySQL Atchitecture and Concepts
 
SqlDay 2018 - Brief introduction into SQL Server Execution Plans
SqlDay 2018 - Brief introduction into SQL Server Execution PlansSqlDay 2018 - Brief introduction into SQL Server Execution Plans
SqlDay 2018 - Brief introduction into SQL Server Execution Plans
 
Redo log improvements MYSQL 8.0
Redo log improvements MYSQL 8.0Redo log improvements MYSQL 8.0
Redo log improvements MYSQL 8.0
 
MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바
 
mysql 8.0 architecture and enhancement
mysql 8.0 architecture and enhancementmysql 8.0 architecture and enhancement
mysql 8.0 architecture and enhancement
 
PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs
 
AWR and ASH Deep Dive
AWR and ASH Deep DiveAWR and ASH Deep Dive
AWR and ASH Deep Dive
 
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera ) Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
 
New Generation Oracle RAC Performance
New Generation Oracle RAC PerformanceNew Generation Oracle RAC Performance
New Generation Oracle RAC Performance
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuning
 
Handling Schema Changes Using pt-online-schema change.
Handling Schema Changes Using pt-online-schema change.Handling Schema Changes Using pt-online-schema change.
Handling Schema Changes Using pt-online-schema change.
 
SQL Server Clustering Part1
SQL Server Clustering Part1SQL Server Clustering Part1
SQL Server Clustering Part1
 
Survey of some free Tools to enhance your SQL Tuning and Performance Diagnost...
Survey of some free Tools to enhance your SQL Tuning and Performance Diagnost...Survey of some free Tools to enhance your SQL Tuning and Performance Diagnost...
Survey of some free Tools to enhance your SQL Tuning and Performance Diagnost...
 
Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.
 

Ähnlich wie Sql server logshipping

Log shippingbestpractices
Log shippingbestpracticesLog shippingbestpractices
Log shippingbestpractices
Antilamps
 
Business_Continuity_Planning_with_SQL_Server_HADR_options_TechEd_Bangalore_20...
Business_Continuity_Planning_with_SQL_Server_HADR_options_TechEd_Bangalore_20...Business_Continuity_Planning_with_SQL_Server_HADR_options_TechEd_Bangalore_20...
Business_Continuity_Planning_with_SQL_Server_HADR_options_TechEd_Bangalore_20...
LarryZaman
 
Effective Usage of SQL Server 2005 Database Mirroring
Effective Usage of SQL Server 2005 Database MirroringEffective Usage of SQL Server 2005 Database Mirroring
Effective Usage of SQL Server 2005 Database Mirroring
webhostingguy
 
Scott Schnoll - Exchange server 2013 virtualization best practices
Scott Schnoll - Exchange server 2013 virtualization best practicesScott Schnoll - Exchange server 2013 virtualization best practices
Scott Schnoll - Exchange server 2013 virtualization best practices
Nordic Infrastructure Conference
 

Ähnlich wie Sql server logshipping (20)

Sql disaster recovery
Sql disaster recoverySql disaster recovery
Sql disaster recovery
 
Database Management System - 2a
Database Management System - 2aDatabase Management System - 2a
Database Management System - 2a
 
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018 Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
 
Log shippingbestpractices
Log shippingbestpracticesLog shippingbestpractices
Log shippingbestpractices
 
MSSQL Server - Automation
MSSQL Server - AutomationMSSQL Server - Automation
MSSQL Server - Automation
 
Business_Continuity_Planning_with_SQL_Server_HADR_options_TechEd_Bangalore_20...
Business_Continuity_Planning_with_SQL_Server_HADR_options_TechEd_Bangalore_20...Business_Continuity_Planning_with_SQL_Server_HADR_options_TechEd_Bangalore_20...
Business_Continuity_Planning_with_SQL_Server_HADR_options_TechEd_Bangalore_20...
 
Conquer Reporting by Scaling Out SQL Server
Conquer Reporting by Scaling Out SQL ServerConquer Reporting by Scaling Out SQL Server
Conquer Reporting by Scaling Out SQL Server
 
Divide & Conquer Reporting By Scaling Out with Replication
Divide & Conquer Reporting By Scaling Out with ReplicationDivide & Conquer Reporting By Scaling Out with Replication
Divide & Conquer Reporting By Scaling Out with Replication
 
Exchange Server 2013 : les mécanismes de haute disponibilité et la redondance...
Exchange Server 2013 : les mécanismes de haute disponibilité et la redondance...Exchange Server 2013 : les mécanismes de haute disponibilité et la redondance...
Exchange Server 2013 : les mécanismes de haute disponibilité et la redondance...
 
Effective Usage of SQL Server 2005 Database Mirroring
Effective Usage of SQL Server 2005 Database MirroringEffective Usage of SQL Server 2005 Database Mirroring
Effective Usage of SQL Server 2005 Database Mirroring
 
Unit 2 oracle9i
Unit 2  oracle9i Unit 2  oracle9i
Unit 2 oracle9i
 
Oracle SOA Suite 12.2.1 new features
Oracle SOA Suite 12.2.1 new featuresOracle SOA Suite 12.2.1 new features
Oracle SOA Suite 12.2.1 new features
 
Optimizing Proxy Server Performance
Optimizing Proxy Server PerformanceOptimizing Proxy Server Performance
Optimizing Proxy Server Performance
 
Case Study For Replication For PCMS
Case Study For Replication For PCMSCase Study For Replication For PCMS
Case Study For Replication For PCMS
 
Backup And Recovery
Backup And RecoveryBackup And Recovery
Backup And Recovery
 
Sql server 2019 New Features by Yevhen Nedaskivskyi
Sql server 2019 New Features by Yevhen NedaskivskyiSql server 2019 New Features by Yevhen Nedaskivskyi
Sql server 2019 New Features by Yevhen Nedaskivskyi
 
Scott Schnoll - Exchange server 2013 virtualization best practices
Scott Schnoll - Exchange server 2013 virtualization best practicesScott Schnoll - Exchange server 2013 virtualization best practices
Scott Schnoll - Exchange server 2013 virtualization best practices
 
Migrate from Oracle to Aurora PostgreSQL: Best Practices, Design Patterns, & ...
Migrate from Oracle to Aurora PostgreSQL: Best Practices, Design Patterns, & ...Migrate from Oracle to Aurora PostgreSQL: Best Practices, Design Patterns, & ...
Migrate from Oracle to Aurora PostgreSQL: Best Practices, Design Patterns, & ...
 
Weblogic 101 for dba
Weblogic  101 for dbaWeblogic  101 for dba
Weblogic 101 for dba
 
Failover-Apachecon-Asia-2022.pptx
Failover-Apachecon-Asia-2022.pptxFailover-Apachecon-Asia-2022.pptx
Failover-Apachecon-Asia-2022.pptx
 

Kürzlich hochgeladen

CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
Lars Albertsson
 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
shivangimorya083
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
amitlee9823
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
amitlee9823
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
amitlee9823
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 

Kürzlich hochgeladen (20)

CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptx
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 

Sql server logshipping

  • 1. SQL Server Log Shipping By Zeba Tabassum
  • 2. Agenda • High Availability Options • Log shipping • Recovery Option • Role Change • Requirement • Demo • Log Shipping Jobs • Permissions • Monitor Server • Benefits • Drawbacks • Combining log shipping and mirroring • Combining log shipping and replication
  • 3. High Availability Options • At a high level, there are five main high availability options including a new feature set to be release with SQL Server 2012: • Log Shipping • Mirroring • Replication • Clustering • AlwaysON
  • 7. Log Shipping Definition Log shipping is the process of automating the backup of database and transaction log files on a production SQL server, and then restoring them onto a standby server. The key feature of log shipping is that it will automatically backup transaction logs throughout the day (for whatever interval you specify) and automatically restore them on the standby server. This in effect keeps the two SQL Servers Databases in “synch”.
  • 11. Log Shipping • Log shipping consists of two servers: – The primary server in a log shipping configuration has the primary database you want to back up and restore on another server. – The secondary server hosts the database that maintains a copy of your primary database; and, of course, it is common that a server can maintain and host multiple copies of primary databases coming from multiple servers.
  • 12. Recovery Option • The last step in configuring log shipping is to configure the recovery mode on the Restore Transaction Log tab of the Secondary Database Setting dialog box. • For this recovery option, you have two options: – No Recovery Mode – Standby Mode
  • 13. Role Change To perform a role change from the primary server to the secondary server, you need to perform an initial role change to be able to make future role changes. You can do this by following these steps: 1. Manually fail over from the primary server to the secondary server. 2. Disable the log shipping backup jobs on the initial primary server. 3. Configure log shipping on the secondary server (using the wizard).
  • 14. Minimum Requirements • SQL Server 2005 or later. • Standard, Workgroup or Enterprise editions must be installed on all server instances involved in log shipping. • The servers involved in log shipping should have the same case sensitivity settings. • The database must use the full recovery or bulk-logged recovery model. • Shared folders for transaction log files,copying T-Log backup files. • SQL Server Agent Service must be configured properly.
  • 15. Additional Requirements • We should use the same version of SQL Server on both ends. • It is possible to Log Ship from SQL 2005 to SQL 2008, but you can not do it the opposite way. • Log Shipping can be used for failover only if you have the same versions of sql server on each end.
  • 16. Demo
  • 17. Demo
  • 18.
  • 19. Demo
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. Log Shipping Jobs • Internally when Log Shipping is configured, there are 4 jobs created between Primary Server and Secondary Server, they are Backup Job, Copy Job, Restore Job and Alert Job • Backup job: This job is created on Primary Server; this job takes the transaction log backup of the Database on a scheduled time • Copy Job: This job is created on Secondary Server, this job Copies the transaction log Backup from Primary Server to the Standby/Secondary Server. • Restore Job: This job is created on Secondary Server; this job restored the copied transaction log backup on the Secondary Server.
  • 27. Permissions on Shared folders • For the backup job, read/write permissions to the backup directory are required to the following account: SQL Server service account on the primary server instance.Proxy account of the backup job. By default, this is the SQL Server Agent account on the primary server instance. • For the copy job, read permissions to the backup directory and write permissions to the copy directory are required by the proxy account of the copy job. By default, this is the SQL Server Agent account on the secondary server instance. • For the restore job, read/write permission to the copy directory are required by the following: The SQL Server service account on the secondary server instance. The proxy account of the restore job. By default, this is the SQL Server Agent account on the secondary server instance.
  • 28. Monitor Server An optional instance of SQL Server that tracks all of the details of log shipping, including: • When the transaction log on the primary database was last backed up. • When the secondary servers last copied and restored the backup files. • Information about any backup failure alerts.
  • 29. Benefits Of Log shipping • Log shipping doesn’t require expensive hardware or software. While it is great if your standby server is similar in capacity to your production server, it is not a requirement. • Once log shipping has been implemented, it is relatively easy to maintain. • Assuming you have implemented log shipping correctly, it is very reliable. • The manual failover process is generally very short, typically 15 minutes or less. • Implementing log shipping is not technically difficult.
  • 30. Drawbacks of Log Shipping • Log shipping failover is not automatic. The DBA must still manually failover the server, which means the DBA must be present when the failover occurs. • The users will experience some downtime. How long depends on how well you implemented log shipping, the nature of the production server failure, your network, the standby server, and the application or applications to be failed over. • Some data can be lost, although not always. How much data is lost depends on how often you schedule log shipping and whether or not the transaction log on the failed production server is recoverable.
  • 31. Drawbacks of Log Shipping • The database or databases that are being failed over to the standby server cannot be used for anything else. But databases on the standby server not being used for failover can still be used normally. • When it comes time for the actual failover, you must do one of two things to make your applications work: either rename the standby server the same name as the failed production server (and the IP address), or re- point your user’s applications to the new standby server. In some cases, neither of these options is practical.
  • 32. Combining Log Shipping & Mirroring
  • 33. Combining Log shipping and Replication