ArcGIS Server Banner

Detaching and attaching a geodatabase on a database server

Detaching and attaching a geodatabase on a database server

Release 9.3 E-mail This TopicPrintable VersionGive Us feedback

About detaching and attaching geodatabases on a database server

ArcSDE geodatabases for SQL Server Express (ArcSDE database servers) can be moved from one database server to another. This is done by detaching the geodatabase from one database server, moving the data file to the new server, then attaching the geodatabase.

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

You will find the database file (.mdf) for the database in the directory in which you initially created the geodatabase. For example, if you create a new geodatabase in the folder C:\MyData, that is the directory in which you would find the database to copy it for transport. It is also where you would find the database file if you decide to reattach it to your database server. 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, you will only use the database file (.mdf file); the log file (.ldf file) will be re-created.

Attaching a geodatabase registers the data file with the SQL Server Express instance. The geodatabase will be added to the server and will appear in the Catalog tree.

You must be a database server administrator to detach or attach a geodatabase from or to the database server.

How to

Detach a geodatabase

  1. In ArcCatalog, connect to the database server from which you want to detach the geodatabase.
  2. Right-click the geodatabase you want to detach.
  3. Click Detach.
  4. Click OK to confirm you want to detach the geodatabase.

Tips

  • You must be a database server administrator to detach a geodatabase from a database server.
  • When you transport the geodatabase to another database server, only copy over the .mdf file; a new .ldf file will be created on attach.
  • If you have a full-text catalog you want to transfer with the database, copy it over as well.

Attach a geodatabase

  1. In the Catalog tree, right-click the database server to which you want to attach the geodatabase.
  2. Click Attach.
  3. On the Attach Geodatabase dialog box, browse to the file name of the geodatabase data file you are attaching.
  4. Click OK.

Tips

  • You must be a database server administrator to attach a geodatabase to a database server.
  • You must be a Windows administrator on the machine where SQL Server Express is installed to attach a geodatabase.
  • It is not recommended that you attach an ArcSDE geodatabase for SQL Server created through an ArcGIS Server Enterprise license to a database server. There are a number of requirements that must be met for this to work, making the process prone to error. The recommended method for moving an ArcSDE geodatabase licensed through ArcGIS Server Enterprise to an ArcSDE geodatabase for SQL Server is to use geodatabase replication.
  • However, if you must do it, the following are the criteria that must be met before you attempt to attach an ArcSDE geodatabase for SQL Server to an ArcSDE for SQL Server Express instance.

    • The geodatabase must have a dbo-schema.
    • The geodatabase must be in a SQL Server 2005 database.
    • The database must be set to use Windows-authenticated logins only and all the data in the geodatabase must be owned by Windows logins.
    • The database must be smaller than 4 GB.
    • You must add to the database server all the users who own data in the ArcSDE for SQL Server database. If you do not, those users will not be able to access their data. Also, functionality that can only be performed as the user of the dataset will not be available. This includes registering or unregistering a dataset as versioned, adding data to a feature dataset, and altering the schema of a dataset.
    • The attach must be performed through ArcCatalog or ArcObjects code, not through Management Studio or Transact-SQL.

See Also

  • An overview of scaling and moving a geodatabase