Re: Not able to connect - But the db2 client utility is working fine
- From: "Martin" <martin.j.evans@xxxxxxxxx>
- Date: 23 Jan 2007 05:56:28 -0800
riderchap@xxxxxxxxx wrote:
Hi,
From an AIX box, I am trying to connect to a DB2 (UDB) database withina Perl script using DBI module and DB2 driver. The connect( ) comand
throws the error "Total Environment allocation failure! Did you set up
your DB2 client environment?". But I am able to connect to the data
source though the DB2 client utility "db2".
This DB2 client utility is working
bash$ db2 connect to MYDBSOUCE user MYID
but this is not working from a Perl script.
DBI->connect("dbi:DB2:MYDBSOURCE", "MYID", "MYPASSW", {RaiseError =>
1});
Also the call "DBI->available_drivers()" is returning the DB2 driver
but "DBI->data_sources( 'DB2' )" is returning nothing.
What could be the issue, any help greatly appreciated.
Thank you,
Kannan
Kannan,
Are you really running the db2 client command (which works) and your
Perl script as the same user in the same environment? I suspect you are
not as you need to set DB2INSTANCE which is most likely set when you
login as the db2 instance user.
Martin
PS. You have posted via google groups and so your post is only seen by
people using google groups. Had you joined the dbi-users list properly
your post would have been seen by many more DBI experts. You can join
the dbi-users list at http://dbi.perl.org.
.
- Follow-Ups:
- Re: Not able to connect - But the db2 client utility is working fine
- From: riderchap@xxxxxxxxx
- Re: Not able to connect - But the db2 client utility is working fine
- References:
- Not able to connect - But the db2 client utility is working fine
- From: riderchap@xxxxxxxxx
- Not able to connect - But the db2 client utility is working fine
- Prev by Date: most drivers share error variable for sth/dbh handles?
- Next by Date: RE: bind variable problem
- Previous by thread: Not able to connect - But the db2 client utility is working fine
- Next by thread: Re: Not able to connect - But the db2 client utility is working fine
- Index(es):
Relevant Pages
|
|