VIII.2.3. Moving Databases

This next section takes you on a tour of the different options at your disposal for moving databases and their associated information. To begin, you see how to detach and then reattach a database. The next step helps you understand how to copy a database between SQL Server instances. Finally, you get the hang of importing and exporting data while also understanding when to ship transaction logs to different servers.

Figure VIII.2-7. Shrinking files in the SQL Server Management Studio.

As with many of SQL Server's administrative options, it's a good idea to familiarize yourself with these tasks by using a test or sample database. After you've mastered these techniques, you'll be in great shape to try them on live data.

NOTE

All the operations described in this section can be launched from the SQL Server Management Studio database's Tasks menu. See the beginning of this chapter if you don't remember how to access this menu.

VIII.2.3.1. Detaching databases

SQL Server offers a number of helpful mechanisms to move information between different locations. These locations can be on the same computer, on different computers in the same building, or even halfway around the world. One of the easiest ways to pick up and copy an entire database with a minimal ...

Get Microsoft® SQL Server™ 2008 All-In-One Desk Reference For Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.