Database repositories

In addition to the parameters that apply to all repository types, you can configure the parameters in this section for database repositories.

NOTE: If you want to set up multiple database repositories, you can also configure these parameters in the [Default] section (if you also have other repository types set up, they are not affected by these settings).

The configuration for each type of database connection is identical, except that:

  • GroupServerLibrary must be set to the correct library. Set this parameter to one of:

    • ogs_dboracle (Windows/UNIX)
    • ogs_dbodbc (Windows)
    • ogs_dbiodbc (UNIX)
    • ogs_dbunixodbc (UNIX)
  • The format of the ConnectionString will vary.
  • The environment must be set up to support the type of connection that you are using (for example on UNIX you must install iodbc or unixodbc to connect to an ODBC data source).
  • There might be some minor variation in the SQL accepted, and the output, depending on the type of database (for example case sensitivity).

The following example shows how to retrieve user and group information from a database:

[ODBC]
GroupServerLibrary=ogs_dbodbc
ConnectionString=DSN=Groups
SQLStatement=SELECT DISTINCT Username FROM Groups
AddType=USER
UserColumn=Username
[Oracle]
GroupServerLibrary=ogs_dboracle
ConnectionString=USER/PASSWORD@TNS_ALIAS
SQLStatement=SELECT DISTINCT Username FROM Groups
AddType=USER
UserColumn=Username