Skip To Content

Configure a database connection for ArcGIS Server

The sections below summarize using a supported database or cloud data warehouse with an ArcGIS Server site.

Configure clients and create a database connection file

The following topics provide instructions on how to install and configure client software and create a database connection file. 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.

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. This process is described in the help pages referenced in the previous section, but a summary of the entries for all supported databases and cloud data warehouses is provided below.

Note:

  • PostgreSQL client libraries are installed with ArcGIS Server and no entry is needed for PostgreSQL in the init_user_param.sh file.
  • No entry is necessary in the init_user_param.sh file for connections to Microsoft SQL Server from ArcGIS Server on Linux.
  • Before adding the reference to the init_user_param.sh file, ensure that the ArcGIS Server installation owner has at least read and execute permissions on the database client libraries.
  • For settings to take effect in the init_user_param.sh script, you must restart ArcGIS Server on each machine in the ArcGIS Server site.

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.

Dameng

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

Google BigQuery

# -----------------------------------------------------------------------
# Modify this section to configure an ODBC connection to Google BigQuery Data 
# Warehouse.
#
# To make a connection, copy GoogleBigQueryODBC.did to the lib folder under the 
# extracted directory for Google BigQuery ODBC driver. Edit 
# simba.googlebigqueryodbc.ini and set DriverManagerEncoding=UTF-16. Configure and 
# store the odbcinst.ini in the /etc folder. 
#
# -----------------------------------------------------------------------
export LIB_ODBC_DRIVER_MANAGER=<Location_to_ODBC_driver_manager_libraries>/libodbc.so.2
export SIMBAGOOGLEBIGQUERYODBCINI=<Location_to_simba.googlebigqueryodbc.ini>/simba.googlebigqueryodbc.ini

IBM 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

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. Ensure 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

Redshift

# -----------------------------------------------------------------------
# Modify this section to configure Amazon Redshift ODBC connector
# 
# -----------------------------------------------------------------------
export LIB_ODBC_DRIVER_MANAGER=<Location_to_ODBC_driver_manager_libraries>/libodbc.so.2
export AMAZONREDSHIFTODBCINI=<Location_to_amazon.redshiftodbc.ini>/amazon.redshiftodbc.ini

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

Snowflake

#
# Modify this section to configure a connection to Snowflake Data Warehouse
# 
# -----------------------------------------------------------------------
export LIB_ODBC_DRIVER_MANAGER=<Location_to_ODBC_driver_manager_libraries>/libodbc.so.2

Teradata or Vantage Advanced SQL Engine

# -----------------------------------------------------------------------
# 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

Test the connection

To test a connection to a database or enterprise geodatabase, publish a service using data residing in the database.

To test a connection to a cloud data warehouse, do the following:

  1. Add a data store item that registers the database connection file with the hosting server.
  2. Define a query layer for a table in the cloud data warehouse.
  3. Publish a service from the query layer.

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 your user profile on the ArcGIS Server machines references the database client libraries, and the information in your user profile differs from what is set in the 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 use only the init_user_param.sh file to define database client information.