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 > Script to bounce HADR servers

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-06-07, 16:44
nivasreddy007 nivasreddy007 is offline
Registered User
 
Join Date: Jun 2007
Posts: 66
Script to bounce HADR servers

Can anyone give me hints to write a script to bounce HADR servers i.e both the primary and standby..We need to stop hadr on standby,stophadr on primary,stop db2 on both ,start db2 on both and finally bring HADR up between them sync.


I was having trouble in communicating the HADR status between the two servers.


Thanks in advance
Reply With Quote
  #2 (permalink)  
Old 08-07-07, 01:02
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
The standby server must be in rollforward pending state at all times, so you cannot stop HADR on the standby unless you want to rebuild it from a restore of a backup of the primary when you bring the standby instance back up.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 08-07-07, 02:13
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
If you are certain the databases are in synch after a restart, you might try this command to get the standby in roll forward pending state. See the Command Reference manual:

db2rfpen - Reset rollforward pending state

However, if you can restart the standby while HADR is still running, then that would be best since it will catch up even if it is behind when restarted. I think it "may be" OK to stop HADR on the primary (but not the standby) when restarting the instances. "May be" means that I have not tested this and there are no guarantees, since this is based on my recollection of having worked with HADR last year.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #4 (permalink)  
Old 08-07-07, 13:27
nivasreddy007 nivasreddy007 is offline
Registered User
 
Join Date: Jun 2007
Posts: 66
Hi Marcus,

We can stop HADR on standby and we have been doing that.We have been doing the following steps manually to bounce a HADR DB

1)Stop HADR on standby and then on primary

2)Stop DB2

3)Start DB2

4)Start HADR on standby and then on primary


I want to automate the above steps.Any tips would be appreciated

Thanks
Srini
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