Available with Standard or Advanced license.
To move a geodatabase from one database server to another, you can detach it from the database server; copy the database file (the .mdf file) over the network or onto transfer media, such as a thumb drive; and paste it onto the destination server. Once there, you can attach the geodatabase to the second database server.
Some examples of situations when you might do this include the following:
- If you use the data from the geodatabase on a database server on your desktop computer, but want to take the geodatabase into the field to collect data, you could detach the geodatabase from the database server on your desktop computer, transfer the database file to your laptop, and attach the geodatabase to the database server on your laptop.
- When ownership of a geodatabase is transferred, such as when an employee leaves the company, you could move the geodatabase from the database server on the former employee's computer, copy it to the new owner's computer, and attach it to a database server there.
- When you hire consultants to collect or create datasets for you, you can request they deliver the data in a geodatabase in SQL Server Express. Then, when they send you the files, you can attach them to your database server.
When sharing geodatabases across database servers, be aware of who owns the data and has permission to work with it. This is important because geodatabases on database servers use Windows-authenticated logins. When you transfer the geodatabase to a new computer, local Windows logins from the old computer won't exist on the new computer. Similarly, if you use network logins and transfer the geodatabase to a database server outside the network, those logins will not exist.
How you deal with this depends on your workflow. If you know ahead of time that you are going move the geodatabase around a lot, you might want to create all the data in the geodatabase while logged in as the dbo user. The dbo user and schema are always present in database servers; therefore, even if you move the geodatabase to a database server on a different network, you can still log in as dbo, add new users to the database server, and grant them permissions to the data.
If you hadn't anticipated having to move the geodatabase and the data owners don't exist on the destination database server, you could still log in as the dbo user and perform one of the following set of steps:
- Add new users to the destination database server.
- Grant read/write or higher-level access to the geodatabase to the users to whom you want to transfer ownership of the data. Granting these permissions at the geodatabase level allows the users to access all the data in the geodatabase.
- Ask the users to log in to the geodatabase and either copy the data to a new geodatabase to which they also have read/write access or copy and paste the data in place, giving the pasted datasets and columns new names.
Or:
- Create a second geodatabase on the destination database server.
- Copy the data to the new geodatabase.
- Add new users to the destination database server.
- Grant these users access to the datasets.
Detach a geodatabase
Suppose you want to move the buildings08 geodatabase from the database server on your personal computer (PC) to a database server on your laptop so you can take it into the field and collect traffic data there. You could use geodatabase replication to replicate the data to a geodatabase in a database server on your laptop, or you could detach the geodatabase from the database server on your PC, move it to your laptop's hard drive, and attach it to the database server there.
To detach the buildings geodatabase from the database server, do the following:
- Log in to the computer with your own Windows login.
- Start ArcCatalog.
- Expand the Database Servers node in the Catalog tree and connect to the database server. However, do not connect to the buildings08 geodatabase.
- Right-click the buildings08 geodatabase, point to Administration, then click Detach.
- When the Confirm Detach dialog box appears, take note of the location of the database file; you will need to know where it is so you can copy it to another location or perhaps reattach the database in the future.
- Click Yes on the Confirm Detach dialog box.
You could now open Windows Explorer, navigate to the location of the buildings08.mdf, then copy it to media or over the network to transfer it to another computer.
For instructions on attaching the geodatabase, see Exercise 3.
You detached a geodatabase from the database server to allow you to move it to another database server.