If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > HADR takeover from standby server results in a error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-30-08, 13:22
italianboy italianboy is offline
Registered User
 
Join Date: Jun 2007
Posts: 6
HADR takeover from standby server results in a error

Hi, I'm experiencing a problem testing hadr feature:

I've set up HADR on primary (X1) and standby (X2) servers.
Successfully have switched roles. Have tried to work with DB. Everything worked fine, but when I tried to switch roles again (to make X1 primary) i got an error message: "SQL1770N Takeover HADR cannot complete. Reason code = "4" (The command was issued against a standard or HADR primary database.)", however I am absolutely certain that I am issueing this on the standby machine.

So, could You help me, please, how to make X1 primary again.

P.S. TAKEOVER HADR ... BY FORCE ain't working also. (the same error)
Reply With Quote
  #2 (permalink)  
Old 01-30-08, 14:54
Kota Kota is offline
Registered User
 
Join Date: Jun 2003
Posts: 113
Check to see the roles of the databases on both sides by doing a
db2 get db cfg for DBNAME| grep -i hadr

Check to see if replay is happening,
db2 list applications | grep -i db2replay (on standby)

On both sides run netstat to see if connection is established
netstat -a | grep -i hadr

db2 list utilities on standby should show the db in rollforward recovery.

db2pd -hadr -alldbs gives lot of details like loggapavg ... Also check the db2diag.log.

If hadr roles on both sides show as primary, then they are in splitbrain mode. You have t os ync them up and restart HADR.

Start HADR on standby and see. Activate the database on primary.
Otherwise try doing stop HADR on primary followed by standby and restart and try. If they are in splitbrain, each thinks its primary and u have to restart from the beginning.


From db2pd, make sure they r in peer mode
Reply With Quote
  #3 (permalink)  
Old 02-05-08, 10:30
italianboy italianboy is offline
Registered User
 
Join Date: Jun 2007
Posts: 6
Re: Hadr

Thank you for your help. The problem was that, I was trying to access standby database using Control Center and I was automatically rerouted to primary database, so I was unable to run the TAKEOVER BY FORCE command.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On