DB2 10.5 for Linux, UNIX, and Windows

Default instance

As part of your DB2® installation procedure, you can create an initial instance of the database manager. The default name is DB2_01 in Version 9.5 or later releases.

On Linux and UNIX, the initial instance can be called anything you want within the naming rules guidelines. The instance name is used to set up the directory structure.

To support the immediate use of this instance, the following registry variables are set during installation:
  • The environment variable DB2INSTANCE is set to DB2_01.
  • The registry variable DB2INSTDEF is set to DB2_01.
These settings establish "DB2" as the default instance. You can change the instance that is used by default, but first you have to create an additional instance.

Before using the database manager, the database environment for each user must be updated so that it can access an instance and run the DB2 database programs. This applies to all users (including administrative users).

On Linux and UNIX operating systems, sample script files are provided to help you set the database environment. The files are: db2profile for Bourne or Korn shell, and db2cshrc for C shell. These scripts are located in the sqllib subdirectory under the home directory of the instance owner. The instance owner or any user belonging to the instance's SYSADM group can customize the script for all users of an instance. Use sqllib/userprofile and sqllib/usercshrc to customize a script for each user.

The blank files sqllib/userprofile and sqllib/usercshrc are created during instance creation to allow you to add your own instance environment settings. The db2profile and db2cshrc files are overwritten during an instance update in a DB2 fix pack installation. If you do not want the new environment settings in the db2profile or db2cshrc scripts, you can override them using the corresponding user script, which is called at the end of the db2profile or db2cshrc script. During an instance upgrade (using the db2iupgrade command), the user scripts are copied over so that your environment modifications will still be in use.

The sample script contains statements to:
  • Update a user's PATH by adding the following directories to the existing search path: the bin, adm, and misc subdirectories under the sqllib subdirectory of the instance owner's home directory.
  • Set the DB2INSTANCE environment variable to the instance name.