Attach Database

SQL Server Enterprise Manager Help

SQL Server Enterprise Manager Help

Attach Database

Use this dialog box to view or specify the following options.

Options

MDF file of database to attach

Specify the name of the MDF (master data file) of the database to attach. There can be up to 16 file names specified. Microsoft® SQL Server™ cannot attach a database if more than 16 files are specified. For more information about attaching databases, see sp_attach_db.

Click the browse (...) button to search for the MDF of the database to attach.

Verify

Verify that the specified MDF is correct.

Original File Name(s)

View all files in the database to attach. This includes data files and log files.

Current File(s) Location

View or edit all current file names and paths. The current location of the MDF file must be in the column for the attach to work, and if SQL Server cannot find the files in the specified location, the attach fails. For example, if you have changed the default location of the file before you detached it, you must specify the current location for the attach to be successful.

Attach as:

Specify the name for the database you are attaching. The database name cannot match any existing database names.

Specify database owner

Specify the database owner.

See Also

How to attach and detach a database (Enterprise Manager)