Migrating a log shipping configuration by using failover involves keeping the primary server instance at the original version of SQL Server temporarily, while upgrading the secondary server instance. Upgrading a server instance upgrades only online databases. Offline databases, such as a log shipping secondary database, remain in the original version of SQL Server. As long as a database remains offline, log backups from the original version of SQL Server are restorable.
For purposes of clarity, this procedure refers to the SQL Server 2000 log shipping primary server instance as Server A and the SQL Server 2000 log shipping secondary server instance as Server B. This configuration is represented in the following illustration, which shows a primary server instance, A, and a single secondary server instance, B.
.gif)
-
Upgrade the secondary server instance, Server B, to SQL Server 2008. When you upgrade Server B, the log shipping database remains a SQL Server 2000 database because it is offline. This database is upgraded in the next step. The SQL Server 2000 log shipping jobs that copy and restore log files will no longer function.
Note: |
|---|
|
At this point, users can continue to access the primary database on Server A.
|
-
Fail over from the primary server instance, Server A, to the secondary server instance, Server B.
-
To fail over, restore all unapplied transaction log backups from the primary database on server A to server B.
-
Manually back up the tail of the transaction log on the primary database specifying WITH NORECOVERY. This log backup captures any log records that have not been backed up yet and takes the database offline.
The following example backs up the tail of the log of the AdventureWorks database on the primary server. The backup file is named Failover_AW_20080315.trn:
BACKUP LOG AdventureWorks
TO DISK = N'\\FileServer\LogShipping\AdventureWorks\Failover_AW_20080315.trn'
WITH NORECOVERY;
GO
-
Bring the secondary database on server B online by restoring the transaction log tail WITH RECOVERY.
The failover process brings your secondary database online, after which it is automatically upgraded to a SQL Server 2008 database. The database upgrade process is fully logged.
Note: |
|---|
|
After being upgraded, the log shipping database on Server B is available to users. Until SQL Server 2008 log shipping is configured on Server B, however, log backups from the database on Server B are not being taken.
|
-
Upgrade Server A to SQL Server 2008. The log shipping database temporarily remains a SQL Server 2000 database because it is offline.
-
On Server B, configure SQL Server 2008 log shipping with Server B as the primary server and Server A as the secondary server. After you begin shipping transaction logs to Server A, the log shipping database on Server A is upgraded to a SQL Server 2008 database when the first log backup is applied.
Important: |
|---|
|
When you configure log shipping on Server B, be sure to specify the No, the secondary database is initialized option on the Initialize Secondary Database tab of the Secondary Database Settings dialog box. For more information, see How to: Enable Log Shipping (SQL Server Management Studio).
|
-
Optionally, if you want to make Server A your primary server again, fail over to Server A. For more information, see Changing Roles Between Primary and Secondary Servers.