SQL Server 2008 Log shipping Detailed

Source: Internet
Author: User
Tags backup

One, what is log shipping?

The principle is simple, three actions six words: Backup-> replication-> recovery.

If a person completes this three action, it can only be called a log porter, and the SQL Server job completes automatically, called Log shipping. The same thing, not the same grade, so the name is not the same.

Second, log shipping can solve what problem?

Solve the problem of multiple server hot backup of database. Multiple server scheduled backups, ready to serve as a backup to the primary database server.

Iii. What are the advantages of log shipping?

Simple! is much simpler than database replication and mirroring in SQL Server.

Iv. What are the drawbacks of log shipping?

The transfer of log files only supports the way Windows file is shared and does not support FTP, just as courier companies only send local, do not send the field. All backup servers are in the same LAN, so the exact name should be called log local delivery.

V. How to send the log?

1. [Primary database server] The recovery mode of the database to which the log is to be sent must be complete (full)

2. [Primary database server] 1 times and only 1 full backups of the database to be transferred

BACKUP DATABASE [Cnblogsjob]  to DISK = N ' F:\FullBackup\CNBlogsJob.bak ' with Noformat, INIT,  
NAME = N ' cnblogsjob-full Database Backup ', SKIP, Norewind, Nounload, COMPRESSION,  STATS = ten
Go

3. [Backup Database server] Copy full backup files to the backup database server and restore in a standby manner


from DISK = N ' F:\FullBackup\CNBlogsJob.bak ' with FILE = 1,
Move N ' cnblogsjob ' to n ' D:\Data\CNBlogsJob.mdf ',
Move N ' Cnblogsjob_log ' to n ' E:\Logs\CNBlogsJob.LDF ',
STANDBY = N ' F:\Standby\ROLLBACK_UNDO_CNBlogsJob.BAK ', nounload, STATS = 10

After successful recovery, the status shown in the following illustration appears in the SQL Server Administration tool:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.