Sample scripts provided with ArcSDE for PostgreSQL
Sample scripts provided with ArcSDE for PostgreSQL
Release 9.3
When you install the ArcSDE component of ArcGIS Server Enterprise for PostgreSQL, a Structured Query Language (SQL) script is installed in the SDEHOME > tools > postgres directory. This script, roles_schemas_privileges.sql, contains SQL commands to create users and schemas. You need to alter the script to use the role and schema names you want.
For the ArcSDE component installation on Linux, there are two scripts provided on the DVD: create_pgdb.sde and setup_pgdb.sde. The create_pgdb.sde script should be run as the root user, and it installs PostgreSQL and creates the PostgreSQL database cluster. The setup_pgdb.sde script should be run as the postgres superuser. It creates a table space, a database, the ArcSDE administrative user (sde), a schema for the sde user, and the plpgsql language and installs the TSearch2 contrib module. This script can also start the PostgreSQL postmaster, but it is recommended you start it manually prior to running this script.
Both scripts prompt you to provide information such as the installation location or database name.