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

Oracle Error while trying to connect to oracle tables

Thread Next
Craig Inman
April 27, 2002 16:19
Oracle Error while trying to connect to oracle tables
Message ID:
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;


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.


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About