ArcGIS Server Banner

Using multiple geodatabases in SQL Server

Using multiple geodatabases in SQL Server

Release 9.3 E-mail This TopicPrintable VersionGive Us feedback
To store spatial data in an ArcSDE geodatabase, a collection of tables, stored procedures, views, and functions (collectively known as the ArcSDE repository) must be present. The collection of user-defined data and related ArcSDE repository forms a geodatabase. At ArcSDE 9 and above, two different data storage models are supported for SQL Server: multiple and single spatial database models. Prior to ArcSDE 9, only the multiple spatial database model was available. Though still supported, the multiple spatial database model has been deprecated. See the section, The SQL Server multiple spatial database model if you want to see a discussion of this geodatabase storage model.

For ArcSDE geodatabases at 9 or later, you should store the ArcSDE system tables and related user-defined data in one database. That means each database stores a single geodatabase and all related data must reside in that same database. This is the recommended model to use and how the geodatabase is implemented in most other database management systems (DBMS). It is also the model that is used for ArcSDE geodatabases for SQL Server Express.

Multiple single database model geodatabases

If you want to create more than one geodatabase in the same SQL Server instance when using the single spatial database model, you create multiple SQL Server databases, create a geodatabase in each one, authorize each geodatabase, and create separate ArcSDE services for each one (if you will be using ArcSDE services to connect to the geodatabases).

The following graphic illustrates that there are two separate databases, Database1 and Database2, on one SQL Server instance and that each database contains a complete geodatabase.

Two geodatabases in one SQL Server instance using the single spatial database model

The databases can have any unique name that follows SQL Server rules for identifiers, does not start with a number, and is not sde.

You can use the ArcSDE for SQL Server Post Installation wizard to create additional databases and geodatabases. Run through all steps of the Post Installation wizard, making sure to provide a unique database name, ArcSDE service name, and ArcSDE service number. Since users are created at the instance level then added to the database in SQL Server, be sure to use the same password for the ArcSDE administrator when prompted.

If clients only use direct connections to each separate geodatabase, you do not need to create an ArcSDE service and can skip the last step of the Post Installation wizard. However, if clients will connect using an ArcSDE service, you need to create an additional service for each additional geodatabase. As mentioned, this can be done through the Post Installation wizard; just be sure to specify a different service name, port number, and the correct database name on the ArcSDE service information dialog box.

Be aware that if you plan to use different settings in the dbtune.sde, giomgr.defs, or dbinit.sde files, these changes must be made before running the Post Installation wizard.

Client connections can be made to one geodatabase at a time. When connected to one single spatial database geodatabase on a SQL Server instance, you cannot query information from another geodatabase on the SQL Server instance through that same connection.

For instance, in ArcCatalog, you could create a spatial database connection to Database1. When you add data to ArcMap through that connection, you cannot view the data in Database2. To access the data in Database2, you would set up a second spatial database connection in ArcCatalog, this time specifying Database2 in the Database field and Database2's port number in the Service field.

For information on setting up spatial database connections in ArcCatalog, see Creating spatial database connections in the "Data management with ArcCatalog" section of the help.For connection syntax, see ArcSDE connection syntax.

The SQL Server multiple spatial database model

NOTE: ArcSDE geodatabases licensed through ArcGIS Server Enterprise only

Prior to ArcSDE 9, geodatabases in SQL Server were always stored using the multiple spatial database model. For ArcSDE 9 and later releases, you should use the single spatial database model. However, since the multiple spatial database model is still supported (though not recommended), the following is a description this model.

In the multiple spatial database model, the ArcSDE repository is stored in a database called SDE. User-defined data, such as feature classes, raster, and nonspatial tables, reside in other databases. The ArcSDE repository in the SDE database stores references to the location of all the user-defined data for a particular instance of ArcSDE. The SDE database and any other related databases form a single geodatabase. This data storage model is known as the multiple spatial database model because it takes multiple SQL Server databases to make one ArcSDE geodatabase.

SQL Server multiple spatial database model; multiple databases make up a single geodatabase

The single spatial database model explained in the previous section is the recommended way to store your geodatabases. However, if you would like to use the multiple spatial database model, the following are rules and guidelines for its use and creation.

Rules for using a multiple spatial database instance

Guidelines for creating a multiple spatial database instance

Here are some guidelines for creating a database to store spatial data.

Migrating from the multiple to the single spatial database model

As mentioned above, the single database model is the recommended model to use for your geodatabases. If you have an existing geodatabase stored using the multiple database model and want to migrate to the single database model, follow the steps below:

  1. Create a full database backup of all ArcSDE databases.
  2. Create a new single database model geodatabase using the Post Installation wizard. Be sure to run the Post Installation wizard for the same release you are using. For example, if you are using the multiple database model with ArcSDE 9.1 and want to move to the single database model, run the 9.1 Post Installation wizard to create the single geodatabase. Also, be sure to perform these steps within the same instance of SQL Server.
  3. NOTE: If you are currently using ArcSDE 8.3, first upgrade to at least ArcSDE 9, then migrate to the single database model.

  4. Use the ArcCatalog interface to transfer data to your new single database model geodatabase.
  5. The Post Installation wizard creates a new database in SQL Server, so create a service or set up a direct connection with which to access the new geodatabase. Then, start ArcCatalog and make a connection to both the old multiple database model and the new single database model. Next, transfer data between the geodatabases using copy/paste, import, export, or various other methods of migrating data.

See Also

  • Using multiple geodatabases within a DBMS