Gnuhpc
Source: http://www.cnblogs.com/gnuhpc/
1. Level correspondence
environment variables at the operating system level
the DB2 profile registry variables at the operating system and instance levels
the Database Manager (DBM) Configuration file at the instance level
the database (DB) Configuration file at the database level
The DB2 environment consists of the following components:
1) DB2 configuration file Registration Library
2) operating system environment variables
3) DB2 Database Manager configuration Parameters
4) DB2 Database configuration parameters
The DB2 environment is important because it controls the way DB2 operations and activities are done.
1.DB2 Configuration File Registration Library
The DB2 configuration file registry is a DB2-specific variable that affects the management, configuration, and performance of DB2 systems. To make changes to the DB2 Profile registry effective, it is often
You need to stop and restart the instance. The vast majority of DB2 environment settings are controlled by the DB2 configuration file registry. And those settings that are not stored in the profile registry are actions
The environment variables of the system.
DB2 Configuration File Registry scope
1) [E] Indicates the registry that is set for the current session or environment
2) [u] represents the user-level registration library
3) [n] represents the node-level registry
4) [i] represents the instance-level registry
Instance-level configuration parameters affect all databases in the instance and all applications that use the database in that instance.
Instance-level configuration parameters: DB2 get Database Manager config
Configure instance-level configuration parameters: DB2 Update Database Manager configuration using parameter New_value
5) [G] represents the global level registry
2.DB2 Environment
1) System Environment variables:
Most are set up at the time of installation, the more important is:
db2instance--determines the instances that are active in the machine
db2node--determines the partitioning of active databases in a multi-partition environment
Temporary settings are used with export, permanent settings can be set on the relevant files in the system, or can be set in Db2profile or DB2CSHRC. These two files are in your
The. login file will be called. Profile.
2) DB2 profile registries
Most DB2-related information is stored in it, and profile registry variables is often referred to as the registry variables.
It is divided into four categories:
the DB2 instance-level profile Registry:
A variable of an instance
the DB2 global-level profile Registry:
Variables for all instances
the DB2 Instance node-level profile Registry:
Use in a partitioned database environment
the DB2 Instance profile Registry:
Contains all instances of the system. The command db2ilist lists all instances of the system as input.
It is actually stored in a binary file or text file, depending on the operating system.
Db2set-all can see all the DB2 profile registry variables.
There is a level setting before each variable, which can be set with-X:
[i] refers to the DB2 Instance-level profile Registry, setting examples such as: Db2set db2comm=ssl–i myinst
[G] refers to the DB2 Global-level profile Registry, setting examples such as: Db2set db2comm=netbios–g
[E] refers to the environment variable, setting example: Export Set Db2comm=tcpip
Although most variables can be set to environment variables, it is recommended to set the variable to DB2 (using Db2set)
If a variable is set to multiple levels, the system is judged in the following order:
1. Environment variable set using the Set/export operating system commands.
2. DB2 Instance Node-level Profile Registry
3. DB2 Instance-level profile Registry
4. DB2 Global-level profile Registry
3. Configure file registry related actions:
View all existing DB2 profile registries
Db2set-lr
View all DB2 profile registries that have been set up
Db2set-all
Setting up the DB2 configuration file Registration Library
Db2set Db2comm=tcpip
To set the DB2 configuration file registry to multiple values:
Db2set db2comm=tcpip,npipe,local
To remove a variable from the DB2 profile registry and set it to the default value,
Db2set registry_variable =
Set the value of a specific variable (db2instprof in this example) at the global level
Db2set db2instprof= "C:Program filessqllib"-g
Make registry variables effective
You need to stop and start instances (Db2stop and Db2start).
4. Operating system Environment variables
A little, very simple export
5.DB2 Database Manager Configuration Parameters
There are two types of configuration parameters: database level and instance level. The former variables are present in the database Configuration file, and changing these variables only has a shadow on a single database.
Ring. The latter exists in dbm and has an impact on all databases of an instance.
To view the DB2 Database Manager configuration parameters:
DB2 get dbm CFG
The DB2 get dbm CFG Show Detail will display more detailed information.
Update Database Manager configuration parameters (instance level), syntax is
UPDATE DBM CFG USING {YOUR PARAMETER YOUR desired VALUE}
[IMMEDIATE | DEFERRED]
The last optional parameter is the active configuration.
For example:
Update dbm CFG using Intra_parallel YES IMMEDIATE
DB2 Database configuration parameters (database level)
Display Database configuration parameters
DB2 Get DB CFG
How to update database configuration parameters
DB2 Update db CFG using {YOUR PARAMETER YOUR desired VALUE} [IMMEDIATE | DEFERRED]
Note that this command is only one difference from setting parameters at the instance level, but you can rest assured that the parameter names at the instance and database levels will never be the same.
How to set default database configuration parameters
DB2 Reset DB CFG
These operations can also be performed in the control center.
Gnuhpc
Source: http://www.cnblogs.com/gnuhpc/
DB2 Environment settings