Setting up PostgreSQL databases

The Surround SCM installer allows you to easily install the PostgreSQL database services and create a supported RDBMS server database. Perforce does not provide support for configuring or maintaining PostgreSQL. If you do not install PostgreSQL during the Surround SCM installation, a qualified PostgreSQL database administrator should configure the PostgreSQL database.

Keep the following in mind:

  • Do not add, delete, or modify any fields in the Surround SCM tables.
  • Do not directly add, edit, or delete any data in the tables.
  • Do not create different primary keys. This will adversely affect application performance.
  • Do not create complex triggers on any of the tables. Triggers may cause severe database issues and correcting these issues is not covered by Perforce.
  • Create a process to back up database tables on a regular schedule.
  • Running PostgreSQL and the Surround SCM Server on the same computer can result in slow performance if not configured correctly. Make sure PostgreSQL is configured correctly to avoid using all the system memory.

Connecting to PostgreSQL

The Surround SCM Server uses the server connection information provided during installation to connect to the PostgreSQL database. You can also enter the server connection information after installation. When you first start the Surround SCM Server and Client, you are prompted to configure the database location. You must restart the Surround SCM Server and Client after configuring the server database connection.

If no tables are found in the database you specify, you are also prompted to allow the Surround SCM Server to create them. Decline this prompt if you are using a Surround SCM 2008 or earlier server database. When you restart the Surround SCM Server, it automatically upgrades the old server database.

Creating and upgrading server databases   

During Surround SCM installation, you are prompted to enter database connection information. All the required information is automatically created and entered if you install PostgreSQL with Surround SCM. If PostgreSQL is already installed, create an empty UTF-8 encoded database, username, and password so you can enter the connection information during installation.

The Surround SCM Server connects to the server database at startup and checks for the required PostgreSQL tables. If no tables are found, the Surround SCM Server automatically creates them. The SCMServerDB.sql script file, which is located in the PostgreSQL directory in the Surround SCM application directory, is used to create the tables.

If you are upgrading to Surround SCM 2009 or later, the Surround SCM Server upgrades native Surround SCM databases to RDBMS format when it is started after installation.