As an ArcGIS Server administrator, you have the option to register your data folders, databases, and geodatabases with ArcGIS Server. Data registration provides ArcGIS Server a list of locations to access. Data registration also helps ArcGIS Server adjust data paths when publishing across machines.
The following sections describe how you can prepare your ArcGIS client to connect to a PostgreSQL database (whether the database contains a geodatabase or not) and register the database with ArcGIS Server.
You must set the following variables for PostgreSQL in the ArcGIS Server init_user_param.sh script when connecting from ArcGIS for Server (Linux):
See the "Reference the database client libraries in the init_user_param.sh script" section of Configuring a connection to a database in ArcGIS Server for more information.
The PostgreSQL login or group role you use to connect to the database must be granted privileges in the database to access the data to be published.
- The role must be able to connect to the database. By default, this is granted to the public group. If you revoke that privilege from the public group, you must grant it to specific login roles or groups.
- The role must be granted USAGE privileges on all schemas that contain data or other resources to be published. If you are using a geodatabase, the role must be granted USAGE on the sde schema.
- The role must be granted at least SELECT privileges on data to be published.
- If you will be publishing editable feature services, the role must be granted the required privileges—INSERT, UPDATE, and/or DELETE—on the data to be edited. You can grant SELECT, INSERT, UPDATE, and DELETE privileges from ArcGIS for Desktop. See Grant and revoke dataset privileges for more information.
- If you will be registering the geodatabase as a managed database, the user with which you connect must have privileges sufficient to create data in the geodatabase and must own a schema that matches the database user name.
See Privileges for geodatabases in PostgreSQL for more information on privileges for different types of database users.
Connect to PostgreSQL
To register a database with the server, you must provide connection information. There are two ways you can do this:
- Import an existing .sde file that contains the connection information.
You can create a Database Connection (.sde) file from the Catalog tree in ArcGIS for Desktop, using the Create Database Connection geoprocessing tool or a Python script.
- If you register from ArcGIS for Desktop, you can provide your connection information at the time of registration.
No matter which way you choose, you must provide the following information to connect to PostgreSQL:
- The type of DBMS to which you are connecting (in this case, PostgreSQL)
- The name of the server on which PostgreSQL is installed
- Authentication Type set to database authentication
- A valid database login name and password, which must be saved with the connection
- The name of the database
For more information, see Database connections in ArcGIS for Desktop.
Beginning with ArcGIS 10.3 geodatabases, you cannot use an ArcSDE service to connect. If you want to connect to a previous release geodatabase using an ArcSDE service, create a .sde file using the Create ArcSDE Connection File geoprocessing tool or a Python script. Then you can import the connection when you register the geodatabase with ArcGIS Server.
Register with ArcGIS Server
You can register the database from Server Manager or the Catalog tree in ArcGIS for Desktop. See the following topics for an explanation of registration options and how to register the database: