Improving The Performance of Servers by Implementing The Manual Log Shipping For Large Databases
Improving The Performance of Servers by Implementing The Manual Log Shipping For Large Databases
Improving The Performance of Servers by Implementing The Manual Log Shipping For Large Databases
net/publication/299384815
CITATIONS READS
0 482
4 authors, including:
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Vinit Kumar Lohan on 23 March 2016.
IJCSMS
www.ijcsms.com
42
IJCSMS International Journal of Computer Science & Management Studies, Vol. 12, Issue 02, April
2012 ISSN (Online): 2231 –5268
www.ijcsms.com
3. Each secondary server instance runs its own restore A SQL Server Agent job that performs the backup
job to restore the log backup from the local destination operation, logs history to the local server and the monitor
folder onto the local secondary database. server, and deletes old backup files and history information.
The primary and secondary server instances send their own When log shipping is enabled, the job category "Log
history and status to the monitor server instance. Shipping Backup" is created on the primary server instance.
Log shipping is an Automated Process for backing up, A SQL Server Agent job that copies the backup files from
restoring, copying the transaction logs and the primary server to a configurable destination on the
synchronizing the database for distributed database secondary server and logs history on the secondary server
and the monitor server. When log shipping is enabled on a
server application which can improve the application
database, the job category "Log Shipping Copy" is created
performance and availability of database. on each secondary server in a log shipping configuration.
IJCSMS
www.ijcsms.com
43
IJCSMS International Journal of Computer Science & Management Studies, Vol. 12, Issue 02, April
2012 ISSN (Online): 2231 –5268
www.ijcsms.com
This topic discusses considerations for combining log
shipping and database mirroring.
The principal database in a mirroring session can also act as
the primary database in a log shipping configuration, or vice
versa, as the log shipping backup share is intact. The
database mirroring session run in any operating mode,
whether synchronous (with transaction safety set to FULL)
or asynchronous (with transaction safety set to OFF).
Typically, when combining log shipping and database
mirroring, the mirroring session is established before log
shipping, although this is not required. Then the current
principal database is configured as the log shipping primary
(the principal/primary database), along with one or more
remote secondary databases. Also, the mirror database must
be configured as a log shipping primary (the mirror/primary
database). The log shipping secondary databases should be
on different server instances than either the
Fig. 1 Sequential Log Shipping principal/primary server or mirror/primary server.
IJCSMS
www.ijcsms.com
44
IJCSMS International Journal of Computer Science & Management Studies, Vol. 12, Issue 02, April
2012 ISSN (Online): 2231 –5268
www.ijcsms.com
When log shipping uses with a remote monitoring instance, 2. Set up database mirroring. For more information, see
combining the log shipping session and database mirroring Establish a Database Mirroring Session Using
affects the information in the monitor tables. The Windows Authentication (SQL Server Management
information about the primary is a combination of the one Studio) or Setting up Database Mirroring (SQL Server).
configured at the principal/primary and the monitor
configured on each secondary. 3. Restore backups of the principal/primary database to
To keep monitoring as seamless as possible, when you use a other server instances to be later used as log shipping
remote monitor, we recommend that you specify the original secondary databases for the primary database.
primary name when configuring the primary at the 4. Set up log shipping on the principal database as the
secondary. This approach also facilitates changing the log primary database for one or more secondary databases.
shipping configuration from Microsoft SQL Server Agent. You should set up a single share as the backup directory (a
backup share). This ensures that after role switching
IJCSMS
www.ijcsms.com
45
IJCSMS International Journal of Computer Science & Management Studies, Vol. 12, Issue 02, April
2012 ISSN (Online): 2231 –5268
www.ijcsms.com
between the principal and mirror servers, backup jobs server B was taken at 4:45 a.m., all transactions that
continue to write to the same directory as before. A best occurred between 4:45 a.m. and 5 a.m. are lost forever.
practice is to ensure that this share is located on a different • Some manual DBA work is required to bring the
physical server from the servers hosting the databases standby server online, as discussed in this article.
involved in mirroring and log shipping. • Log shipping setup cannot be scripted. This means that
5. Manually failover from the principal to the mirror. you cannot mimic the production environment for
To perform a manual failover: testing purposes without going through the wizard
• Manually Fail Over a Database Mirroring Session screens.
(SQL Server Management Studio) • The Enterprise edition of SQL Server 2000 is required
• Manually Fail Over a Database Mirroring Session on primary and standby servers. If you run any other
(Transact-SQL) version/edition of SQL Server, you're out of luck. The
6. Set up log shipping on the new principal (previously Developer edition can be used to learn how to set up
mirror) as the primary database. log shipping, but it cannot be used in a production
7. You must use the same backup share that you used in environment. Note however, that log shipping is merely
step 4. an automated way of copying transaction log backups,
8. The Transaction Log Shipping interface in SQL Server so a savvy DBA can easily set up jobs to
Management Studio supports only one primary accomplish the same functionality.
database per log shipping configuration. Therefore, you Difficult troubleshooting Log shipping usually works very
must use stored procedures to set up the new principal well, but if there are problems, they're difficult to
as primary. troubleshoot—documentation is sparse and typically not
9. Perform another manual failover to fail back to the helpful for solving a particular problem. Fortunately
original principal. Microsoft's Knowledge Base articles have good information
for troubleshooting log-shipping issues.
4. Advantage Each database that needs to be log-shipped must be set up
through a separate maintenance plan.
Unfortunately, log shipping does have a few issues that the [3] High Availability with SQL Server 2008
DBA should be aware of prior to relying on this method of
failover: [4] Beginning SQL Joes 2 Pros: The SQL Hands-On Guide
• Possible data loss when the primary server fails. If the for Beginners (SQL Exam Prep Series 70-433 Volume 1
primary server becomes completely unusable, of 5) (Sql Design Series) by Rick A Morelan
transactions that occurred after the last transaction log
backup that was copied to the standby server are lost. [5] Microsoft SQL Server 2008 Reporting Services by
For example, suppose that server A fails at 5 a.m. and Brian Larson
you cannot get to it at all. If the last backup copied to
IJCSMS
www.ijcsms.com