Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / September 2005

Tip: Looking for answers? Try searching our database.

DB2 Federated connection problems

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim V. - 27 Sep 2005 22:17 GMT
Here's the layout:   AIX v5.2,  DB2 v8 fp8  running in 64bit

I've got a Multi-partitioned db running on lpar4 and I want to
connect it to 2 instances running on lpar13.  We'll deal with just
1 instance on lpar13 for now.

lpar4 -> db name dwdb
lpar13 -> db name IBMEDGE

On lpar13, I have a userid that has DBADMIN authority.
ID:  userid    PW: passwd  

Our dba cataloged IBMEDGE on our lpar4 machine with no problems.

I can connect to it from lpar4 with the follwing command:
       db2 connect to IBMEDGE user userid using passwd

Federated part:

(I got this out of the Configuring Federated Data Source manual, so I
 did RTFM  :)  )

I created a  DRDA wrapper with no problems.

   -> create wrapper DRDA library 'libdb2drda.a'  


I then created a server (ran successfully)

 -> create server EDGESRC type DB2/UDB version 8 wrapper DRDA
    authorization "userid" password "passwd"
    options (DBNAME 'IBMEDGE', FOLD_ID 'L', FOLD_PW 'L');

I then created a user_mapping (ran successfully)
  -> create user mapping for userid server EDGESRC
      options (REMOTE_AUTHID 'userid', REMOTE_PASSWORD 'passwd');

When I try to test the connection or create a nickname,  I get a
userid/passwd error (SQL1101N  SQLSTATE=08004).  

The userid/passwd combo work fine when I telnet or do a direct DB2 connect
to it.

The quotes and FOLD options should force it to lowercase.  

Both instances have FEDERATED set to 'YES' in the dbm cfg.  

It would probably be easier to do it in the control center, but IGS has
it blocked by an firewall.

I just can't figure out what why it doesn't like the supplied info.

Signature

Tim.

"Those who give up essential liberties for temporary safety deserve neither
liberty nor safety." - Benjamin Franklin

Tim V. - 29 Sep 2005 05:08 GMT
I figured it out.   Regardless of what you put in the
'create server' part, it doesn't get sent.  When you try
to connect via Federated server, it's sending the OS ID
you are logged in as.   So, if I'm logged in as 'db2inst1',
that's the ID/PWD combo that gets sent, even if I define the
server with a different UID.   I had to create a 'user mapping'
that xlates  'db2inst1' -> 'userid'.

It's not clearly (at least to me) explained in the doc.

Tim.

> Here's the layout:   AIX v5.2,  DB2 v8 fp8  running in 64bit
>
[quoted text clipped - 47 lines]
>
> I just can't figure out what why it doesn't like the supplied info.

Signature

Tim.

"Those who give up essential liberties for temporary safety deserve neither
liberty nor safety." - Benjamin Franklin

Michael Ortega-Binderberger - 30 Sep 2005 22:22 GMT
The userid and pw that you put in the create server
statement are NOT used for normal connections, they are used
for other "misc" stuff (misteriously pointed in:
http://publib.boulder.ibm.com/infocenter/db2help/index.jsp?topic=/com.ibm.db2.ud
b.doc/admin/r0002170.htm


The one that is used is the one you
are currently connected as (if there is no user mapping) or
the user/pw defined in the user mapping.  

Your user mapping is suspect.  It indicates that you have
the same user "userid" on both instances.  What you need is
create user mapping for local_user_id server
...(... 'remote_user_id', ...'remote pw')

Michael

> I figured it out.   Regardless of what you put in the
> 'create server' part, it doesn't get sent.  When you try
[quoted text clipped - 59 lines]
> >
> > I just can't figure out what why it doesn't like the supplied info.

---
Michael Ortega-Binderberger        miki@acm.org, miki@ics.uci.edu
Department of Computer Science     miki@computer.org, m.ortega@ieee.org
U. of Illinois, Urbana-Champaign   http://www-db.ics.uci.edu/~miki
                                  949-824-7231 fax: 949-824-4056
UC Irvine Database Research Group  444 Computer Science,
On loan to the University of       U. of California at Irvine,
California, Irvine (Researcher)    Irvine, CA, 92697-3425
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.