Default Port Range


To enable Fast Communications Manager (FCM), a port or port range must be reserved in the services file on each server in the partitioned database system. At a minimum, the services file must contain one entry for each database partition within a particular server. The services file is located as follows :

  • On Linux and UNIX : /etc/services

  • On Windows : c:\winnt\system32\drivers\etc\services

You can define DB2 port entries using one of the following formats; however, format #2 is recommended:

Format #1 : Define a group of port names with a port range:

  port_name                           port_number   ---------                           -----------   DB2_v8inst                          60000/tcp   DB2_v8inst_END                      60003/tcp  

Format #2 : Define a specific port name and port range to a database partition:

  port_name                           port_number   ---------                           -----------   DB2_v8inst                          60000/tcp   DB2_v8inst_1                        60001/tcp   DB2_v8inst_2                        60002/tcp   DB2_v8inst_END                      60003/tcp  

where:

port_name is the name of the partitioned instance. For the first port entry, the port name must be the name of the instance (v8inst), preceded by DB2_. In this example, the first port name is DB2_v8inst. For the second port entry or subsequence port entry, the port name must be the name of the instance, preceded by DB2_ and suffixed by _n, where n is incremented by 1. In this example, the second port name is DB2_v8inst_1, and the third port name is DB2_v8inst_2. For the last port entry, the port name must be the name of the instance, preceded by DB2_ and suffixed by _END. In this example, the last port entry is DB2_v8inst_END.

port_number is the port number that you reserve for database partition server communications. For best practices, reserve one port number for each database partition per server (host name).

  • Same port must be reserved on all servers

  • Must be followed by /tcp

NOTE

To avoid conflict with other applications, it is recommended to use high values for DB2 port numbers and reserve a few extra ports for future growth.


Sample db2nodes.cfg and /etc/services Configuration

Let's look at some following db2nodes.cfg files, using the rules described above.

Scenario 1

Two servers, one database partition per server, two ports have been reserved:

  cat db2nodes.cfg   0                        server1                  0   1                        server2                  0   cat /etc/services  grep db2inst1   DB2_db2inst1             60000/tcp   DB2_db2inst1_END         60001/tcp  
Scenario 2

Two servers, two database partitions per server, four ports have been reserved. Because there are multiple database partitions on the same server, the first port number must start at 0 and continue by 1 for each server:

  cat db2nodes.cfg   0                        server1                  0   1                        server1                  1   2                        server2                  0   3                        server2                  1   cat /etc/services  grep db2inst1   DB2_db2inst1             60000/tcp   DB2_db2inst1_1           60001/tcp   DB2_db2inst1_2           60002/tcp   DB2_db2inst1_END         60003/tcp  
Scenario 3

Three servers, two database partitions on server1, two database partitions on server2, and one database partition on server3, five ports have been reserved:

  cat db2nodes.cfg   0                        server1                  0   1                        server1                  1   2                        server2                  0   3                        server2                  1   4                        server3                  0   cat /etc/services  grep db2inst1   DB2_db2inst1             60000/tcp   DB2_db2inst1_1           60001/tcp   DB2_db2inst1_2           60002/tcp   DB2_db2inst1_3           60003/tcp   DB2_db2inst1_END         60004/tcp  
Scenario 4

Single Windows server name IBM-N2VQMD9FCEA, four database partitions, four ports have been reserved.

  cat c:\sqllib\db2\db2nodes.cfg   0                  IBM-N2VQMD9FCEA    IBM-N2VQMD9FCEA    0   1                  IBM-N2VQMD9FCEA    IBM-N2VQMD9FCEA    1   2                  IBM-N2VQMD9FCEA    IBM-N2VQMD9FCEA    2   3                  IBM-N2VQMD9FCEA    IBM-N2VQMD9FCEA    3   more c:\winnt\system32\drivers\etc\services\db2nodes.cfg  grep i db2   DB2_DB2            60000/tcp   DB2_DB2_1          60001/tcp   DB2_DB2_2          60002/tcp   DB2_DB2_END        60003/tcp  
Scenario 5

Two Windows servers, four database partitions on server IBM-N2VQMD9FCEA and two database partitions on server IBM-Y2KQMD9FCEB, six ports have been reserved.

  cat c:\sqllib\db2\db2nodes.cfg   0                      IBM-N2VQMD9FCEA       IBM-N2VQMD9FCEA        0   1                      IBM-N2VQMD9FCEA       IBM-N2VQMD9FCEA        1   2                      IBM-N2VQMD9FCEA       IBM-N2VQMD9FCEA        2   3                      IBM-N2VQMD9FCEA       IBM-N2VQMD9FCEA        3   4                      IBM-Y2KQMD9FCEB       IBM-Y2KQMD9FCEB        0   5                      IBM-Y2KQMD9FCEB       IBM-Y2KQMD9FCEB        1   more c:\winnt\system32\drivers\etc\services\db2nodes.cfg  grep i db2   DB2_DB2                60000/tcp   DB2_DB2_1              60001/tcp   DB2_DB2_2              60002/tcp   DB2_DB2_3              60003/tcp   DB2_DB2_4              60004/tcp   DB2_DB2_END            60005/tcp  


Advanced DBA Certification Guide and Reference for DB2 UDB v8 for Linux, Unix and Windows
Advanced DBA Certification Guide and Reference for DB2 Universal Database v8 for Linux, UNIX, and Windows
ISBN: 0130463884
EAN: 2147483647
Year: 2003
Pages: 121

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net