473,722 Members | 2,242 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HADR and Databases with default db container paths

Pat
Hi -

We're trying to set up an HADR pair on two databases on instances with
different names on separate servers. The databases were defined as
follows:

CREATE DATABASE database1 ON '/db2home/instanceA';

CREATE DATABASE database2 ON '/db2home/instanceB';

Are the resulting container paths for USERSPACE1 considered relative?

Can HADR be set up between the two?

Thanks in advance!

Mar 15 '07 #1
3 2850
"Pat" <pa********@yah oo.comwrote in message
news:11******** *************@y 80g2000hsf.goog legroups.com...
Hi -

We're trying to set up an HADR pair on two databases on instances with
different names on separate servers. The databases were defined as
follows:

CREATE DATABASE database1 ON '/db2home/instanceA';

CREATE DATABASE database2 ON '/db2home/instanceB';

Are the resulting container paths for USERSPACE1 considered relative?

Can HADR be set up between the two?

Thanks in advance!
I can't tell you that you will definitely have a problem (depending on what
statements/commands you submit that are attempted to be replicated), but all
paths should be the same on both primary and standby server. Otherwise, you
are asking for big trouble.
Mar 15 '07 #2
Yes, HADR can be set up between two such databases.

For simplicity, we recommend that the two sides of an HADR pair be set
up as identically as possible. However, the actual restrictions are
somewhat looser than that. Certainly you can have different users/
instance names, host names, and db paths.

HADR does require that tablespace container path names match (i.e.,
that the container path used on the primary also exists on the
standby). This is not explicitly verified by HADR, but replication
will fail if the necessary path is not found during an attempt to
replay a container operation on the standby.

If you use relative container paths, i.e., default container paths or
explicit relative container path names (path *not* starting with "/"
on UNIX/Linux nor with a drive letter on Windows), the full container
path includes the db path as a prefix, and that part need not be the
same on primary and standby. What needs to exist on both sides is any
part of the path name supplied by the user during container creation,
either the relative path that will follow the db path, or the full
explicit path name (if starting with "/" or a drive letter).

Regards,
- Steve P.
--
Steve Pearson, DB2 for Linux, UNIX, and Windows, IBM Software Group
"Portland" Development Team, IBM Beaverton Lab, Beaverton, OR, USA

Apr 9 '07 #3
"Steve Pearson (news only)" <st*******@my-deja.comwrote in message
news:11******** **************@ e65g2000hsc.goo glegroups.com.. .
Yes, HADR can be set up between two such databases.

For simplicity, we recommend that the two sides of an HADR pair be set
up as identically as possible. However, the actual restrictions are
somewhat looser than that. Certainly you can have different users/
instance names, host names, and db paths.

HADR does require that tablespace container path names match (i.e.,
that the container path used on the primary also exists on the
standby). This is not explicitly verified by HADR, but replication
will fail if the necessary path is not found during an attempt to
replay a container operation on the standby.

If you use relative container paths, i.e., default container paths or
explicit relative container path names (path *not* starting with "/"
on UNIX/Linux nor with a drive letter on Windows), the full container
path includes the db path as a prefix, and that part need not be the
same on primary and standby. What needs to exist on both sides is any
part of the path name supplied by the user during container creation,
either the relative path that will follow the db path, or the full
explicit path name (if starting with "/" or a drive letter).

Regards,
- Steve P.
There is a problem with using different instance names in a HADR pair. If
you have a C UDF (supplied by IBM) that is invoked by an SQL Stored
Procedure, then DB2 will not find the UDF on the standby database because
the library for such functions will be in a different path name (in the
instance path). Strangely enough, I the UDF was executed outside of the SP
(in a regular SQL statement), there is no problem (maybe it only affects
statically bound statements).

There may also be some other similar combinations of UDF's or SP's that
might cause a problem, especially if any of them are using static SQL.

I opened an PMR on this about a year ago, but I solved it myself by copying
over the DB2 library with the C code to a directory on the standby with the
instance name of the primary. Of course, this is only a stop gap measure,
and makes upgrading FP's a problem.

The initial version of the HA scripts for TSA supplied with DB2 required
that instance names be different for an HADR pair, but I believe that is not
the case anymore if you have TSA 2.1 and the latest 8.1 FP (or 9.1). Of
course, if you don't use TSA, then it never was a problem to make the
instances the same.
Apr 9 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
5247
by: m0002a | last post by:
I have sucessfully set up an HADR pair of databases. Everthing works fine for the primary and secondary HADR databases, and manual takeover works fine. When I try to set up the second pair of databases for HADR in the same instance, I get the following error message (I already sucessfully started the standby database): $ db2 start hadr on db tdsapp as primary SQL1768N Unable to start HADR. Reason code = "99".
6
1813
by: Mark A | last post by:
I found this in the doc: "HADR does not replicate stored procedure and UDF object and library files. You must create the files on identical paths on both the primary and standby databases. If the standby database cannot find the referenced object or library file, the stored procedure or UDF invocation will fail on the standby database." I am using XML Extender which is implemented by IBM via some C stored procs. My HADR servers are...
1
1427
by: Mark A | last post by:
Please update the DB2 documentation as follows: The DB2 Data Recovery and High Availability Guide and Reference clearly states that tablespace paths (or relative paths) must be the same on both primary and standby databases so that DDL statements (for containers) can be correctly replicated. However, it is also necessary to make the instance paths the same on both severs (even though TSA requires the instance names to be different on...
7
10599
by: Mark A | last post by:
If server 01 running HADR in the primary role crashes, and the DBA does a HADR takeover by force on the 02 server to switch roles, then the 02 server is now the primary. What happens when the Server 01 is brought back up? It still thinks it is the primary because that was its role when it crashed and it does not know about the takeover by force command that was issued. Does the 01 server check the 02 server to see what role they are in...
16
21785
by: gumby | last post by:
I'm having trouble getting HADR to work with the sample databases on two HS20 xSeries blades, Red Hat ES4 up3, DB2 8.2.4, getting the following error. SQL1768N Unable to start HADR. Reason code = "7" - The primary database failed to establish a connection to its standby database within the HADR timeout interval. What things should I check besides the remote host and remote service parameters on the standby database, which seem to be...
6
4086
by: RayRay | last post by:
I was hoping I might be able to get an answer regarding DB2 and HADR. Let me preface this by saying that I know very little about networking and I'm not familiar with the HADR product or clustering. But, I've been asked to research a couple issues for a client. They are thinking about implementing HADR. They have DB2 production databases running on more than one box. Does a liscense for HADR need to be purchased for each production box...
0
1021
by: vbace2 | last post by:
DB2 v9.1 (fixpak 2) on Windows I am currently trying to move our primary database to a faster server. I am also trying to set it up on HADR (where the standby will also be on a new, faster server). We are a 24/7 shop, and I was hoping to avoid an outage. I was hoping to set up HADR from the current server to the new server. Once that was done, I was hoping to switch roles, turn off HADR, and then turn it back on again with the primary...
2
5177
by: paul | last post by:
Hi, I have two databases in hadr, this morning i issued a "takeover ... by force" because the normal takeover didn't worked. Now i have two standard databases, and if i try to put the old primary database in standby mode i can't but it's not in rollforward pending state. How can i put this database in rollffoward pending state without backup/restore from the new primary dabatase ?
0
2437
by: deshaipet | last post by:
Hi - We have primary and standby databases on different servers. Here is my /etc/service entry for HADR pair : On Primary : "vi /etc/services
0
8738
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9381
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9151
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8042
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6680
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5994
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4501
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4762
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2146
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.