> Thutika, Srinivas (ODC - Satyam) wrote:
>>> Hi ,
>>>
>>> I am new to DBI perl programming..
>>>
>>> I am trying to connect to Database as follows..
>>>
>>> #!/usr/bin/perl
>>> print"start \n"print"start \n";
>>> use strict;
>>> use DBI;
>>> my $dbh = DBI->connect('dbi:ODBC:oradsn','qqqqCP', ' wwqwqw ');
>>>
>>> I am getting the follwoing Error....
>>>
>> DBI connect('oradsn','KXBCP',...) failed: [Oracle][ODBC][Ora]Error
>> while trying
>> to retrieve text for error ORA-12154
>>  (SQL-08004)(DBD: db_login/SQLConnect err=-1) at dbop.pl line 6
>
>  This tends to mean you don't have ORACLE_HOME set, or for some reason
> the
> driver can't access it to look up the message (since on Windows it's
> supposed to be able to find the home by itself without having
> ORACLE_HOME set). (Or your install is damaged in some way).

Windows determines ORACLE_HOME using registry settings.  If, for example,
someone installed and uninstalled Oracle 8.1.6 and installed Oracle 8.1.7,
you might have old registry entries that point to the Oracle 8.1.6
installation.

It is a good idea to specify your Oracle home (and note the escaped
backslash).

$ENV{ORACLE_HOME} = "D:\\ORA817";

>  The error is "ORA-12154: TNS:could not resolve service name ", so
> additionally your Oracle network settings are wrong, either in the DSN
> or in tnsnames.ora.
> (none of this is actually to do with DBI, it's all Oracle and ODBC
> setup) --
> Andy Hassall ([EMAIL PROTECTED]) icq(5747695) (http://www.andyh.co.uk)
> Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)

If you will run the perl script on the database server, use the Oracle
driver instead of ODBC.  ODBC performance to Oracle is awful.

Regards,

John


Reply via email to