Summary
When you need to move a database, backing up and restoring may not necessarily be the first or best option. Choose the right transfer method based on network proximity of the servers and the objects and data to be moved. Some key points to remember follow:
- Use the Detach/Attach method to quickly and easily move or copy a database from one server to another.
- If you cannot afford to detach a database, use the good old Backup/Restore method to copy a database from one server to another.
- The Copy Database Wizard is useful for copying or moving one or more databases from one server to another on the same network.
- To copy only a few tables from one server to another or copy data to and from any data source for which a managed .NET Framework data provider or a native OLE DB provider is available, use the Import and Export Wizard.
- Use Management Studio to quickly generate scripts to distribute database schemas, security, jobs, and limited data.
- Use Data-Tier Applications (DAC) to quickly encapsulate database projects for easy deployment and upgrades. Use DACPAC to encapsulate both schema and data, if your database objects are supported.