Following are the steps I performed for connecting to DB2 from PERL

I downloaded DBD-DB2.zip from the following

http://www.activestate.com/PPMPackages/zips/6xx-builds-only/

Then I extracted the zip to lib directory.

The I did a ppm install DB2.ppd in the directory where DB2.ppd is lying.


When I execute 

use DBI;
@driver_names = DBI->available_drivers;

it gives DB2 as a driver.

Then I tried connecting to the database with the following string

$dsn= "DBI:DB2:database=DEVDAS01;host=DB2InstalledServer;port=50000";
$user = "me";
$password = "mypass";


$dbh = DBI->connect($dsn, $user, $password,
                      { RaiseError => 1, AutoCommit => 0 });  
                      
it returns an error
"DBI->connect(database=DEVDAS01;host=DB2InstalledServer;port=50000) failed: 
[IBM][CLI Driver] CLI0124E  Invalid argument value. SQLSTATE=HY009 at
available_DB.pl line 9"                     



Can anyone help me know what went wrong?

Thanks

Ramesh Krishnan
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/listinfo/activeperl

Reply via email to