Using multiple geodatabases in PostgreSQL
Using multiple geodatabases in PostgreSQL
|
Release 9.3 |
|
Note:This topic was updated for 9.3.1.
For PostgreSQL, you store one geodatabase per database. You can create multiple databases on the same PostgreSQL database cluster, but clients connect to one database at a time.
If you are using an ArcSDE service for connection, each database needs its own ArcSDE service. These different ArcSDE services can be running on the same server machine but do not have to be. Each connection to the ArcSDE service or direct connection to a database will access and use only one database.
To set up multiple geodatabases in PostgreSQL, follow the instructions specific to your operating system below.
For Linux
- Create an additional database on the PostgreSQL database cluster and create an sde schema in the new database.
- Add a new ArcSDE service name, port number, and network protocol to the services.sde file in your SDEHOME/etc directory (if you will be using an ArcSDE service for connections).
- If you plan to set variables in the dbinit.sde file to connect to the second geodatabase, make a copy of your dbinit.sde file, giving it a new name. This name must include the name of the new ArcSDE service. For example, if the new service name is sdepgsql2, name the dbinit file dbinit_sdepgsql2.sde.
- Set the appropriate variables in the new dbinit file.
- If you will be using different configuration parameters in your second geodatabase, make a backup copy of your existing giomgr.defs and dbtune.sde files in your SDEHOME/etc directory, then alter the giomgr.defs and dbtune.sde files to contain the parameters and values you desire for the new geodatabase.
- Run sdesetup –o install to create the geodatabase repository in your second database.
sdesetup –o install –d POSTGRESQL –D <name_of_second_database> –u
sde –p <sde_user_password> –l <license_key>
- If using one, start the second ArcSDE service with the sdemon command.
sdemon –o start –i <service_name> –s <server_name> –p <sde_user_password>
For WindowsYou can use the ArcSDE for PostgreSQL Post Installation wizard to create additional databases and geodatabases. If clients only use direct connections to each separate geodatabase, you do not need to create an ArcSDE service. However, if clients will connect using an ArcSDE service, you need to create an additional service for each additional geodatabase. 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. The Post Installation wizard will add the new service information to the services.sde file and the Windows services file.
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.
- To specify different geodatabase storage information for the second geodatabase, make copies of your giomgr.defs and dbtune.sde files, giving them different names. For example, you could name them giomgr2.defs and dbtune2.sde. Alter the contents of these new files. When you run the Post Installation wizard, you will specify these custom files.
- To set variables in the dbinit.sde file to connect to the second geodatabase, make a copy of your dbinit.sde file, giving it a new name. This name must include the name of the new ArcSDE service. For example, if the new service name is sdepgsql2, name the dbinit file dbinit_sdepgsql2.sde. Add the appropriate variables to the new dbinit file. When running the Post Installation wizard, specify the new dbinit file.