Utility database connections

You can start the utility database on a database server by specifying utility_db as the database name when connecting to the server. You can use the -su server option to set the utility database password for the DBA user, or to disable connections to the utility database. If the -su option is not specified when starting the utility database, then the user ID and password requirements are different for the personal server and the network server.

  • For the personal database server, if -su is not specified, then there are no security restrictions for connecting to the utility database. For the personal server, you must specify the user ID DBA. You must also specify a password, but it can be any password. It is assumed that anybody who can connect to the personal database server can access the file system directly so no attempt is made to screen users based on passwords.

    To avoid typing the utility database password in plain text, when using the -su option, you can create a file that contains the password and then obfuscate it using the dbfhide utility. For example, suppose the file named util_db_pwd.cfg contains the utility database password. You could obfuscate this file using dbfhide and rename it to util_db_pwd_hide.cfg:

    dbfhide util_db_pwd.cfg util_db_pwd_hide.cfg

    The util_db_pwd_hide.cfg file can then be used to specify the utility database password:

    dbsrv12 -su @util_db_pwd_hide.cfg -n my_server c:\mydb.db

    See File Hiding utility (dbfhide).

  • For the network server, if -su is not specified, then you must specify the user ID DBA, and the password that is held in the util_db.ini file, stored in the same directory as the database server executable file. As this directory is on the server, you can control access to the file, and thereby control who has access to the password. The password is case sensitive.

    Note

    The util_db.ini file is deprecated. You should use the -su server option to specify the password for the utility database's DBA user. See -su dbeng12/dbsrv12 server option.

    Specifying a password for the utility database for a network database server is useful for the cases when the database server is running, but it is not possible to connect to the database. For example, in a mirroring system, you can connect to the utility database to shut down the database server, or force a mirror server to become the primary server if necessary. See Stopping a database server in a mirroring system and Forcing a database server to become the primary server.

 Connect to the utility database on the personal server (Interactive SQL)
Note

When you are connected to the utility database, executing REVOKE CONNECT FROM DBA disables future connections to the utility database. This means that no future connections can be made to the utility database unless you use a connection that existed before the REVOKE CONNECT was done, or restart the database server. See REVOKE statement.

  1. Start a database server with the following command:

    dbeng12 -n TestEng

    For additional security, the -su option can be used to specify the utility database password.

  2. Start Interactive SQL.

  3. In the Connect window, specify the following information.

    1. In the User ID field, type DBA.

    2. In the Password field, type any non-blank password. The password itself is not checked, but the field must not be empty.

    3. In the Action dropdown list, click Connect To A Running Database On This Computer.

  4. In the Database Name field, type utility_db.

  5. In the Server Name field, type TestEng.

  6. Click Connect.

    Interactive SQL connects to the utility database on the personal server named TestEng.

 Connect to the utility database on the network server (Interactive SQL)
Note

When you are connected to the utility database, executing REVOKE CONNECT FROM DBA disables future connections to the utility database. This means that no future connections can be made to the utility database unless you use a connection that existed before the REVOKE CONNECT was done, or restart the database server. See REVOKE statement.

  1. Start a database server with the following command:

    dbsrv12 -n TestEng -su 9Bx231K
  2. Start Interactive SQL.

  3. In the Connect window, type DBA for the User ID, and type the password specified by the -su option. In this example, the password is 9Bx231K.

  4. In the Action dropdown list, click Connect To A Database Running On Another Computer.

  5. In the Database Name field, type utility_db.

  6. In the Server Name field, type TestEng.

  7. Click Connect.

    Interactive SQL connects to the utility database on the network server named TestEng.

 Using util_db.ini with network database servers (deprecated)
 See also