HP StorageWorks Storage Mirroring application notes (T5437-96014, December 2009)

-- environments or configurations are exactly the same, you MUST modify
-- this file in order to make the solution work in your environment.
EXEC sp_detach_db 'Sales', true
EXEC sp_detach_db 'Accounting', true
EXEC sp_detach_db 'Marketing', true
Disconnect clients and verify that queues are empty
1. When you are ready to perform the migration, disconnect any clients that may be accessing the
source databases. Stop any applications that may access the SQL data on the source, including
any of the application's services.
NOTE:
If you want to confirm that any application-related data in the tempdb database is flushed to the
appropriate user-created database, shut down the source SQL server. For more information
about using tempdb, see the Microsoft TechNet article "Working with tempdb in SQL Server
2005", available from http://technet.microsoft.com/en-us/library/cc966545.aspx.
2. Verify that all data has been sent to the target before continuing. You may use Performance
Monitor (Perfmon) on the source server to check for any queued Storage Mirroring data. See
the HP StorageWorks Storage Mirroring Users Guide for information on using Performance
Monitor to monitor the source queue.
NOTE:
The Storage Mirroring source queue MUST be empty before proceeding.
3. Using the Storage Mirroring Replication Console, double-click on the source server in the left
pane to log in. In the right pane, right-click on the connection(s) between the source and target
servers and select Disconnect.
Attach the target databases
Attaching the replicated databases to the target SQL 2008 server is best accomplished using a
combination of a SQL command file (.sql) and a batch file to call sqlcmd, using the command file
for input.
The attach procedure will upgrade the SQL 2005 databases to SQL 2008 databases during the
attach process.
NOTE:
Verify that all data has been written to the target before continuing. You may use Perfmon on the target
server to check for any queued Storage Mirroring data. See the
HP StorageWorks Storage Mirroring Users
Guide
for information on using Performance Monitor to monitor the target queues. The Storage Mirroring
target queues MUST be empty before proceeding.
10