AIX HADR Reconfiguration

The assumption is that we are going to reconfigure an existing HADR replication.

PRIMARY :
   db2 update db cfg for dbname using HADR_LOCAL_HOST ip_addr_primary
   db2 update db cfg for dbname using HADR_LOCAL_SVC port1
   db2 update db cfg for dbname using HADR_REMOTE_HOST ip_addr_standby
   db2 update db cfg for dbname using HADR_REMOTE_SVC port2
   db2 update db cfg for dbname using HADR_REMOTE_INST instancename
   db2 update db cfg for dbname using HADR_SYNCMODE ASYNC
   db2 update db cfg for dbname using HADR_PEER_WINDOW 120
   
STANDBY :
   db2 update db cfg for dbname using HADR_LOCAL_HOST ip_addr_standby
   db2 update db cfg for dbname using HADR_LOCAL_SVC port2
   db2 update db cfg for dbname using HADR_REMOTE_HOST ip_addr_primary
   db2 update db cfg for dbname using HADR_REMOTE_SVC port1
   db2 update db cfg for dbname using HADR_REMOTE_INST instancename
   db2 update db cfg for dbname using HADR_SYNCMODE ASYNC
   db2 update db cfg for dbname using HADR_PEER_WINDOW 120
   
notes: Port antara DC dan DRC berbeda

Find WWN (Worldwide port Name) on AS400 Fiber Card

Here’s how you can find out the WWN of a Fiber Card.

From command line, type WRKHDWRSC *STG

On the Work With Hardware Status page, type option 7 = Display resource detail on DCXX that you want to check.

On the Display Resource Details page, press page down until you find the Word wide port name parameter. Congratulations, WWN has been successfully obtained.

AS400 Trace Connection

Trace Connection (TRCCNN) is used to find out information through a network address (IP or domain).
Here is an example of using Trace Connection on the AS400:

TRCCNN SET(ON) TRCTYPE(IP) TRCTBL(TRCCNN) SIZE(500 MB) TCPDTA(TCP () () *N ‘n.n.n.n’)
…change n.n.n.n with the TCP / IP address (if what we want to trace is the IP) of the remote system that we want. In the TCP / IP data section, enter the specific IP and port you want (local or remote).

The above command is only to turn on Trace Connection, to turn it off you can use the command:

TRCCNN SET(OFF) TRCTBL(TRCCNN) OUTPUT(STMF) TOSTMF(‘/tmp/AnyFileName.pcap’ *YES)
… Replace /tmp/AnyFileName.pcap with the desired IFS path and with a .pcap file format.

To read the results of the trace connection, we can use 3rd party applications such as Wireshark and others.

For more details, see the following IBM web:

Stop and Start HADR Replication on AIX

Stop HADR:

1. Login to Production site as db2 username
2. command: db2 stop hadr on db <dbname>
3. Login to Target site as db2 username
4. command: db2 deactivate db <dbname> (this action not stop your DB2 services)
5. command: db2 stop hadr on db <dbname>

Start HADR:

1. Login to Target site as db2 username
2. command: db2 deactivate db <dbname>
3. command: db2 start hadr on db <dbname> as standby
4. Login to Production site as db2 username
5. command: db2 deactivate db <dbname>
6. command: db2 start hadr on db <dbname> as primary

Logika Bergantung Logistik