Home » RDBMS Server » Networking and Gateways » Database connection Problem (Oracle : 10g : solaris)
Database connection Problem [message #408227] Mon, 15 June 2009 06:59 Go to next message
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 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
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
Re: Database connection Problem [message #408256 is a reply to message #408231] Mon, 15 June 2009 08:16 Go to previous messageGo to next message
f_vinodh
Messages: 3
Registered: June 2009
Junior Member
Thanks very much it is working fine

Regards
Vinodh
Re: Database connection Problem [message #408294 is a reply to message #408256] Mon, 15 June 2009 11:22 Go to previous messageGo to next message
babuknb
Messages: 1736
Registered: December 2005
Location: NJ
Senior Member


Thanks for the feedback.

Babu
Re: Database connection Problem [message #408465 is a reply to message #408256] Tue, 16 June 2009 05:48 Go to previous message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
The rest of the topic has been splitted in Open Database Interfaces forum with the name "Perl script: issue with dates".

Regards
Michel
Previous Topic: Promlem in Listener in oracle
Next Topic: dbdesigner
Goto Forum:
  


Current Time: Thu Mar 28 06:19:01 CDT 2024