| Database connection Problem [message #408227] |
Mon, 15 June 2009 06:59  |
f_vinodh Messages: 3 Registered: June 2009 |
Junior Member |
|
|
I tried to connect to database using perl scritping
Please see the Script as follows
$db = 'ctp_db1';
$host = 'tiller.jazz.att.com';
$user = 'ctpadm';
$pass = 'ctp123_';
my $dsn = "DBI:Oracle:SID=$db;HOST=$host";
my $dbh = DBI->connect( $dsn, $user, $pass, { RaiseError => 1 }) or die ( "Couldn't connect to database: " . DBI->errstr );
$dbh->disconnect;
On executing the Script i am getting the error as follows
Can anybody help me to resolve this problem
DBI connect('SID=ctp_db1;HOST=tiller.jazz.att.com','ctpadm',...) failed: ORA-12541: TNS:no listener (DBD ERROR: OCIServerAttach) at ./Sample.pl line 9
|
|
|
| Re: Database connection Problem [message #408231 is a reply to message #408227] |
Mon, 15 June 2009 07:02   |
Michel Cadot Messages: 28986 Registered: March 2007 Location: Nanterre, France, http://... |
Senior Member |
|
|
ORA-12541: TNS:no listener
*Cause: The connection request could not be completed because the listener
is not running.
*Action: Ensure that the supplied destination address matches one of
the addresses used by the listener - compare the TNSNAMES.ORA entry with
the appropriate LISTENER.ORA file (or TNSNAV.ORA if the connection is to
go by way of an Interchange). Start the listener on the remote machine.
Regards
Michel
|
|
|
|
|
|