Mark,

This sounds like a problem related to the permissions of the user running
the script from the web server.  The oerr info for this error indicates:

12638, 00000, "Credential retrieval failed"
// *Cause:  The authentication service failed to retrieve the credentials
of a
//          user.
// *Action: Enable tracing to determine the exact error.

There is likely something slightly off with the setup of your oracle
network configuration files that is preventing the connection from being
established for the user that is running the script from the web user.
Enabling tracing for oracle connections is likely the only way to
identify the cause of the problem, which is probably somewhere in
sqlnet.ora, listener.ora, or tnsnames.ora.

One simple possibility (albeit unlikely) is the capitalization of the
server name in your connect line.  You could try changing the connect to:

>       $dbh = DBI->connect("dbi:Oracle:NIRVANA", "system", "umntest") or
> die "Cannot Connect";


A search on metalink for this error indicates another possible solution
for this problem:

Solution Description:
=====================
Comment out the Sqlnet.Authentication_services = (NTS) in client
"sqlnet.ora".

Solution Explanation:
=====================
By removing the authentication request parameter in the "sqlnet.ora" file
for the client, a direct SQL*Plus connection can be made.


Oracle networking can be very tricky to get setup correctly, and there are
many possible problems that could cause this error.

chris

On Fri, 3 May 2002, Oklak, Mark A wrote:

> ORA-12638   DBI->connect(nirvana) failed: ORA-12638: Credential retrieval
> failed (DBD ERROR: OCIServerAttach)
>
> Can anyone help me with the above error message?  (Environment describe
> below.)
>
> I am trying to run this Perl script.  MAOtestORA.pl
> At this point I'm just trying to get the connect to work, not trying to do
> anything with the data retrieved.
>
>       #!/usr/local/bin/perl
>       use DBI;
>       use CGI::Form;
>       use CGI::Carp qw(carpout);
>       carpout(STDOUT);
>       $dbh = DBI->connect("dbi:Oracle:nirvana", "system", "umntest") or
> die "Cannot Connect";
>       my $sth = $dbh->prepare("SELECT * FROM NIRVANA.FORMUSER");
>       $sth->execute;
>       my @row;
>       @row = $sth->fetchrow_array();
>       print <<EOF
>       Content-Type: text/html
>       Cache-Control: max-age=120
>
>       <HTML>
>       <HEAD>
>       <TITLE>Connect to Oracle with CGI Example</TITLE>
>       </HEAD>
>       <BODY>
>
>       <H3><   B>Connecting to Oracle ...</B></H3>
>
>       </BODY>
>       </HTML>
>       EOF
>
> I can run this script at the command prompt without a problem.
>
 [snip]
>
> I can link to other CGI-Perl scripts from a browser without a problem - as
> long as they don't try to connect to Oracle
>
> I can run SQL*Plus and SQL*Worksheet on this data base with this user/pwd
> with no problem

Reply via email to