To pubilsh ArcGIS Server web services that access the data in your IBM Db2 database (whether the database contains a geodatabase or not), your ArcGIS Server site must connect to the database. To configure that connection, you need to do the following:
- Install Db2 client software on the ArcGIS Server machines and the ArcGIS Desktop client machines.
- Set variables on the ArcGIS Server machines.
- Grant privileges on the data to be published.
- Connect to the database.
- Register the connection file with your ArcGIS Server site.
This workflow is only supported for Db2 on Linux, Unix, or Windows machines.
Install Db2 client software
Install the Db2 client on all ArcGIS machines that need to connect to a Db2 database. You can obtain Db2 client files from IBM or from My Esri. Follow the instructions provided with the Db2 client software to install it. If you do not have the privileges necessary to install software on the machines where ArcGIS clients are running, you'll need to have your IT department install the Db2 client for you.
If your ArcGIS client is installed on a machine with a 64-bit operating system, run the 64-bit Db2 client installation; it installs both the 32- and 64-bit clients, allowing you to connect from both the 32-bit ArcMap and 64-bit ArcGIS Server and ArcGIS Pro software. If you have ArcMap installed on a 32-bit operating system, run the 32-bit Db2 client installation.
You can catalog a database after you install the Db2 client software, which sets up a data source name that you can specify when you connect to the database.
If ArcGIS Server is installed on a Linux machine that is separate from your Db2 server, you must create a Db2 client instance on the ArcGIS Server machine before you can catalog the Db2 instance.
If you choose not to catalog a database, you must specify a specific connection string to connect to a Db2 database as shown in Connect to Db2.
There are several variables you must set in the ArcGIS Server init_user_param.sh script when connecting to Db2 from ArcGIS Server (Linux). They include the following:
See Configure a connection to a database in ArcGIS Server for more information.
The login used to connect to the database must have specific privileges granted to it. For logins that will only publish read-only services, grant the privileges necessary for a data viewer as described in Privileges for geodatabases in Db2 or Privileges for using ArcGIS with a Db2 database. For logins that will publish editable feature services, grant the privileges necessary for a data editor. If you will be registering the geodatabase as a managed database, grant the privileges necessary for a data creator.
If your connection to Db2 uses operating system authentication, be sure to grant the appropriate privileges to the ArcGIS Server account.
If the data is in a geodatabase, the data owner must grant the required privileges to the data. If the data is in a database, the data owner can grant privileges from ArcGIS or the database administrator can use database tools to grant the required privileges.
Connect to Db2
You'll need the following information to register a Db2 database with an ArcGIS Server site:
- The type of database management system to which you are connecting, in this case, DB2
- Either the cataloged database name or the connection string used for DSNless connections
The DSNless connection string is in the form HostName=<host>;Port=<port number>;Database=<database name>;. See Database connections in ArcMap or Database connections in ArcGIS Pro for more information and an example.
- The type of authentication to be used: database or operating system
Although all logins to Db2 are domain or local operating system accounts (domain accounts are recommended), you can specify database authentication for your connection from ArcGIS and Db2 will validate your connection using the login and password you provide in the database connection file. To use with ArcGIS Server, you must save the user information with the connection file.
If you choose to use operating system authentication instead, be sure your Db2 server can authenticate the ArcGIS Server account.
Register with ArcGIS Server
You can register the database from ArcGIS Server Manager, the Manage registered data stores pane in ArcGIS Pro, or the Catalog tree in ArcMap. See the following for an explanation of registration options and how to register the database: