Enabling log shipping involves the following basic steps:
-
Choose servers for your primary server, secondary server, and optional monitor server.
Note: |
|---|
|
The SQL Server on-disk storage format is the same in the 64-bit and 32-bit environments. Therefore, a log shipping configuration can combine server instances that run in a 32-bit environment and server instances that run in a 64-bit environment. |
-
SQL Server 2008 Enterprise and later versions support backup compression. When creating a log shipping configuration, you can control the backup compression behavior of log backups. For more information, see Backup Compression (SQL Server).
-
Create a file share for the transaction log backups, preferably on a fault-tolerant server that is not part of the log shipping configuration. To maximize availability of the primary server, Microsoft recommends as a best practice that you put the backup share on a separate host computer.
-
Choose a backup schedule for the primary database.
-
Create a folder for each secondary server into which the transaction log backup files will be copied. These folders are usually located on the secondary servers.
-
Configure one or more secondary databases.
-
Optionally configure a monitor server.
When enabling the secondary server for log shipping, you can choose the following options on the Management Studio log shipping Secondary Database Settings dialog box to set up the secondary database:
-
Automatically create a backup of the primary database and restore it to the secondary server, creating the secondary database if necessary.
-
Restore a pre-existing backup of the primary database to the secondary server, creating the secondary database if necessary.
You can also initialize the secondary database by restoring a database backup manually.
Important: |
|---|
|
The Management Studio log shipping tool is intended to handle only simple cases of backup and restore. For complex cases, such as a database that uses many files or nondefault options, you must back up and restore the full database manually. In general, use manual backup and restore for any case that requires a complex BACKUP or RESTORE command. After the secondary database has been restored, use the Management Studio log shipping tool to finish setting up log shipping. |
For more information about these Transact-SQL statements, see BACKUP (Transact-SQL) and RESTORE (Transact-SQL).
When you enable the primary server for log shipping, you can specify how often transaction log backups are created on the primary server. If the volume of transactions is high, it may be useful to back up the transaction log frequently to minimize the potential loss of data.