␡
- Creating the Database
- Defining Database Options
- The Transaction Log
- Attaching to an Existing Database
- Summary
- Q&A
- Workshop
- Activities
This chapter is from the book
Attaching to an Existing Database
There are times when someone will provide you with a database that you want to work with on your own server. To work with an existing database, all you have to do is attach to it. Here’s the process:
Right-click the Databases node and select Attach. The Attach Databases dialog box appears (see Figure 3.7).
FIGURE 3.7 The Attach Databases dialog box enables you to attach to existing .mdf database files.
Click Add. The Locate Database Files dialog box appears (see Figure 3.8).
FIGURE 3.8 The Locate Database Files dialog box enables you to select the database to which you want to attach.
- Locate and select the .mdf to which you want to attach.
- Click OK to close the Locate Database Files dialog box.
- Click OK to close the Attach Databases dialog box. The database appears in the list of user databases under the Databases node of SQL Server Management Studio.