Home > Articles > Data > DB2

This chapter is from the book

This chapter is from the book

The db2set Command

Registry information is stored in files containing variable names and values. These files should not be edited or manipulated directly. To update registry values, use the db2set command. Any changes made to the values in the registry are applied dynamically, and you do not need to reboot your system for the changes to take effect. The DB2 Profile Registry applies the updated information to the DB2 UDB applications started after the changes are made. For example, if changes are made at the instance level, you must issue a db2stop command to stop the instance followed by db2start.

Using the db2set command with the all option, you can see a list of all of the profile variables set for your environment (Figure 2.35).

02fig35.jpgFigure 2.35. db2set –all, Showing All Current Profile Registry Settings

Notice that the instance-level settings are preceded with an [i], and the global settings are preceded with a [g].

The following are some variations of the db2set command:

To set a parameter for the current instance:

db2set parameter=value
   

To set a parameter's value for a specific instance:

db2set parameter=value -i instance_name
   

where instance_name is the userid of the instance owner.

To set a parameter at the global level:

db2set parameter=value -g
   

To view a list of all variables that can be set in the Profile Registry:

db2set -lr
   

SYSADM authorization is needed to execute the db2set command. Be aware that SYSADM authorization of the DAS instance is needed to update the DB2 global-level Profile Registry (db2set command with the -g option).

  • + Share This
  • 🔖 Save To Your Account