Please help.
I have installed active state perl along with the DBD
BI drivers for ORACLE via PPM.
I am able to SQLPLUS into the instance from the command prompt, but get a connection error when trying to connect to db. (see bottom of this post)
[blue]
Version Info
perl, v5.6.1 built for MSWin32-x86-multi-thread
Oracle9i Enterprise Edition Release 9.2.0.5.0
Class-DBI [0.96 ] Simple Database
Class-DBI-Oracle [0.51] Extensions to Class:
BI for Oracle
DBD-Oracle [1.12] Oracle database driver for the DBI module
DBIx-OracleLogin [0.02]
DDL-Oracle [1.11] a DDL generator for Oracle
[/blue]
Script results:
[red]
C:/Perl/lib C:/Perl/site/lib . C
erlsiteib
ADO
DBM
ExampleP
File
ODBC
Oracle
Proxy
SybaseDBI connect('cms01','system',...) failed: at C:\CD_BURN\Perl DBI modules\MyScripts\OraTest.pl line 17
Database connection not made: ORA-12154: TNS:could not resolve service name (DBD: login failed) at C:\CD_BURN\Perl DBI modules\MyScripts\OraTest.pl line 17.
[/red]
I have installed active state perl along with the DBD
I am able to SQLPLUS into the instance from the command prompt, but get a connection error when trying to connect to db. (see bottom of this post)
[blue]
Version Info
perl, v5.6.1 built for MSWin32-x86-multi-thread
Oracle9i Enterprise Edition Release 9.2.0.5.0
Class-DBI [0.96 ] Simple Database
Class-DBI-Oracle [0.51] Extensions to Class:
DBD-Oracle [1.12] Oracle database driver for the DBI module
DBIx-OracleLogin [0.02]
DDL-Oracle [1.11] a DDL generator for Oracle
[/blue]
Code:
#!C:\Perl\bin\perl.exe
push(@INC,"C:\Perl\site\lib");
print "@INC \n";
use strict;
use warnings;
use DBI;
my @drivers=DBI->available_drivers();
print join("\n",@drivers);
print "\n";
my $dbh = DBI->connect( 'dbi:Oracle:cms01',
'system',
'password',
) || die "Database connection not made: $DBI::errstr";
$dbh->disconnect;
Script results:
[red]
C:/Perl/lib C:/Perl/site/lib . C
ADO
DBM
ExampleP
File
ODBC
Oracle
Proxy
SybaseDBI connect('cms01','system',...) failed: at C:\CD_BURN\Perl DBI modules\MyScripts\OraTest.pl line 17
Database connection not made: ORA-12154: TNS:could not resolve service name (DBD: login failed) at C:\CD_BURN\Perl DBI modules\MyScripts\OraTest.pl line 17.
[/red]