Detach Database (General Page)
Use this page to detach a user database.
To use SQL Server Management Studio to detach a database
Note
When you detach a database by using SQL Server Management Studio, you can generate the corresponding Transact-SQL sp_detach_db script by clicking the Script button and then selecting a destination for the script.
Options
- Databases to detach
Lists the databases to detach.
- Database Name
Displays the name of the database to be detached.
Drop Connections
Disconnect connections to the specified database.Note
You cannot detach a database with active connections.
- Update Statistics
Update out-of-date optimization statistics before detaching the database.
- Keep Full-Text Catalogs
Retains any full-text catalogs that are associated with the database.
- Status
Displays one of the following states: Ready or Not ready.
Message
The Message column may display information about the database, as follows:- When a database is involved with replication, the Status is Not ready and the Message column displays Database replicated.
- When a database has one or more active connections, the Status is Not ready and the Message column displays *<number_of_active_connections>*Active connection(s) — for example: 1 Active connection(s). Before you can detach the database, you need to disconnect any active connections by selecting Drop Connections.
To obtain more information about a message, click the hyperlinked text to open Activity Monitor.
See Also
Other Resources
How to: Move a Database Using Detach and Attach (Transact-SQL)
How to: Upgrade a Database Using Detach and Attach (Transact-SQL)
sp_detach_db (Transact-SQL)
Detaching and Attaching Databases