Skip To Content

Configure a database connection for ArcGIS Server

To connect an ArcGIS Server site to a supported database platform, you need to do the following:

Install and configure the database client software

The following topics provide instructions on how to install and configure client software for specific databases. Keep in mind that you must install a release of the client software that is compatible with the release of the database to which you want to connect.

Follow the instructions in these topics to set up database client software on the ArcGIS Server machine:

No separate database client is needed to connect to PostgreSQL.

Reference the database client libraries in the init_user_param.sh script

For most databases, you need to reference the database client libraries in the ArcGIS Server init_user_param.sh script. You can access this script by browsing to the <ArcGIS Server installation directory>/arcgis/server/usr directory.

Note:

Before adding the reference, ensure that the ArcGIS Server installation owner has at least read and execute permissions on the database client libraries.

Also note that since PostgreSQL client libraries are installed with ArcGIS Server, there is no PostgreSQL entry needed in init_user_param.sh.

In the init_user_param.sh script, edit the section that is relevant to your database management system by referencing the database client libraries and other database variables. To enable the variables, remove # from the lines beginning with export.

For example:

Dameng

# Modify this section to configure a connection to Dameng.
export DAMENGDIR=<Dameng_InstallDir> 
export LD_LIBRARY_PATH=$DAMENGDIR/bin:$LD_LIBRARY_PATH

Db2

#
# Modify this section to configure a connection to Db2
export DB2_CLIENT_HOME=<DB2_InstallDir>
export DB2INSTANCE=<DB2_instance_name>
export PATH=DB2_CLIENT_HOME/bin:$PATH
export LD_LIBRARY_PATH=$DB2_CLIENT_HOME/lib64:$LD_LIBRARY_PATH

Informix

# 
# Modify this section to configure a connection to Informix
#
export INFORMIXDIR=<Informix_InstallDir>
export INFORMIXSERVER=<Informix_Database_Server_Name>
export INFORMIXSQLHOSTS=<Location_to_sqlhosts>
export ODBCINI=<Location_to_.odbc.ini>
export PATH=$INFORMIXDIR/bin:$PATH
export LD_LIBRARY_PATH=$INFORMIXDIR/lib:$INFORMIXDIR/lib/cli:$INFORMIXDIR/lib/esql:$LD_LIBRARY_PATH

Oracle

#
# For connection with Oracle Runtime or Administrator Client
#
export ORACLE_BASE=<Oracle_Installdir>/app
export ORACLE_HOME=$ORACLE_BASE/<Oracle_release>/product/<Oracle_version>/<client_version>
export ORACLE_SID=<set when applicable>
export TNS_ADMIN=<set when applicable. e.g.$ORACLE_HOME/network/admin>
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

Note:

If you have installed multiple Oracle clients, you will see multiple Oracle client folders. Make sure the ORACLE_HOME variable is set to the folder you intend to use to connect to the database in ArcGIS Server.

If you use the Oracle database instant client libraries, only the $LD_LIBRARY_PATH needs to be referenced, for example:

#
# For connection with Oracle Instant Client
#
export LD_LIBRARY_PATH=<Location_to_instantclient_11_2>:$LD_LIBRARY_PATH

SAP HANA

# -----------------------------------------------------------------------
# Modify this section to configure a connection to SAP HANA.
#
# To make a connection, name the SAP HANA ODBC configuration files as .odbcinst.ini
# and .odbc.ini and store them in the ArcGIS Server user $HOME directory.
#
# -----------------------------------------------------------------------
#export SAPHANADIR=<SAPHANA_InstallDir>/sap/hdbclient
#export LD_LIBRARY_PATH=$SAPHANADIR:$LD_LIBRARY_PATH

Teradata

# -----------------------------------------------------------------------
# Modify this section to configure a connection to Teradata.
#
# To make a connection, name the Teradata ODBC configuration files as  
# .odbcinst.ini and .odbc.ini and store them in the ArcGIS Server user $HOME directory. 
#
# -------------------------------------------------------------------------------------
#export LIB_ODBC_DRIVER_MANAGER=<Teradata_InstallDir>/<version>/14.00/odbc_64/lib/libodbc.so
#export TDDIR=<Teradata_InstallDir>/client/<version>/odbc_64
#export LD_LIBRARY_PATH=$TDDIR/lib:$LD_LIBRARY_PATH
#export ODBCINI=<Location_to_.odbc.ini>/.odbc.ini

Restart ArcGIS Server

For your settings to take effect in the init_user_param.sh script, you need to restart ArcGIS Server. To do this, run the startserver.sh script on each machine in your ArcGIS Server site.

Test your connection

You should test the connection by doing the following*:

  1. Register the database with the ArcGIS Server site.
  2. Publish a service using data residing in the database.

* For Informix and Db2 z/OS databases, use ArcMap 10.8.x to create a service definition file that does not contain the service data, and publish the service definition file to test the connection.

If you encounter problems with your connection, consult the server logs for more information. To learn more about server logging, see Work with server logs.

Note:

If you previously referenced the database client libraries in your user profile, ArcGIS Server can still connect to your databases. However, if the reference information differs between the user profile and init_user_param.sh file, you may experience problems when attempting to connect to the database. To alleviate connection issues, remove the reference information from your user profile and reference your database client libraries using the method described above.