Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DUOW binds in UDB v5.2

0 views
Skip to first unread message

jim.l...@pcsmail.pcshs.com

unread,
Apr 22, 1999, 3:00:00 AM4/22/99
to
We're running UDB v5.2 on AIX 4.2 and are having problems with doing a prep
and bind of a program which accesses two databases (ie. distributed unit of
work). We've cataloged both databases, did a "db2 set client connect 1",
connected to databaseA and issued the following "db2 prep xxxxxx.sqc bindfile
connect 2". The results of this is a warning message saying the tables in
databaseB cannot be found (SQL0204). When we connect to databaseB, the
message is that tables in databaseA cannot be found.

We went ahead and created empty tables in each database corresponding to the
ones highlited as errors, and the binds work in each database.

Can someone tell me the proper steps to take to make this happen without
duplicating the tables from one database to the other?

Thanks....

Jim Lothrop
PCS Health Systems, INC
jim.l...@pcsmail.pcshs.com

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

Douglas Doole

unread,
Apr 23, 1999, 3:00:00 AM4/23/99
to
The Application Programming Guide gives a number of options for this.
The two most common are:
- duplicating tables (like you did)
- write two .SQC files, one for each database and link the resulting
object modules into your application. Starting with two .SQC files
will give you two .BND files. (This is my preferred technique.)
___________________________________________________________________________
Doug Doole
DB2 Universal Database Development
IBM Toronto Labs


Pierre Saint-Jacques

unread,
Apr 24, 1999, 3:00:00 AM4/24/99
to jim.l...@pcsmail.pcshs.com
Jim, there's two ways to resolve this. It is because DB2-UDB validates at bind
time and therefore all objects referenced in the appl. must be present on EACH db
as you biond against each one.
1) Do like you did (errchh!)
2) Build your appl. in modules. a) A general module that will run the SQL agains
db A and which you bind against db A only. b) A second module which contains
ONLY the SQL against db B and which you bind against db B only.
The general module would call the db B module as needed. Both will have to be
bound with the proper parms. for a DUOW process.
HTH, Pierre.
vcard.vcf
0 new messages