Enabling geodatabase functionality in an existing PostgreSQL database
This topic applies to ArcGIS for Desktop Standard and ArcGIS for Desktop Advanced only.
You can connect from ArcGIS for Desktop (Standard or Advanced) to an existing PostgreSQL database, as a user named sde that has superuser privileges in the PostgreSQL database cluster, and create a geodatabase in it.
You would create a geodatabase in an existing PostgreSQL database if you decide you want to use geodatabase functionality such as topologies, networks, versioned editing, archiving, or replication. Creating the geodatabase in an existing database lets you customize your database. For example, if you want to create your database with a template other than postgres, create the database first then create a geodatabase in it.
To create a geodatabase in an existing database, you could use the Create Enterprise Geodatabase tool, and the sde user will also be created for you. If your database cluster already contains an sde user, you could add an sde schema to an existing database and use the Enable Enterprise Geodatabase geoprocessing tool to enable geodatabase functionality in the database.
The following are the steps you take to enable geodatabase functionality in an existing PostgreSQL database using the Enable Enterprise Geodatabase tool, which can be accessed from a database connection in the Catalog tree:
- Be sure the existing sde user has been granted superuser privileges.
- Create a schema named sde in the database and ensure that the sde user owns the schema and has all privileges on it.
- Grant usage on the sde schema to all other users who need to access the geodatabase.
- Copy the st_geometry library to the PostgreSQL installation
directory.
The st_geometry library can be found in the DatabaseSupport directory of your ArcGIS client installation directory. Move the file from the client to the PostgreSQL lib directory on your PostgreSQL server. If PostgreSQL is installed on Linux, log in to the Linux server as the root user and place the st_geometry.so file in the /usr/lib64/pgsql directory. If PostgreSQL is installed on Windows, place the st_geometry.dll fiile in the %PostgreSQL%\lib directory.
- Start ArcMap or ArcCatalog.
- Create a database connection to the PostgreSQL database from the Catalog tree, connecting as the sde user.
Be sure to save the user's password on the Database Connection dialog box.
- Right-click the database connection and click Enable Geodatabase.
The Enable Enterprise Geodatabase tool opens.
- Add the database connection file for your PostgreSQL database to the Input Database text box.
- Browse to the ArcGIS for Server authorization file that was created when you authorized ArcGIS for Server, and add it to the Authorization File text box.
When you use the wizard to authorize ArcGIS for Server, a keycodes file is written to the server where the software is installed. If you authorized ArcGIS for Server on a Linux box, the file was created in /arcgis/server/framework/runtime/.wine/drive_c/Program Files/ESRI/License<release>/sysgen. If you authorized on a Windows server, the file was created in Program Files\ESRI\License<release>\sysgen. If you have not already done so, authorize ArcGIS for Server to create this file.
- Click OK to run the tool.
A geodatabase is created in the database.
A log file for the geodatabase creation (GDBCreateGeodatabase<#>.log) is written to the directory specified for your %TEMP% variable on the computer where the tool is run. If you have any problems running the tool, check this log file to troubleshoot the problem.