| Portal Home | Client Area | Announcements | Knowledgebase | Support Tickets | Downloads |
Knowledgebase
You are here: Portal Home > Knowledgebase > Data Bases > How to Detach a Database (SQL Server Management Studio)
How to Detach a Database (SQL Server Management Studio)
|
SQL Server 2005 Books Online (November 2008)
How to: Detach a Database (SQL Server Management Studio)
Updated: 5 December 2005 This topic describes how to detach a database that is currently not in use. Detaching a database removes it from the instance of the Microsoft SQL Server Database Engine but leaves intact the database, with its data files and transaction log files.
In SQL Server Management Studio Object Explorer, connect to the instance of the SQL Server Database Engine and then expand the instance. Expand Databases, and select the name of the user database you want to detach. Detaching a database requires exclusive access to the database. If the database is in use, restrict access to a single user: Right-click the database name, point to Tasks, and then click Detach. The Detach Database dialog box appears. The Databases to detach grid displays the name of the selected database in the Database Name column. Verify that this is the database you want to detach. By default, the detach operation retains any out-of-date optimization statistics when detaching the database; to update the existing optimization statistics, click the Update Statistics check box. By default, the detach operation keeps any full-text catalogs that are associated with the database. To remove them, clear the Keep Full-Text Catalogs check box. The Status column displays the current database state (either Ready or Not Ready). If the status is Not Ready, the Message column displays hyperlinked information about the database. When a database is involved with replication, the Message column displays To obtain more information about a message, click the hyperlink. When you are ready to detach the database, click OK. |
Powered by WHMCompleteSolution
Copyright © 2011 NavicoSoft , All rights reserved.