• No results found

Changing the license information

In document Administration Guide: Implementation (Page 179-187)

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.

Related concepts:

v “License management” on page 30

Changing instances (UNIX only)

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 ensure you understand the instances and database partition servers you have in an instance before attempting to change or delete an instance.

Related concepts:

v “Instance creation” on page 18 Related tasks:

v “Updating instance configuration on UNIX” on page 165 v “Removing instances” on page 168

Related reference:

v “db2iupdt - Update Instances” in the Command Reference

Details on changing instances

Before changing an instance, you should list all of the existing instances.

Listing instances Procedure:

To get a list of all the instances that are available on a system using the Control Center:

1. Expand the object tree until you see the Instances folder.

2. Right-click the Instances folder, and select Add from the pop-up menu.

3. On the Add Instance window, click Refresh.

4. Click the drop-down arrow to see a list of database instances.

5. Click Cancel to exit the window.

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 supported Windows platforms) use:

setdb2instance

Related reference:

v “db2ilist - List Instances” in the Command Reference Updating instance configuration on UNIX

Running the db2iupdt command updates the specified instance by performing the following:

v Replaces the files in the sqllib subdirectory under the instance owner’s home directory.

v If the node type is changed, then a new database manager configuration file is created. This is done by merging relevant values from the existing

database manager configuration file with the default database manager configuration file for the new node type. If a new database manager configuration file is created, the old file is backed up to thebackup subdirectory of thesqllib subdirectory under the instance owner’s home directory.

Procedure:

The db2iupdt command is found in/usr/opt/db2_08_01/instance/ directory on AIX. The db2iupdt command is found in/opt/IBM/db2/V8.1/instance/

directory on HP-UX, Solaris, or Linux.

The command is used as shown:

db2iupdtInstName

TheInstName is the log in name of the instance owner.

There are other optional parameters associated with this command:

v –h or –?

Displays a help menu for this command.

v –d

Sets the debug mode for use during problem determination.

v –a AuthType

Specifies the authentication type for the instance. Valid authentication types are SERVER, SERVER_ENCRYPT, or CLIENT. 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.

v –e

Allows you to update each instance that exists. Those that exist can be shown using db2ilist.

v –u Fenced ID

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 Developer’s Kit. For other DB2 products, this is a required parameter.

Note: Fenced ID may not be “root” or “bin”.

v –k

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:

– Partitioned database server with local and remote clients (DB2 Enterprise - Extended Edition default instance type)

– Database Server with local and remote clients (DB2 Universal Database Enterprise Server Edition default instance type)

– Client (DB2 client default instance type) Examples:

v If you installed DB2 Universal Database Workgroup Server Edition or DB2 Universal Database Enterprise Server Edition after the instance was created, enter the following command to update that instance:

db2iupdt-u db2fenc1 db2inst1

v If you installed the DB2 Connect Enterprise Edition after creating the instance, you can use the instance name as the Fenced ID also:

db2iupdt -u db2inst1 db2inst1

v To update client instances, you can use the following command:

db2iupdtdb2inst1

Related tasks:

v “Removing instances” on page 168 Related reference:

v “db2ilist - List Instances” in the Command Reference v “db2iupdt - Update Instances” in the Command Reference Updating instance configuration on Windows

Running the db2iupdt command updates the specified instance by performing the following:

v Replaces the files in the sqllib subdirectory under the instance owner’s home directory.

v If the node type is changed, then a new database manager configuration file is created. This is done by merging relevant values from the existing

database manager configuration file with the default database manager configuration file for the new node type. If a new database manager configuration file is created, the old file is backed up to thebackup subdirectory of thesqllib subdirectory under the instance owner’s home directory.

Procedure:

The db2iupdt command is found in\sqllib\bin directory.

The command is used as shown:

db2iupdtInstName

TheInstName is the log in name of the instance owner.

There are other optional parameters associated with this command:

v /h: hostname

Overrides the default TCP/IP host name if there are one or more TCP/IP host names for the current machine.

v /p: instance profile path

Specifies the new instance profile path for the updated instance.

v /r: baseport,endport

Specifies the range of TCP/IP ports used by the partitioned database instance when running with multiple partitions.

v /u: username,password

Specifies the account name and password for the DB2 service.

Removing instances Procedure:

To remove an instance using the Control Center:

1. Expand the object tree until you see the instance you want to remove.

2. Right-click the instance name, and select Remove from the pop-up menu.

3. Check the Confirmation box, and click Ok.

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:

1. Stop all applications that are currently using the instance.

2. Stop the Command Line Processor by running db2 terminate commands in each DB2 command window.

3. Stop the instance by running the db2stop command.

4. Back up the instance directory indicated by the DB2INSTPROF registry variable.

On UNIX operating systems, consider backing up the files in the INSTHOME/sqllib directory (where INSTHOME is the home directory of the instance owner). For example, you might want to save the database manager configuration file,db2systm, the db2nodes.cfg file, user-defined functions (UDFs), or fenced stored procedure applications.

5. (On UNIX operating systems only) Log off as the instance owner.

6. (On UNIX operating systems only) Log in as a user with root authority.

7. Issue the db2idrop command:

db2idrop InstName

where 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.

8. (On UNIX operating systems only) Optionally, as a user with root

authority, remove the instance owner’s user ID and group (if used only for that instance). Do not remove these if you are planning to re-create the instance.

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 thesqllib subdirectory under the instance owner’s home directory.

Note: On UNIX operating systems, when attempting to drop an instance using the db2idrop command, a message is generated saying that the sqllib subdirectory cannot be removed, and in the adm subdirectory several files with the .nfs extension are being generated. Theadm subdirectory is an NFS-mounted system and the files are controlled on the server. You must delete the *.nfs files from the fileserver from where the directory is being mounted. Then you can remove thesqllib subdirectory.

Related reference:

v “db2stop - Stop DB2” in the Command Reference v “TERMINATE” in the Command Reference

v “STOP DATABASE MANAGER” in the Command Reference v “db2idrop - Remove Instance” in the Command Reference v “db2ilist - List Instances” in the Command Reference

Changing the node configuration file

If you are planning changes to any database partition groups (adding or deleting partitions, or moving existing partitions), the node configuration file must be updated.

Related concepts:

v “Management of database server capacity” in the Administration Guide:

Performance

Related reference:

v “ADD DBPARTITIONNUM” in the Command Reference

v “DROP DBPARTITIONNUM VERIFY” in the Command Reference

Changing the database configuration file

Procedure:

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 or run db2 autoconfigure with the appropriate

options. 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:

v For database parameters, the first new connection to the database after all applications were disconnected.

v For database manager parameters, the next time you stop and start the instance.

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:

1. Expand the object tree until you see the Databases folder.

2. Right-click the instance or database you want to change, and select Configure Performance Using Wizardfrom the pop-up menu.

3. Click on each page and change information as required.

4. Click on the Results page to review you work and apply any suggested configuration parameters.

5. When you are finished applying updates, click Finish.

To use the Performance Configuration Wizard from the command line, use the AUTOCONFIGURE command.

To change individual parameters in the database manager 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 manager 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.

Related concepts:

v “Benchmark testing” in the Administration Guide: Performance Related tasks:

v “Changing the database configuration across multiple partitions” on page 171

v “Configuring DB2 with configuration parameters” in the Administration Guide: Performance

Related reference:

v “GET DATABASE MANAGER CONFIGURATION” in the Command Reference

v “UPDATE DATABASE MANAGER CONFIGURATION” in the Command Reference

In document Administration Guide: Implementation (Page 179-187)