English

How To: Set up the GPT using a Single Database Model

Summary

The instructions for installing the GPT database, located in the 'GPT93_InstallationGuide.pdf' on the GPT 9.3 Distribution CD within the Documentation/Installation folder, are based on the 'Multiple Spatial Database Model', where the GPT geodatabase connects to SDE tables in a separate SDE database. However, the best practice for geodatabases recommends configuring SDE tables to reside inside each database. This is called the 'Single Spatial Database Model' geodatabase. Instructions provided describe how to set up the GPT geodatabase using the Single Spatial Database Model.

Procedure

The instructions below are for SQL Server, but the concepts can be applied to other RDBMS.

  1. In the Single Database Model, it is necessary to run the ArcSDE Post Install for each database that will be spatially enabled. The ArcSDE Post Install is used to create the initial GPT database and populate it with the necessary SDE tables. Launch the ArcSDE Post Installation from the Start menu.
  2. The Post Installation can be run with the 'Complete' or 'Custom' option. If Direct Connect or a three-tier SDE connection for the GPT installation is planned, select 'Custom' and verify that the final option 'Create an ArcSDE Service' is unchecked. Also, verify that the 'Authorize ArcSDE' option has been checked, as each geodatabase must be associated with an ESRI license file.
  3. In the dialog box associated with 'Select Schema', select the 'SDE Schema' from the two options.
    [O-Image]
  4. In the dialog box associated with 'User Information', input the SDE server's name in the first box, and select an authentication mechanism that will give the Post Install authority to create this database. In the example shown here, the user logged into Windows is an Administrator and has that authority.
    [O-Image]
  5. In the dialog box associated with 'Create Spatial database', change the Database name parameter from 'sde' to the name of the GPT database to be created (In this example, 'GPT93'). If an SDE user does not yet exist in the RDBMS context, one will be created by the Post Install. In the 'SDE user password' field, type in either the password for the existing SDE user login, or designate a password for the newly created SDE user.
    [O-Image]
  6. In the dialog box associated with 'User information', select the 'Create' option to create the connection information for the GPT93 database. Designate 'SQL Server Authentication', verify that the SDE user is used to connect, and enter the SDE user password.
    [O-Image]
  7. Continue through the rest of the Post Installation wizard, authorizing the database with a valid ESRI license (required), and creating the SDE service (optional). When the Post Installation wizard has completed successfully, click Finish.
  8. Launch SQL Server Management Studio, and open the Databases folder from the Object Browser. Verify that the GPT93 database was created, and also the SDE tables within it are as shown in the image below (exact names of some SDE tables can vary).

    [O-Image]
  9. Make a backup copy of the create_schema_mssql.cmd file from the 'Database Scripts' folder on the GPT Installation CD, and open the original create_schema_mssql.cmd file in a text editor.
  10. Delete lines 18-30 from the create_schema_mssql.cmd file:

    Code:
    echo Building Database %DATABASE% on %DBSERVER%...
    osql -E -S %DBSERVER% -d MASTER -w 200 -n -b -Q "if exists (Select * from master.dbo.sysdatabases where name = '%DATABASE%') drop database %DATABASE%"
    if errorlevel 1 (
    ECHO.
    ECHO Unable to drop database
    osql -E -S %DBSERVER% -d MASTER -w 200 -n -b -Q "select spid, left(p.hostname, 20) as hostname, left(p.program_name, 30) as program_name, left(p.loginame, 20) as loginname from master.dbo.sysprocesses p join master.dbo.sysdatabases d on d.dbid = p.dbid where d.name = '%DATABASE%'"
    ECHO.
    goto Failed
    )

    if errorlevel 1 goto Failed

    osql -E -S %DBSERVER% -d MASTER -w 200 -n -b -Q "Create Database %DATABASE%"
    if errorlevel 1 goto failed

  11. Save and close the create_schema_mssql.cmd file.
  12. Proceed with the GPT installation instructions, as per the 'GPT93_InstallationGuide.pdf' located on the GPT 9.3 Distribution CD within the Documentation/Installation folder, to run the scripts that create the GPT tables. When inputting the name of the GPT database, use the name of the database that was created during the ArcSDE Post Installation.