
Copying and Moving Databases
To use the Copy Database Wizard, you must specify the following:
-
The source server where the databases to be copied reside.
-
The destination server to which the databases are to be copied or moved.
-
The databases to be moved or copied.
-
The name of a target database, if different than the name of the source database.
The source database name can be use for the copied or moved database only if name conflicts do not exist on the destination server. If name conflicts exist, you must resolve them manually on the destination server before you can use the source database name there.
-
Other objects to be copied or moved; for example, logins, shared objects from the master database, jobs and maintenance plans, and user-defined error messages.
-
The schedule for the copy or move operation, if you want it to run at a later time.
-
If you are not a system administrator, you must specify a SQL Server Agent Proxy account that has access to the Integration Services (SSIS) Package execution subsystem.
The detach-and-attach method, detaches the database, moves or copies the database .mdf, .ndf, .ldf files and reattaches the database in the new location. For the detach-and-attach method, to avoid data loss or inconsistency, active sessions cannot be attached to the database being moved or copied. If any active sessions exist, the Copy Database Wizard does not execute the move or copy operation.
Note: |
|---|
|
For the SQL Server Management Object method, active sessions are allowed because the database is never taken offline.
|
When moving databases between different servers or disk drives, the Copy Database Wizard copies the database to the destination server and verifies that it is online. When moving databases between two instances on the same server, the file system move operation is performed.
Managing Metadata When Restoring to Another Server Instance