Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-07217, environment variables

Re: ORA-07217, environment variables

From: Anurag Varma <avdbi_at_hotmail.com>
Date: Sun, 25 Aug 2002 20:03:47 -0400
Message-ID: <umis36hske3icc@corp.supernews.com>


Right ..
my $dbh = DBI->connect('DBI:Oracle:', 'j9850230', 'j9850230')

             or die "Kann nicht zu Datenbank verbinden: " . my $DBI->errstr; should be written as
my $dbh = DBI->connect('DBI:Oracle:TNS_ENTRY', 'j9850230', 'j9850230')

             or die "Kann nicht zu Datenbank verbinden: " . my $DBI->errstr; where if you are running on a local machine TNS_ENTRY can probably be replaced by the ORACLE_SID (not sure)

Please check the dbi documentation. You are better off using DBI's automatic error handling (makes like so much easier).

Anurag

"Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote in message news:jpiimu4520lqj3boomeau650q9o5efgn9q_at_4ax.com...
> On Sun, 25 Aug 2002 20:42:46 +0000 (UTC), Stefan Lintner
> <stefan.lintner_at_wu-wien.ac.at> wrote:
>
> >Hi,
> >
> >I am programming in Perl/CGI and need now access to our Oracle Database
> >(SQL*Plus: Release 9.0.1.0.0, Oracle9i: Enterprise Edition and JServer,
> >Release 9.0.1.0.0).
> >
> >When I try to connect using a very simple Perl/CGI script I get the
> >follwing error message:
> >http://www.wu-wien.ac.at/usr/h98c/h9850230/error.txt
> >
> >Here you can have a look at the source code of my Perl/CGI script:
> >http://www.wu-wien.ac.at/usr/h98c/h9850230/db_test.pl
> >
> >Well, this script runs on one of our new university servers; the
> >environment variables should be set this way and I have already done this:
> >http://www.wu-wien.ac.at/usr/h98c/h9850230/j9850230_oracle_setup.pl
> >
> >
> >Maybe a env. variable is missing? Unfortunately I don't have more
> >information :-|
> >
> >
> >Hope you can help me,
> >
> >thanks a lot,
> >Stefan
>
>
> 7217 is usually generated when ORACLE_SID is missing.
> I don't know what Oracle refers to in DBI:Oracle
> An ORACLE_SID? A servicename in tnsnames.ora?
>
> Maybe you should just rename the server to Gandalf and set the
> ORACLE_SID env var.
>
> Hth
>
>
> Sybrand Bakker, Senior Oracle DBA
>
> To reply remove -verwijderdit from my e-mail address
Received on Sun Aug 25 2002 - 19:03:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US