Formatting the database and log

If you configure the server manually, you must format the server database and recovery log. The database is used to store information about client data and server operations and the recovery log can be used to recover from system and media failures. Use the DSMSERV FORMAT utility to format and initialize the server database and recovery log. No other server activity is allowed while you initialize the database and recovery log.

After you set up server communications, you are ready to initialize the database. Do not place the directories on file systems that might run out of space. If certain directories, such as the archive log, are no longer available or full, the server stops.

Windows operating systemsImportant: The installation program creates a set of registry keys. One of these keys points to the directory where a default server, named SERVER1, is created. To install another server, create a directory and use the DSMSERV FORMAT utility, with the -k parameter, from that directory. The new directory becomes the location of the server. The registry tracks the installed servers.

Setting the exit list handler

Set the DB2NOEXITLIST registry variable to ON for each server instance. Log on to the system by using the instance user ID and run the following command:
db2set -i server_instance_name DB2NOEXITLIST=ON
For example:Linux operating systemsAIX operating systems
db2set -i tsminst1 DB2NOEXITLIST=ON 
Windows operating systems
db2set -i server1 DB2NOEXITLIST=ON 

Initializing the server database and recovery log

Use the DSMSERV FORMAT utility to format and initialize the server database, which is an IBM Db2 database, and the recovery log. For example, if the server instance directory is /tsminst1, run the following commands:Linux operating systemsAIX operating systems
cd /tsminst1
dsmserv format dbdir=/tsmdb001 activelogsize=32768
activelogdirectory=/activelog archlogdirectory=/archlog 
archfailoverlogdirectory=/archfaillog mirrorlogdirectory=/mirrorlog
Windows operating systems
cd \tsminst1
dsmserv -k server2 format dbdir=d:\tsm\db001 activelogsize=32768 
activelogdirectory=e:\tsm\activelog archlogdirectory=f:\tsm\archlog 
archfailoverlogdirectory=g:\tsm\archfaillog mirrorlogdirectory=h:\tsm\mirrorlog
Tip: If you specify multiple directories, ensure that the underlying file systems are of equal size to ensure a consistent degree of parallelism for database operations. If one or more directories for the database are smaller than the others, they reduce the potential for optimized parallel prefetching and distribution of the database.
Linux operating systemsAIX operating systemsIf the Db2 database does not start after you run the DSMSERV FORMAT command, you might have to disable the file system mount option NOSUID. You must disable the option to start the system in the following circumstances:
  • If the option is set on the file system that contains the Db2 instance owner directory.
  • If the option is set on any file system that contains the Db2 database, active logs, archive logs, failover logs, or mirrored logs.
After you disable the NOSUID option, remount the file system and then start the Db2 database by running the following command:
db2start

Creating an administrative user

After the formatting of the database and recovery log is completed, you must create an administrative user who can log in to the server and also enable the IBM Storage Protect Operations Center to connect to the server. You use the following commands in a macro to set up an administrative user:
REGISTER ADMIN
The REGISTER ADMIN command takes the following parameters:
register admin administrator_user_id administrator_user_password

The password must meet specific length rules. For more information, see REGISTER ADMIN (Register an administrator ID).

GRANT AUTH
The GRANT AUTH command takes the following parameters:
grant auth administrator_user_id classes=administrator_user_class

For more information, see GRANT AUTHORITY (Add administrator authority).

Complete the following steps to set up an administrative user:
  1. Create a macro, for example, setup.mac.
  2. Edit the macro to register an administrative user and grant system authority to the user, with the following credentials:
    • Administrative user ID: adminadmin
    • Password for the administrative user: adminadmin1
    
    register admin adminadmin adminadmin1
    grant auth adminadmin classes=system
    

    You must create the administrative user with the classes=system option so that the administrative user can create other potential administrative users, for example, with limited privileges. Any of these administrative users can then connect to the IBM Storage Protect Operations Center.

  3. To create the administrative user and grant system authority to this user, run the DSMSERV command with the runfile option and the macro file, for example:
    dsmserv runfile setup.mac
The administrative user can then start the server instance and connect to the server to complete other required steps, such as setting up the database backup.