Connecting to the utility database

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:

dbsrv11 -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 server option.

To connect to the utility database on the personal server (Interactive SQL)
  1. Start a database server with the following command:

    dbeng11 -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, type DBA for the User ID, and type any non-blank password. The password itself is not checked, but the field must not be empty.

  4. On the Database tab, enter utility_db as the Database Name and TestEng as the Server Name.

  5. Click OK to connect.

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

To connect to the utility database on the network server (Interactive SQL)
  1. Start a database server with the following command:

    dbsrv11 -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.

  4. On the Database tab, enter utility_db as the Database Name and TestEng as the Server Name.

  5. Click OK to connect.

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

See SQL Anywhere database connections and -su server option.

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.

Using util_db.ini with network database servers (deprecated)
Note

Because the use of the util_db.ini file is deprecated, it is recommended that you use the -su server option to specify the DBA user's password for the utility database.

Using util_db.ini relies on the physical security of the computer hosting the database server since the util_db.ini file can be easily read using a text editor.

For the network server, by default you cannot connect to the utility database without specifying -su or using util_db.ini. If you use util_db.ini, the file holds the password and is located in the same directory as the database server executable and contains the text:

[UTILITY_DB]
PWD=password

To protect the contents of the util_db.ini file from casual direct access, you can add simple encryption to the file using the File Hiding utility (dbfhide). You can also use operating system features to limit access to the server file system.

For more information about obfuscating .ini files, see Hiding the contents of .ini files.