Command Reference
Displays, sets, or removes DB2 profile variables. An external
environment registry command that supports local and remote administration,
via the DB2 Administration Server, of DB2's environment variables stored
in the DB2 profile registry.
Authorization
sysadm
Required Connection
None
Command Syntax
>>-db2set----+-------------------+------------------------------>
'-variable=--value--'
>-----+-------------------------------------+---+-------+------->
+--g----------------------------------+ '--all--'
'-+---------------------------------+-'
'--i--instance--+--------------+--'
'-node-number--'
>-----+--------+---+---------------------------------+---------->
'--null--' '--r--instance--+--------------+--'
'-node-number--'
>-----+-------------------------------------------------+------->
'--n--DAS node--+------------------------------+--'
'--u--user--+---------------+--'
'--p--password--'
>-----+-----+---+-----+---+-----+---+----+---------------------><
+--l--+ '--v--' +--ul-+ +--h-+
'--lr-' '--ur-' '--?-'
Command Parameters
- variable= value
- Sets a specified variable to a specified value. To delete a
variable, do not specify a value for the specified variable. Changes to
settings take effect after the instance has been restarted.
- -g
- Accesses the global profile variables.
- -i
- Specifies the instance profile to use instead of the current, or
default.
- node-number
- Specifies a number listed in the db2nodes.cfg
file.
- -all
- Displays all occurrences of the local environment variables as defined
in:
- The environment, denoted by [e]
- The node level registry, denoted by [n]
- The instance level registry, denoted by [i]
- The global level registry, denoted by [g].
- -null
- Sets the value of the variable at the specified registry level to
NULL. This avoids having to look up the value in the next registry
level, as defined by the search order.
- -r instance
- Resets the profile registry for the given instance.
- -n DAS node
- Specifies the remote DB2 administration server node name.
- -u user
- Specifies the user ID to use for the administration server
attachment.
- -p password
- Specifies the password to use for the administration server
attachment.
- -l
- Lists all instance profiles.
- -lr
- Lists all supported registry variables.
- -v
- Specifies verbose mode.
- -ul
- Accesses the user profile variables.
Note: | This parameter is supported on Windows operating systems only.
|
- -ur
- Refreshes the user profile variables.
Note: | This parameter is supported on Windows operating systems only.
|
- -h/-?
- Displays help information. When this option is specified, all other
options are ignored, and only the help information is displayed.
Examples
- Display all defined profiles (DB2 instances):
db2set -l
- Display all supported registry variables:
db2set -lr
- Display all defined global variables:
db2set -g
- Display all defined variables for the current instance:
db2set
- Display all defined values for the current instance:
db2set -all
- Display all defined values for DB2COMM for the current instance:
db2set -all DB2COMM
- Reset all defined variables for the instance INST on node 3:
db2set -r -i INST 3
- Unset the variable DB2CHKPTR on the remote instance RMTINST through the
DAS node RMTDAS using user ID MYID and password MYPASSWD:
db2set -i RMTINST -n RMTDAS -u MYID -p MYPASSWD DB2CHKPTR=
- Set the variable DB2COMM to be TCPIP,IPXSPX,NETBIOS globally:
db2set -g DB2COMM=TCPIP,IPXSPX,NETBIOS
- Set the variable DB2COMM to be only TCPIP for instance MYINST:
db2set -i MYINST DB2COMM=TCPIP
- Set the variable DB2COMM to null at the given instance level:
db2set -null DB2COMM
Usage Notes
If no variable name is specified, the values of all defined variables are
displayed. If a variable name is specified, only the value
of that variable is displayed. To display all the defined values of a
variable, specify variable -all. To display all
the defined variables in all registries, specify -all.
To modify the value of a variable, specify variable=,
followed by its new value. To set the value of a variable to NULL,
specify variable -null.
Note: | Changes to settings take effect after the instance has been restarted.
|
To delete a variable, specify variable=, followed by
no value.
[ Top of Page | Previous Page | Next Page ]