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 > how to disable HADR in db2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-27-12, 07:24
ravichandrapratap ravichandrapratap is offline
Registered User
 
Join Date: Dec 2010
Posts: 75
how to disable HADR in db2

Hi all,
we had HADR setup on windows, due to some reasons i want to down the standby server , at the same time i want to run primary server.
can anybody provide me procedure to achieve this
Any help can be appreciable..
Reply With Quote
  #2 (permalink)  
Old 01-27-12, 07:28
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
deactivate the database on the standby server
stop hadr on the standby server
stop hadr on the primary server

See the manual for exact command syntax.
__________________
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 01-30-12, 04:40
ravichandrapratap ravichandrapratap is offline
Registered User
 
Join Date: Dec 2010
Posts: 75
Quote:
Originally Posted by Marcus_A View Post
deactivate the database on the standby server
stop hadr on the standby server
stop hadr on the primary server

See the manual for exact command syntax.
Thanku so much Marcus, i tried above commands only, now everything is fine,
Reply With Quote
  #4 (permalink)  
Old 01-30-12, 04:46
ravichandrapratap ravichandrapratap is offline
Registered User
 
Join Date: Dec 2010
Posts: 75
As i am new to HARD,
i have following doubts regarding this

1q) After few days i have to enable HADR again, for this one simply restarting HADR on both the servers is enough or
2q)i have to take backup on primary and restore on standby server
3q)if i have to take backup , it must be online or offline??
Reply With Quote
  #5 (permalink)  
Old 01-30-12, 05:37
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
if the logfiles are still available on primary (archived to disk-tape-tsm) and can be retrieved - you can start hadr on stdby - will do remote catchup and sync
if not
take online backup on primary and restore on stndby - NO ROLLFORWARD todo
db will sync...
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #6 (permalink)  
Old 01-30-12, 05:40
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
In theory, you should be able to start HADR without the need for restore[ assuming - you have not rolled forward the standby ] . But this will mean the standby has to catchup with the primary - with the primary doing the work of retrieving the log files and sending across the network. Depending on how much the primary has changed, this process will take a while.

So, if the database is small, it is easier to do a backup and restore. The backup can be either online or offline.

Alternatively, you can use do "manual" catchup. Just copy the archive logs generated on the primary and issue a ROLLFORWARD command on the standby . Make sure you do not COMPLETE the rollforward. Once the databases are reasonably in sync, then start HADR. The catchup will be quicker.

Cheers
Sathy
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #7 (permalink)  
Old 02-01-12, 15:11
db2mtrk db2mtrk is offline
Registered User
 
Join Date: Nov 2011
Posts: 27
nerver use STOP HADR

hi,
you might find the answer by this time.
However,
Once you use the STOP HADR command on the standby , the db becomes online. which means you can not restart HADR without restoring it.

Never use the STOP HADR command unless you are ready to restore the DB.

mtrk.
Reply With Quote
  #8 (permalink)  
Old 02-01-12, 15:27
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
As far as I rememer, STOP HADR puts the db on standby in rollforward pending state. It requires a rollforward command to bring it online.

As long as the db is in rollforward pending state, it retains all its internal identifiers and therefore can get in sync with the primary if HADR is started.


Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #9 (permalink)  
Old 02-01-12, 16:05
db2mtrk db2mtrk is offline
Registered User
 
Join Date: Nov 2011
Posts: 27
Quote:
Originally Posted by sathyaram_s View Post
As far as I rememer, STOP HADR puts the db on standby in rollforward pending state. It requires a rollforward command to bring it online.

As long as the db is in rollforward pending state, it retains all its internal identifiers and therefore can get in sync with the primary if HADR is started.


Cheers
Sathyaram

Yes, you are right, the SB will be in rollforward pending state (sorry not online). but you can not start the HADR. I have tried this many times. Finally I had to restore it.

Regards, mtrk
Reply With Quote
  #10 (permalink)  
Old 02-01-12, 16:43
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Guy seems to concur with my (above) opinion this thread.

If I remember correctly, I have done the "manual" catch-up I referred in my earlier post when the standby server had crashed and was lagging behind the primary by dozens of logs when it became available.

I could be wrong though. I do not have access to a HADR pair to test.
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #11 (permalink)  
Old 02-02-12, 02:15
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
you can stop hadr as much as you need and sometimes it gets stopped (by bug or network problem) as long as the log files are available somewhere - restore is not needed or should not be..
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #12 (permalink)  
Old 02-02-12, 06:39
ravichandrapratap ravichandrapratap is offline
Registered User
 
Join Date: Dec 2010
Posts: 75
Thanku so much guys for your response, sorry for the late reply...

satyaram_s::Alternatively, you can use do "manual" catchup. Just copy the archive logs generated on the primary and issue a ROLLFORWARD command on the standby . Make sure you do not COMPLETE the rollforward??

Pls can you explain me in detail , which rollforward command i have to prefer for this activity.
Reply With Quote
  #13 (permalink)  
Old 02-02-12, 08:04
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
there is just 1 command : rollforward
see for details : ROLLFORWARD DATABASE
DO NOT specify AND COMPLETE
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #14 (permalink)  
Old 02-02-12, 09:02
ravichandrapratap ravichandrapratap is offline
Registered User
 
Join Date: Dec 2010
Posts: 75
Thanku so much Przytula for your reply,
Can anybody explain difference between HADR_SYNCMODE=SYNC and
HADR_SYNCMODE=NEARSYNC, i already refered to some basic definition of both from IBM site , but i am not getting clear idea.

For my situation (i.e , to stop DR server and after few days again i have to enable HADR)
which one is more suitable(whether HADR_SYNCMODE=SYNC or
HADR_SYNCMODE=NEARSYNC)
Reply With Quote
  #15 (permalink)  
Old 02-02-12, 09:26
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
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