develooper Front page | perl.beginners | Postings from April 2002

Oracle Error while trying to connect to oracle tables

Thread Next
From:
Craig Inman
Date:
April 27, 2002 16:19
Subject:
Oracle Error while trying to connect to oracle tables
Message ID:
000001c1ee41$4a297380$6401a8c0@corp.envoy.com
I have this program that will work for me as I have my environment variables set properly in my .profile. Problem is, this needs to be run by lots of people and I'm trying to avoid having all these people have to change their .profiles to add the Oracle environment variables. Let's just say, some of these people are at level -1 on an AIX box and I don't have root access to make the changes myself.

Here is the part of the program that keeps erroring and below that is the error message I am getting.

        $ENV{'ORACLE_HOME'} = "/u/spool/oracle/product/8.1.7";
        my $sid = $ENV{'ORACLE_SID'};
        my($user,$passwd,$host) = split(/\/\@/, $ENV{'ORACLE_USERID'});
        $user = 'readonly';
        $passwd = 'readonlytest';

        my $dbh = DBI->connect("dbi:Oracle:$sid", $user, $passwd);
        if (!defined($dbh))
        {
            warn "Could not make the connection! $! \n";
            exit 1;
        }

ERROR MSG

DBI->connect() failed: ORA-07217: sltln: environment variable cannot be evaluated. (DBD ERROR: OCISessionBegin) at
 /u/home/cinman/bin/allhistory line 85
Could not make the connection!

I have checked some of the unix/oracle boards, but the only answer I have gotten is to set the variables in the user's .profile. Thought I would check with some of you perl mongers and see if you had run across this and had any other suggestions.

Thanks,
Craig


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About