Some time after a database design has been implemented, a change to the database design may be required. You should reconsider the major design issues that you had with the previous design. You should pay particular attention to the following:
Before you make changes affecting the entire database, you should review all the logical and physical design decisions. For example, when altering a table space, you should review your design decision regarding the use of SMS or DMS storage types. (See Designing and Choosing Table Spaces.)
As part of the management of licenses for your DB2 products, you may find that you have a need to increase the number of licenses. You can use the License Center within the Control Center to check usage of the installed products and increase the number of licenses based on that usage.
Instances are designed to be as independent as possible from the effects of subsequent installation and removal of products.
In most cases, existing instances automatically inherit or lose access to the function of the product being installed or removed. However, if certain executables or components are installed or removed, existing instances do not automatically inherit the new system configuration parameters or gain access to all the additional function. The instance must be updated.
If DB2 is updated by installing a Program Temporary Fix (PTF) or a patch, all the existing DB2 instances should be updated using the db2iupdt command. You should also update the Administration Server (DAS) using the dasiupdt command.
You should ensure you understand the instances and database partition servers you have in an instance before attempting to change or delete an instance.
To get a list of all the instances that are available on a system using the
Control Center:
|
To get a list of all the instances that are available on a system using the command line, enter:
db2ilist
To determine which instance applies to the current session (on OS/2 or supported Windows platforms) use:
set db2instance
Running the db2iupdt command updates the specified instance by performing the following:
The db2iupdt command is found in the instance subdirectory in the version and release subdirectory (the exact name varies by operating system).
The command is used as shown:
db2iupdt InstName
The InstName is the log in name of the instance owner.
There are other optional parameters associated with this command:
Displays a help menu for this command.
Sets the debug mode for use during problem determination.
Specifies the authentication type for the instance. Valid authentication types are SERVER, CLIENT, DCS, or DCE. If not specified, the default is SERVER, if a DB2 server is installed. Otherwise, it is set to CLIENT. The authentication type of the instance applies to all databases owned by the instance.
On UNIX operating systems, DCE is not a valid the authentication type.
Allows you to update each instance that exists and can be shown using db2ilist.
Names the user under which the fenced user-defined functions (UDFs) and stored procedures will execute. This is not required if you install the DB2 client or the DB2 Software's Developer Kit. For other DB2 products, this is a required parameter.
Note: | FencedID may not be "root" or "bin". |
This parameter preserves the current instance type. If you do not specify this parameter, the current instance is upgraded to the highest instance type available in the following order:
Examples:
db2iupdt -u db2fenc1 db2inst1
db2iupdt -u db2inst1 db2inst1
db2iupdt db2inst1
To remove an instance using the Control Center:
|
To remove an instance using the command line, enter:
db2idrop <instance_name>
The preparation and details to removing an instance using the command line are:
db2idrop InstNamewhere InstName is the name of the instance being dropped.
This command removes the instance entry from the list of instances and removes the instance directory.
This step is optional since the instance owner and the instance owner group may be used for other purposes.
The db2idrop command removes the instance entry from the list of instances and removes the sqllib subdirectory under the instance owner's home directory.
You must consider which environment variables (if any) need to be changed on your particular operating system. If any environment variables are changed and you are not on a UNIX platform, you need to restart the system for the new environment variables to take effect. Review whether you should reset the profile registry variables in the Global Profile registry before altering your database. You can then reset the profile registry variables to those that are best suited to the new database environment. If only profile registry variables have been changed, the system does not need to be restarted.
If you are planning changes to any nodegroups (both adding or deleting nodes, or moving existing nodes), you should see Chapter 29, Scaling Your Configuration Through Adding Processors for details on what should be done.
If you are planning changes to the database, you should review the values for the configuration parameters. Some of the values can be adjusted from time to time as part of the ongoing changes made to the database based on how it is used.
To change the database configuration, use the Performance Configuration Wizard in the Control Center. This wizard helps you tune performance and balance memory requirements for a single database per instance by suggesting which configuration parameters to modify and providing suggested values for them.
Note: | If you modify any parameters, the values are not updated until:
|
In most cases the values recommended by the Performance Configuration Wizard will provide better performance than the default values, because they are based on information about your workload and you own particular server. However, note that the values are designed to improve the performance of, though not necessarily optimize, your database system. Think of them as a starting point on which you can make further adjustments to obtain optimized performance.
To change the database configuration using the Control Center:
|
To change the database configuration using the command line, enter:
UPDATE DBM CFG FOR <database_alias> USING <config_keyword>=<value>
You can update one or more <config_keyword>=<value> combinations in a single command. Most changes to the database configuration file become effective only after they are loaded into memory. For a server configuration parameter, this occurs during the running of the START DATABASE MANAGER command. For a client configuration parameter, this occurs when the application is restarted.
To view or print the current database manager configuration parameters, use the GET DATABASE MANAGER CONFIGURATION command.
See Chapter 31, Benchmark Testing and Chapter 32, Configuring DB2 for details on how to refine your system by benchmarking, and to configure your system.
For multiple partitions: When you have a database that is partitioned across more than one partition, the configuration file should be the same on all database partitions. Consistency is required since the SQL compiler compiles distributed SQL statements based on information in the local node configuration file and creates an access plan to satisfy the needs of the SQL statement. Maintaining different configuration files on database partitions could lead to different access plans, depending on which database partition the statement is prepared. Use db2_all to maintain the configuration files across all database partitions.