I am running DB2 v8.1 FP 16 (Db2 v8.2.9) and I am implementing HADR using 2 sample databases between 2 identical servers (AIX 5.3).
Checking on DB2 Control Center everything seems to be ok, both are in peer mode, and after issuing the commands on primary I have:
b2hawk@hawk:/home/db2hawk:>db2pd -hadr -alldbs
Database Partition 0 -- Database SAMPLE -- Active -- Up 0 days 00:12:19 -- Date 04/21/2008 11:28:49
HADR Information:
Role State SyncMode HeartBeatsMissed LogGapRunAvg (bytes)
Primary Peer Nearsync 0 0
ConnectStatus ConnectTime Timeout
Connected Mon Apr 21 11:16:32 2008 (1208794592) 120
LocalHost LocalService
hawk DB2_HADR_7
RemoteHost RemoteService RemoteInstance
ELMER2 DB2_HADR_8 db2hawk
PrimaryFile PrimaryPg PrimaryLSN
S0000002.LOG 0 0x0000000001B58000
StandByFile StandByPg StandByLSN
S0000002.LOG 0 0x0000000001B58000
-----------
On the standby database I have:
db2hawk@elmer2:/home/db2hawk/scripts:>db2pd -hadr -alldbs
Database Partition 0 -- Database SAMPLE -- Active -- Up 3 days 20:52:15 -- Date 04/21/2008 11:28:41
HADR Information:
Role State SyncMode HeartBeatsMissed LogGapRunAvg (bytes)
Standby Peer Nearsync 0 0
ConnectStatus ConnectTime Timeout
Connected Mon Apr 21 11:16:32 2008 (1208794592) 120
LocalHost LocalService
ELMER2 DB2_HADR_8
RemoteHost RemoteService RemoteInstance
hawk DB2_HADR_7 db2hawk
PrimaryFile PrimaryPg PrimaryLSN
S0000002.LOG 0 0x0000000001B58000
StandByFile StandByPg StandByLSN
S0000002.LOG 0 0x0000000001B58000
-------------
Also I inserted couple rows on SAMPLE db on the PRIMARY side and after stopping HADR on STANDBY side I was able to browse and see those rows using control center.
I issued the command db2 list utilities on SATNDBY side and I got:
db2hawk@elmer2:/home/db2hawk/scripts:>db2 list utilities
ID = 10
Type = ROLLFORWARD RECOVERY
Database Name = SAMPLE
Partition Number = 0
Description = Database Rollforward Recovery
Start Time = 04/17/2008 14:36:26.764314
--------------
I have 2 major issues:
1) I would like to stop (and I did it) HADR on either both side oir standby side and try to acces it..I can access it via Control Center but not from db2 connect command on CLP. Also I would like to have this database in STANDARD mode so that I could use it ...
But it doesn't work, every time I try to connect to got the message saying that it is not allowed in HADR mode etc
2) I would like to be able to switch roles or take over but it always failes woth the same error:
SQL01770 Reason Code 4 (and I tried from both side on Control Center)
Please help me
Thanks