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 > Trying to set up HADR

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-03-05, 14:36
ugrasena ugrasena is offline
Registered User
 
Join Date: Mar 2005
Posts: 40
Exclamation Trying to set up HADR

Hi team I installed db2 ESE on windows with version 8.1.0.36, in the note i see that i need to change the HADR_LOCAL_HOST parameters where to find this configs.
Reply With Quote
  #2 (permalink)  
Old 11-03-05, 18:53
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Here some instructions I worked up after confguring HADR myself:

Add the following to /etc/services on Primary Server:
hadrinstp 18819/tcp

Add the following to /etc/services on Standby Server:
hadrinsts 18819/tcp

Note: Each DB2 database that uses HADR on a given physical server needs its own port for hadr_local_svc.


On Primary Server:
db2 update db cfg using LOGARCHMETH1 DISK:/localhome/db2inst1/archive_logs
Note: This enables log retain, but you can set other config parms to enable log retain. Make sure the directory already exists.

db2 BACKUP DATABASE <db-name> TO "/db_backup" COMPRESS WITHOUT PROMPTING
(backup to whatever directory you want)

On Standby Server:
restore the backup on the secondary server:
db2 RESTORE DATABASE <db-name> FROM "/db_backup/" TAKEN AT 20051101173309 replace history file
Note: do not rollforward. ON Windows, you must copy the entire backup directory path to the standby server to do a restore.

On Primary Server:
db2 update db cfg for <db-name> using HADR_LOCAL_HOST <primary host name>
db2 update db cfg for <db-name> using HADR_REMOTE_HOST <secondary host name>
db2 update db cfg for <db-name> using HADR_LOCAL_SVC 18819
db2 update db cfg for <db-name> using HADR_REMOTE_SVC 18819
db2 update db cfg for <db-name> using HADR_REMOTE_INST db2inst1
db2 update db cfg for <db-name> using HADR_SYNCMODE nearsync
db2 update db cfg for <db-name> using HADR_TIMEOUT 30
db2 update alternate server for database <db-name> using hostname <secondary host name> port 50000

On Standby Server:
db2 update db cfg for <db-name> using HADR_LOCAL_HOST <secondary host name>
db2 update db cfg for <db-name> using HADR_REMOTE_HOST <primary host name>
db2 update db cfg for <db-name> using HADR_LOCAL_SVC 18819
db2 update db cfg for <db-name> using HADR_REMOTE_SVC 18819
db2 update db cfg for <db-name> using HADR_REMOTE_INST db2inst1
db2 update db cfg for <db-name> using HADR_SYNCMODE nearsync
db2 update db cfg for <db-name> using HADR_TIMEOUT 30
db2 update alternate server for database <db-name> using hostname <primary host name> port 50000


On Standby (always start standby first):
db2 start hadr on db <db-name> as standby

On Primary (only after standby is started):
db2 start hadr on db <db-name> as primary

Takeover:
Issue this command on the standby server instance:

db2 TAKEOVER HADR ON DATABASE <db-name> USER db2inst1 BY FORCE
Note: “BY FORCE” is optional and not necessary if both servers are responding).

Wizard:
Or you can use the HADR Wizard to set it up. This is invoked via the Control Center, Database (right click), High Availability.
__________________
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 11-07-05, 10:43
ugrasena ugrasena is offline
Registered User
 
Join Date: Mar 2005
Posts: 40
Hi there i right clicked on the Database in the control center and i dont see High availability option, how to check if Hadr is installed with 8.0 ese

Thank you
Ugra
Reply With Quote
  #4 (permalink)  
Old 11-07-05, 11:07
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
You need DB2 V8.2. You can download and install FP10 and that will bring you up to the latest release (8.2.3).
__________________
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
  #5 (permalink)  
Old 11-08-05, 11:49
ugrasena ugrasena is offline
Registered User
 
Join Date: Mar 2005
Posts: 40
Thank you marcus that was very helpful

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