db2 client configuration - ghdrako/doc_snipets GitHub Wiki
groupadd -g 999 db2iadm1
groupadd -g 998 db2fadm1
groupadd -g 997 dasadm1
useradd -g db2iadm1 -d /home/db2inst1 -m db2inst1
useradd -g db2fadm1 -d /home/db2fenc1 -m db2fenc1
useradd -g dbasgrp -d /home/dasusr1 -m dasusr1
jako root
/opt/IBM/db2/V9.1/instance/dascrt -u dasusr1
jako db2inst1
/opt/IBM/db2/V9.1/instance/db2icrt -a server -u db2fenc1 db2inst1
su - db2inst1
db2
=> catalog tcpip node dtc1vt remote 172.152.7.6 server 446
=> catalog database dtc1vt as dtc1vt at node dtc1vt
=> list db directory
=> list node directory
=> uncatalog db dtc1vt
=> connect to dtc1vt user b019236
uncatalog node PTC1
uncatalog db DUC7VT
uncatalog node TET1
uncatalog db DTC2VT
uncatalog node TET1A
uncatalog db dtc1vt
uncatalog node RAC2
uncatalog db DPC1VT
--PTC1
catalog tcpip node PTC1 remote 10.152.65.9 server 5023
catalog database DUC7VT as DUC7VT at node PTC1
--TET1
catalog tcpip node TET1 remote 10.152.65.14 server 5021
catalog database DTC2VT as DTC2VT at node TET1
--TET1A
catalog tcpip node TET1A remote 10.152.65.14 server 446
catalog database dtc1vt as dtc1vt at node TET1A
RAC2
catalog tcpip node RAC2 remote 10.152.65.5 server 5023
catalog database DPC1VT as DPC1VT at node RAC2
db2 => list node directory
Node Directory
Number of entries in the directory = 5
Node 1 entry:
Node name = MPWDB2V
Comment =
Directory entry type = LOCAL
Protocol = TCPIP
Hostname = 10.152.68.65
Service name = 446
Node 2 entry:
Node name = PTC1
Comment =
Directory entry type = LOCAL
Protocol = TCPIP
Hostname = 172.152.7.25
Service name = 5023
Node 3 entry:
Node name = RAC2
Comment =
Directory entry type = LOCAL
Protocol = TCPIP
Hostname = 172.152.7.40
Service name = 5023
Node 4 entry:
Node name = TET1
Comment =
Directory entry type = LOCAL
Protocol = TCPIP
Hostname = 172.152.7.6
Service name = 5021
Node 5 entry:
Node name = TET1A
Comment =
Directory entry type = LOCAL
Protocol = TCPIP
Hostname = 172.152.7.6
Service name = 446
-----------------------------------------------------------
db2 => list db directory
System Database Directory
Number of entries in the directory = 5
Database 1 entry:
Database alias = DPC1VT
Database name = DPC1VT
Node name = RAC2
Database release level = f.00
Comment =
Directory entry type = Remote
Authentication = SERVER
Catalog database partition number = -1
Alternate server hostname =
Alternate server port number =
Database 2 entry:
Database alias = DTC1VT
Database name = DTC1VT
Node name = TET1A
Database release level = f.00
Comment =
Directory entry type = Remote
Authentication = SERVER
Catalog database partition number = -1
Alternate server hostname =
Alternate server port number =
Database 3 entry:
Database alias = MPWDB2V
Database name = MPWDB2V
Node name = MPWDB2V
Database release level = f.00
Comment =
Directory entry type = Remote
Authentication = SERVER
Catalog database partition number = -1
Alternate server hostname =
Alternate server port number =
Database 4 entry:
Database alias = DTC2VT
Database name = DTC2VT
Node name = TET1
Database release level = f.00
Comment =
Directory entry type = Remote
Authentication = SERVER
Catalog database partition number = -1
Alternate server hostname =
Alternate server port number =
Database 5 entry:
Database alias = DUC7VT
Database name = DUC7VT
Node name = PTC1
Database release level = f.00
Comment =
Directory entry type = Remote
Authentication = SERVER
Catalog database partition number = -1
Alternate server hostname =
Alternate server port number =
#######################################################################################################################################
Po zmianach
db2 => list db directory
System Database Directory
Number of entries in the directory = 5
Database 1 entry:
Database alias = DPC1VT
Database name = DPC1VT
Node name = DPC1VT
Database release level = f.00
Comment =
Directory entry type = Remote
Catalog database partition number = -1
Alternate server hostname =
Alternate server port number =
Database 2 entry:
Database alias = DTC1VT
Database name = DTC1VT
Node name = DTC1VT
Database release level = f.00
Comment =
Directory entry type = Remote
Catalog database partition number = -1
Alternate server hostname =
Alternate server port number =
Database 3 entry:
Database alias = MPWDB2V
Database name = MPWDB2V
Node name = MPWDB2V
Database release level = f.00
Comment =
Directory entry type = Remote
Authentication = SERVER
Catalog database partition number = -1
Alternate server hostname =
Alternate server port number =
Database 4 entry:
Database alias = DTC2VT
Database name = DTC2VT
Node name = DTC2VT
Database release level = f.00
Comment =
Directory entry type = Remote
Catalog database partition number = -1
Alternate server hostname =
Alternate server port number =
Database 5 entry:
Database alias = DUC7VT
Database name = DUC7VT
Node name = DUC7VT
Database release level = f.00
Comment =
Directory entry type = Remote
Catalog database partition number = -1
Alternate server hostname =
Alternate server port number =
db2 => list node directory
Node Directory
Number of entries in the directory = 9
Node 1 entry:
Node name = DPC1VT
Comment =
Directory entry type = LOCAL
Protocol = TCPIP
Hostname = 1172.152.7.40
Service name = 5023
Node 2 entry:
Node name = DTC1VT
Comment =
Directory entry type = LOCAL
Protocol = TCPIP
Hostname = 10.152.65.14
Service name = 446
Node 3 entry:
Node name = DTC2VT
Comment =
Directory entry type = LOCAL
Protocol = TCPIP
Hostname = 10.152.65.14
Service name = 5021
Node 4 entry:
Node name = DUC7VT
Comment =
Directory entry type = LOCAL
Protocol = TCPIP
Hostname = 10.152.65.9
Service name = 5023
Node 5 entry:
Node name = MPWDB2V
Comment =
Directory entry type = LOCAL
Protocol = TCPIP
Hostname = 10.152.68.65
Service name = 446
Node 6 entry:
Node name = PTC1
Comment =
Directory entry type = LOCAL
Protocol = TCPIP
Hostname = 172.152.7.25
Service name = 5023
Node 7 entry:
Node name = RAC2
Comment =
Directory entry type = LOCAL
Protocol = TCPIP
Hostname = 172.152.7.40
Service name = 5023
Node 8 entry:
Node name = TET1
Comment =
Directory entry type = LOCAL
Protocol = TCPIP
Hostname = 172.152.7.6
Service name = 5021
Node 9 entry:
Node name = TET1A
Comment =
Directory entry type = LOCAL
Protocol = TCPIP
Hostname = 172.152.7.6
Service name = 446