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: