On 05/10/11 17:09, Scott Stansbury wrote:
Folks,

I could use a tip or lead with the following issue:

I have a Windows Server 2008 R2 box with Oracle Instant Client 11.2, with the 
SQL*Plus and ODBC modules installed. No other Oracle software is installed.

I am connecting to an Oracle 10g instance. The following SQL*Plus works:

sqlplus 
user/passwd@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.15.200)(PORT=1535)))(CONNECT_DATA=(SID=PROD77))).

The perl script that contains the following does not:

use DBI;

# Oracle / Remedy info

my $oracle_sid = "PROD77";
my $oracle_host = "10.128 192.15.200:1535";

my $oracle_userid = "user";
my $oracle_passwd = "passwd";
################

my $dsn = "Driver={Oracle in 
instantclient_11_2};server=$oracle_host;sid=$oracle_sid";

my $dbh = DBI->connect("dbi:ODBC:$dsn", "$oracle_userid", "$oracle_passwd");

It returns (after a few seconds) with an ORA-12154 error: TNS:could not resolve 
the connect identifier specified ( SQL-08004).

Thanks for any help...

Scott...






Have you created an ODBC DSN for the connection?

I use the following settings (on Linux) but most of these you should be able to 
set in the create data source part of the odbc administrator if you select the 
oracle driver:

[OracleODBC-11g]
Application Attributes=T
Attributes=W
BatchAutocommitMode=IfAllSuccessful
BindAsFLOAT=F
CloseCursor=F
DisableDPM=F
DisableMTS=T
Driver=Oracle 11g ODBC driver
DSN=OracleODBC-11g
EXECSchemaOpt=
EXECSyntax=T
Failover=T
FailoverDelay=10
FailoverRetryCount=10
FetchBufferSize=64000
ForceWCHAR=F
Lobs=T
Longs=T
MetadataIdDefault=F
QueryTimeout=T
ResultSets=T
ServerName=//xxx.easysoft.local/name_of_sid
SQLGetData extensions=F
Translation DLL=
Translation Option=0
DisableRULEHint=T
UserID=bet
StatementCache=F
CacheBufferSize=20

Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com

Reply via email to