After DBD::Oracle has been built against a specific version of Oracle
it should continue to be used with that version. So at least ORACLE_HOME
LD_LIBRARY_PATH should be as they were. If you need to support multiple
Oracle installations then it's safest to use multiple DBD::Oracle installations.
Tim.
On Mon, Nov 25, 2002 at 12:31:15PM -0600, Friday, Ken wrote:
> Hi,
>
> Please forgive the quality of this post. I'm new to Perl, DBI and this list server.
>
> I'm working in an Oracle Apps v11.03, partitioned environment. The database is v
>8.1.6, the application tier is using v 8.0.6. The application tier account owns the
>batch scheduling mechanism.
>
> As the database account I'm able to run the code below and successfully connect to
>databases on both local and remote servers.
>
> As the application tier owner I receive the following error:
>
> DBI->connect(voyagerERP4) failed: ERROR OCIEnvInit at ./dbtest.pl line 5
> Can't connect to Oracle database: ERROR OCIEnvInit
>
> Note that I have no problems connecting to these databases via sqlplus foo/bar@<SID>
>
> I (think) I understand that this is a function of the invoking environment and have
>been modifying:
>
> ORACLE_HOME
> PATH
> LD_LIBRARY_PATH
> TWO_TASK
>
> But, I can't seem to figure out the specific variables impacting the script. Has
>anyone experienced this ?
>
>
> #!/bin/perl -w
> use DBI;
> my $db = $ARGV[0];
>
> my $dbh = DBI->connect( "dbi:Oracle:$db", "foo", "bar" )
> or die "Can't connect to Oracle database: $DBI::errstr\n";
> my $stamt = $dbh->prepare("select name from v\$database");
> $stamt->execute();
> my @name = $stamt->fetchrow_array();
> print @name, "\n";
> $stamt->finish;
> $dbh->disconnect
> or warn "Disconnection failed: $DBI::errstr\n";
>
> Thanks
> Ken Friday
> Artesyn Communication Products
> 8310 Excelsior Dr.
> Madison, WI 53717
> 608.826.8229
> [EMAIL PROTECTED]
>