Adding database partition servers to an instance (Windows)
On Windows, use the db2ncrt command to add a database partition server to an instance.
About this task
Note: Do not use the db2ncrt command
if the instance already contains databases. Instead, use the START
DBM ADD DBPARTITIONNUM command. This ensures that the database
is correctly added to the new database partition server. DO NOT
EDIT the
db2nodes.cfg file, since changing the
file might cause inconsistencies in the partitioned database environment.The command has the following required parameters:
db2ncrt /n:partition_number
/u:username,password
/p:logical_port- /n:partition_number
- The unique database partition number to identify the database partition server. The number can be from 1 to 999 in ascending sequence.
- /u:username,password
- The logon account name and password of the Db2® service.
- /p:logical_port
- The logical port number used for the database partition server if the logical port is not zero (0). If not specified, the logical port number assigned is 0.
The logical port parameter is only optional
when you create the first database partition on a computer. If you
create a logical database partition, you must specify this parameter
and select a logical port number that is not in use. There are several
restrictions:
- On every computer there must be a database partition server with a logical port 0.
- The port number cannot exceed the port range reserved for FCM communications in the services file in %SystemRoot%\system32\drivers\etc directory. For example, if you reserve a range of four ports for the current instance, then the maximum port number would be 3 (ports 1, 2, and 3; port 0 is for the default logical database partition). The port range is defined when db2icrt is used with the /r:base_port, end_port parameter.
There are also several optional parameters:
- /g:network_name
- Specifies the network name for the database partition server. If you do not specify this
parameter, Db2
uses the first IP address it detects on your system.
Use this parameter if you have multiple IP addresses on a computer and you want to specify a specific IP address for the database partition server. You can enter the network_name parameter using the network name or IP address.
- /h:host_name
- The TCP/IP host name that is used by FCM for internal communications if the host name is not the local host name. This parameter is required if you add the database partition server on a remote computer.
- /i:instance_name
- The instance name; the default is the current instance.
- /m:computer_name
- The computer name of the Windows workstation on which the database partition resides; the default name is the computer name of the local computer.
- /o:instance_owning_computer
- The computer name of the computer that is the instance-owning computer; the default is the local computer. This parameter is required when the db2ncrt command is invoked on any computer that is not the instance-owning computer.
For example, if you want to add a new database
partition server to the instance TESTMPP (so that you are running
multiple logical database partitions) on the instance-owning computer
MYMACHIN, and you want this new database partition to be known as
database partition 2 using logical port 1, enter:
db2ncrt /n:2 /p:1 /u:my_id,my_pword /i:TESTMPP
/M:TEST /o:MYMACHIN