Detaching a geodatabase from a database server

Detaching a geodatabase removes all references to the geodatabase from the database server, but it does not delete the data file (.mdf). Once detached, the SQL Server Express data file can be transported and attached to another SQL Server Express instance.

The .mdf file and the full-text catalog for the database are in the directory in which you initially created the geodatabase. For example, if you create a geodatabase in the folder C:\MyData, that is the directory in which you would find the data and full-text catalog files.

When transferring a geodatabase to another server, you do not need to copy the .ldf file; a new one is created on attach. However, you must copy the full-text catalog with the database. For SQL Server 2005 Express, the full-text catalog is a folder with the same name as the database followed by "_CAT". For SQL Server 2008 Express, the full-text catalog is in the .ndf file. For the full-text catalog to transfer properly, the database server to which you move the geodatabase must also be set up to use SQL Server Full-Text Search.


If you forget or do not know where the geodatabase was stored when it was created, you can go to the Geodatabase Properties dialog box. (Do this before detaching the geodatabase.) The location of the database is shown in the General area on the Administration tab. When attaching a geodatabase, specify the .mdf file.

  1. Log in as a server administrator, start ArcMap, then open the Catalog window.
  2. Double-click the database server from which you want to detach the geodatabase.
  3. On the Catalog Content tab, right-click the geodatabase and click Detach.
  4. CautionCaution:

    Be sure to right-click the geodatabase on the Content tab, not the Catalog tree. Clicking the geodatabase in the Catalog tree immediately connects you to the geodatabase. You cannot detach the geodatabase if there are any connections being made to it; therefore, the detach operation fails if you connect to the geodatabase.

  5. Take note of the file location, then click OK to confirm that you want to detach the geodatabase.

Related Topics