HotMail: Bill [mailto:[EMAIL PROTECTED]] wrote:
> I've got a system running the following:
>
> Perl version v5.6.0 for Apache/1.3.12 (Unix) mod_perl/1.24 mod_ssl/2.6.6
> OpenSSL/0.9.5a
>
> If I run the cgi scripts from command line they connect to the oracle
> database just fine.
>
> If I run them under the webserver (apache::registry), the cannot connect to
> the database.
> ORA-12054 error.
>
> Has anyone seen this before or have an idea on how to track down the
> problem?
> All help will be very appreciated.
>
> Thanks,
> Bill

Do you have the environment setup correctly? To connect from mod_perl I do the
following in my modules:

sub get_database_handle
{
    my ($db_user, $db_pass, $ora_home, $ora_sid) = get_userpass();

    $ENV{ORACLE_HOME} = $ora_home;
    $ENV{ORACLE_SID} = $ora_sid;

    my $dbh = DBI->connect("dbi:Oracle:", $db_user, $db_pass,
        { RaiseError => 1, AutoCommit => 0, PrintError => 0 } )
        or die "unable to connect: $DBI::errstr";

    return $dbh;
}

I looked up ORA-12054 (for my server version) and got:

ORA-12054 cannot set the ON COMMIT refresh attribute for the materialized view
Cause: The materialized view does not satisfy conditions for refresh at commit
time.
Action: Specify only legal options.

which does not make much sense to me.

David Harris
President, DRH Internet Inc.
[EMAIL PROTECTED]
http://www.drh.net/



Reply via email to