Unable to connect to Oracle on another Unix host in a perl programming using DBI
From: Raj Kairam (KairamR_at_coned.com)
Date: 03/23/05
- Next message: Robert Field: "Problem running Perl under Cygwin using Windows native 8.0"
- Previous message: Kevin Carothers: "Re: Anyone getting blank messages from the list?"
- Next in thread: Ron Reidy: "RE: Unable to connect to Oracle on another Unix host in a perl programming using DBI"
- Maybe reply: Ron Reidy: "RE: Unable to connect to Oracle on another Unix host in a perl programming using DBI"
- Reply: David N Murray: "Re: Unable to connect to Oracle on another Unix host in a perl programming using DBI"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 23 Mar 2005 14:25:10 -0500 To: <dbi-users@perl.org>
To those who could help me with a problem connecting to an Oracle database on HP-UX from within a perl script that uses DBI
I have a perl program on a unix (HP-UX) host(A) running Oracle 8.1.6
In the program I am trying to connect to another unix (HP-UX) host(B) running Oracle 8.1.7 holding a table c1dwg.
The perl script that runs on host A contains these lines.
$ENV{'ORACLE_HOME'} = '/u01/app/oracle/product/8.1.6';
$ENV{'ORACLE_SID'} = 'CAD';
use DBI;
$dbh = DBI->connect('dbi:Oracle:Mycad4prod', '<user>', ''<password') || die "Could not connect: $DBI::errstr";
$stmt = "SELECT count(*) from c1dwg";
$sth = $dbh->prepare("stmt") || die "Could not Select: $DBI::errstr";
$sth->execute || die "Could not execute: $DBI::errstr";
$sth->finish;
The tnsnames.ora file on host A specifies 'Mycad4prod', specified in the above perl script, as below
MYCAD4PROD.coned.com =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = m020cad4) (PORT=1521)) )
(CONNECT_DATA =
(SERVICE_NAME = meta817.world) ) )
In the above, m020cad4 is the name of host B that I am trying to connect to from A
ORA-12541: TNS: no listener (DBD ERROR:OCIServerAttach) at < the line number in the program that ran in to the problem
Could not connect: ORA-12541: TNS: no listener .. the same thing as above ..
I stopped and started the listener again but did not help
Could any one help, Please.
Thanks
- Next message: Robert Field: "Problem running Perl under Cygwin using Windows native 8.0"
- Previous message: Kevin Carothers: "Re: Anyone getting blank messages from the list?"
- Next in thread: Ron Reidy: "RE: Unable to connect to Oracle on another Unix host in a perl programming using DBI"
- Maybe reply: Ron Reidy: "RE: Unable to connect to Oracle on another Unix host in a perl programming using DBI"
- Reply: David N Murray: "Re: Unable to connect to Oracle on another Unix host in a perl programming using DBI"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|