AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systems

Starting the server from the root user ID

The standard way to start the server is from the instance user ID, but the root user ID can be used in some cases. For example, it might be necessary to start the server from the root user ID to access specific devices.

Before you begin

Ensure that the root user ID meets the requirements for starting the server. Follow the instructions in Authorizing root user IDs to start the server. Ensure that access rights and user limits are set correctly. Follow the instructions in Verifying access rights and user limits.

Procedure

  1. Log in by using the root user ID.
  2. Change the .profile file so that the root user ID can run the db2profile script for the instance user ID. Issue the following command:
    . db2_instance_home_directory/sqllib/db2profile
    where db2_instance_home_directory specifies the home directory of the DB2® instance. For example, if the instance name is tsminst1, issue the following command:
    . /home/tsminst1/sqllib/db2profile
  3. Change to the instance directory. For example, if the instance directory is /tsminst1, issue the following command:
    # cd /tsminst1
  4. Start the server instance:
    • To start the tsminst1 server by using the root user ID and run it with the instance user ID, use the -u option:
      # nohup /usr/bin/dsmserv -u tsminst1 -q &
      With this command, the server program runs in the background.
    • To start the tsminst1 server by using the root user ID and run it with the root user ID, issue the following command. If the root user ID is a member of the primary group of instance user IDs, the root user ID has authority to start the database manager.
      # /usr/bin/dsmserv
      The database and log files are written by the instance user ID, not the root user ID. Ensure that the permissions on the database and log directories are set to allow read and write access by the instance user ID.
  5. Optional: Start the server automatically by using the root user ID. Use the script that is provided for starting the server automatically.

    AIX operating systemsHP-UX operating systemsOracle Solaris operating systemsFollow the instructions in Automatically starting AIX, HP-UX, and Solaris servers.

    Linux operating systemsFollow the instructions in Automatically starting Linux servers.