RE: Remote DB2 connectivity in Perl
- From: dhirendraj@xxxxxxxxxx (Dhirendra Jha)
- Date: Fri, 25 Aug 2006 20:12:25 +0530
Hi,
It gives the following error message:-
DBI connect('DATABASE=hpcindb; HOSTNAME=172.30.0.180; PORT=56000;
PROTOCOL=TCPIP
; UID=hpcinst; PWD=hpcin007pwd;','hpcinst',...) failed: [IBM][CLI Driver]
CLI000
4W Invalid connection string attribute. SQLSTATE=01S00 at Noname1.pl line
13
Connection failed with error: [IBM][CLI Driver] CLI0004W Invalid connection
str
ing attribute. SQLSTATE=01S00 at Noname1.pl line 13.
Regards,
Dhirendra Jha
_____
From: Kellen F Bombardier [mailto:kfbombar@xxxxxxxxxx] On Behalf Of db2perl
Sent: Friday, August 25, 2006 7:55 PM
To: Dhirendra Jha
Cc: dbi-users@xxxxxxxx
Subject: Re: Remote DB2 connectivity in Perl
As the doc from http://search.cpan.org/~ibmtordb2/DBD-DB2-0.80/DB2.pod
states, you can create a connection without a DSN quite easily. Here is a
small example:
#!/usr/bin/perl
use strict;
use DBI;
use DBD::DB2;
my $db = "mydb";
my $hostname = "myhostname";
my $port = 60000;
my $user = "dbuser";
my $pass = "dbpass";
my $string = "dbi:DB2:DATABASE=$db; HOSTNAME=$hostname; PORT=$port;
PROTOCOL=TCPIP; UID=$user; PWD=$pass;";
my $dbh = DBI->connect($string, $user, $pass) || die "Connection failed with
error: $DBI::errstr";
if ($dbh) {
print "Connected\n";
} else {
print "Not Connected\n";
}
"Dhirendra Jha" <dhirendraj@xxxxxxxxxx>
08/24/2006 11:39 PM
To
<dbi-users@xxxxxxxx>
cc
Subject
Remote DB2 connectivity in Perl
Hello Sir/Madam,
I am using the Active Perl for DB2 database automation. My DB2 database is
on Linux system. I want to connect the database from windows machine(without
DSN) using perl. I have installed all the perl module such as DBI, DBD, DB2,
Proxy, JDBC. Please provide me the information about this or it will be
better if you sned me small script for DB2 connectivity.
Regards,
Dhirendra Jha
- References:
- Re: Remote DB2 connectivity in Perl
- From: Db2perl
- Re: Remote DB2 connectivity in Perl
- Prev by Date: Re: Rows returned are out of sync with the request.
- Next by Date: Re: DBD::Oracle 1.18 installation problem
- Previous by thread: Re: Remote DB2 connectivity in Perl
- Next by thread: Oracle 10G Connectivity with DBI and DBD in UNIX
- Index(es):
Relevant Pages
|
|