Installing Db2 database servers as a non-root user

Most Db2 database products can be installed as a non-root user.

Before you begin

Before you install any Db2 database product as a non-root user, be aware of the differences between root installations and non-root installations, and the limitations of non-root installations. Refer to the Related Links at the end of this topic for details.

A Db2 database product that is installed as a non-root user has the following prerequisites:
  • You must be able to mount the installation DVD, or have it mounted for you.
  • You must have a valid user ID that can be used as the owner of a Db2 instance.

    The User ID used for the Instance Owner has the following restrictions and requirements:

    • Must be in a primary group other than guests, admins, users, and local
    • Can include lowercase letters (a-z), numbers (0-9), and the underscore character ( _ )
    • Cannot be longer than 8 characters
    • Cannot begin with IBM, SYS, SQL, or a number
    • Cannot be a Db2 reserved word (USERS, ADMINS, GUESTS, PUBLIC, or LOCAL), or an SQL reserved word
    • Cannot use any User ID with root privilege.
    • Cannot include accented characters
    • If existing user IDs are specified instead of creating new user IDs, make sure that the user IDs:
      • Are not locked
      • Have passwords that are not locked
  • The hardware and software prerequisites that exist for the product you are installing apply to the non-root user just as they do for root users.
  • Ensure that kernel parameters are updated. On Linux®, kernel parameters are managed automatically for root installation but must be updated manually for non-root installations.
  • On AIX®, Asynchronous I/O (AIO) must be enabled. Enabling I/O Completion Ports (IOCP) is recommended.
  • Your home directory must be a valid Db2 path.
    Db2 installation paths have the following rules:
    • Can include lowercase letters (a-z), uppercase letters (A-Z), and the underscore character ( _ ).
    • Cannot exceed 128 characters.
    • Cannot contain spaces.
    • Cannot contain characters that are other than English characters.
    • The path name cannot be a subdirectory of an existing Db2 installation.
    • The installation paths cannot be symbolic links.

About this task

You do not need to do anything special to install a Db2 database product as a non-root user, other than being logged in as a non-root user.


To install a Db2 database product as a non-root user:

  1. Log in as a non-root user
  2. Install your Db2 database product by using any of the methods available to you.
    Options include:
    • The Db2 Setup wizard (GUI installation)
    • The db2setup command with a response file (silent installation)
      Note: Since non-root users cannot choose the directory where Db2 database products are installed, any FILE keyword in your response file is ignored.
    Refer to the Related Links at the end of this topic for details.
  3. Open a new login session to use the non-root Db2 instance after the Db2 database product is installed.
    Alternatively, you can use the same login session if you set up the Db2 instance environment with $HOME/sqllib/db2profile (Bourne shell and Korn shell) or $HOME/sqllib/db2chsrc (C shell), where $HOME is the non-root user's home directory.

What to do next

After the Db2 database product is installed, verify your operating system user process resource limits (ulimits). If the minimum ulimit values are not met, the Db2 engine can encounter unexpected operating resource shortage errors. These errors can lead to a Db2 database system outage.