Ora 12638 credential retrieval failed ошибка

I have a legacy VB6 application which I’ve inherited. The issue I’m facing is that I’m getting the infamous

ORA-12638: Credential retrieval failed

error message whenever it tries to connect to one of our Oracle databases. I can connect fine from SQLPlus and Toad, however. I’ve Googled around and everyone seems to say that modifying their sqlnet.ora file to

SQLNET.AUTHENTICATION_SERVICES=(NONE)

did the trick. I have yet to find anyone with an alternative fix. Here is what my connection string looks like:

"PROVIDER=OraOLEDB.Oracle;DATA SOURCE=(DESCRIPTION = " & _
"(ADDRESS = (PROTOCOL = TCP)(HOST = server1)
(PORT = 1521))" & _
"(ADDRESS = (PROTOCOL = TCP)(HOST = server2)
(PORT = 1521))" & _
"(LOAD_BALANCE = yes) " & _
"(CONNECT_DATA = " & _
"(SERVER = DEDICATED) " & _
"(SERVICE_NAME = database_name_here) " & _
") " & _
"); " & _
"User Id=username_here;Password=password_here;"

As for my VB code, it’s quite simple.

Private oracleDatabaseConnection As ADODB.Connection

Set oracleDatabaseConnection = New ADODB.Connection
oracleDatabaseConnection.Open oracleConnectionString

Anyone have any ideas?

Thank you. :)

asked Dec 18, 2008 at 20:37

Mike's user avatar

I know this is a very old post but I have found a solution that has worked for me (Legacy VB6 Application):

Change the following entry in the sqlnet.ora file:

Original Entry - SQLNET.AUTHENTICATION_SERVICES= (NTS)

Modified Entry - SQLNET.AUTHENTICATION_SERVICES= (NONE)

Here is a LINK to the solution

answered Jun 13, 2012 at 16:20

Mark Kram's user avatar

Mark KramMark Kram

5,6727 gold badges51 silver badges70 bronze badges

2

Honestly this is one of those errors that can be caused by lots of different root problems.

On the assumption your database server is Windows, check its event log, both System and Application. You may find something there that is useful.

I have encountered this error in some cases because the account under which the Oracle service was running got locked.

I have also encountered it in cases where we never found the explanation, but we were always able to clear up the issue by having the user lock and unlock their PC.

Is the VB application running on a different machine than the client that can connect? If so, is it possible to test using a different client program on the same machine — or is it possible to try the VB application on your machine?

answered Dec 19, 2008 at 14:25

Dave Costa's user avatar

Dave CostaDave Costa

47.3k8 gold badges57 silver badges72 bronze badges

3

Know it’s an old question but it has started appearing with the recent Windows update.
The way to easily solve it is to set

SQLNET.AUTHENTICATION_SERVICES= (NONE)

in the sqlnet.ora.

answered May 21, 2018 at 14:21

Manulak's user avatar

ManulakManulak

1173 silver badges9 bronze badges

If you are running a web app under IIS, restarting IIS seem to help. But this is one sucker of an issue that has not much reasoning behind.

answered Jan 20, 2010 at 21:48

user209612's user avatar

user209612user209612

111 silver badge1 bronze badge

I installed Oracle Database 11g Express Edition 32-bit on Windows 10 professional 64-bit (spanish edition).

After restart PC all works ok.
But the next day I get error using SQL*PLus and SQLTools 1.9 build 15:

 ORA-12638: Credential retrieval failed

I modified the sqlnet.ora file so:

SQLNET.AUTHENTICATION_SERVICES= (NONE)

and now I can connect using SQLPlus, SQLTools 1.9 build 15.

answered Nov 28, 2018 at 17:32

alvalongo's user avatar

alvalongoalvalongo

5313 silver badges11 bronze badges

If using IIS and for a VB app, it may help to create a new Data Source in the ODBC manager and referencing it by name (instead of by provider) in the connection string.

For example, if the name for the Data Source is «test_ds», I would replace

ObjConn.open "Provider=MSDAORA;User ID=myuser;password=mypassword;Data Source=MYDATASOURCEFROMTNSNAMES;Persist Security Info=False"

for

ObjConn.open "dsn=test_ds;pwd=mypassword"

Can’t really explain the logic behind the solution, but it worked for me.

answered Jan 18, 2021 at 18:36

Aurinxki's user avatar

AurinxkiAurinxki

1111 silver badge6 bronze badges

Note also that Windows client connections can fail with this error, when using Windows Hello login.

Whatever windows authentication for a connect like:
sqlplus un/pw@Dev

failed with ora-12638, when I logged into my laptop with Face recognition (ie. using Hello)
To get around this, either set SQLNET.AUTHENTICATION_SERVICES = (NONE)
or just login with your tradition windows username and password.

answered May 12, 2022 at 6:23

aliT's user avatar

Problem

This technote explains why the error, ORA-12638: Credential retrieval failed, might occur when opening an IBM® Rational® RequisitePro® Oracle based project.

Cause

The full error message is as follows:

ORA-12638: Credential retrieval failed
- Oracle SQL*Net error
- Unable to connect to datasource

This error can be caused by incorrect configuration of the Oracle client sqlnet.ora file.

Resolving The Problem

To resolve this issue perform the following:

  1. Locate the sqlnet.ora file on the client system which is by default stored in:

    C:\oracle\oraXX\network\admin
  2. Locate the following entry:

    SQLNET.AUTHENTICATION_SERVICES= (NTS)
  3. Replace the original entry with the following:

    SQLNET.AUTHENTICATION_SERVICES= (NONE)

[{«Product»:{«code»:»SSSHCT»,»label»:»Rational RequisitePro»},»Business Unit»:{«code»:»BU053″,»label»:»Cloud & Data Platform»},»Component»:»Database: Oracle»,»Platform»:[{«code»:»PF033″,»label»:»Windows»}],»Version»:»2003.06.13;2003.06.14;2003.06.15;2003.06.16;7.0;7.0.0.1;7.0.1″,»Edition»:»»,»Line of Business»:{«code»:»LOB45″,»label»:»Automation»}}]

ORA-12638: Credential retrieval failed in Oracle 19c

Error: ORA-12638: Credential retrieval failed

While connecting SQLPLUS sys@servicename AS SYSDBA will throw the error ORA-12638.

Refer to the article: https://docs.oracle.com/en/database/oracle/oracle-database/21/nfcon/windows-authentication-no-longer-uses-ntlm-by-default-355195897.html

For Microsoft Windows installations with AUTHENTICATION_SERVICES=NTS, starting with this release, the SQLNET.NO_NTLM parameter setting in the sqlnet.ora file will default to TRUE. In previous releases, the default for this parameter was FALSE. NTLM is the Windows Networks LAN Manager authentication service.

With NTS value, the oracle use window domain username/password, that user is not authenticated to login into your Oracle Server.

Solution: To overcome this error we have to update the Client-side SQLNET.ora file by disabling the authentication_service or No_NTLM solutions Choose either of the following:

SQLNET.NO_NTLM=FALSE

OR 

SQLNET.AUTHENTICATION_SERVICES=NONE

Posted by Pavan DBA on May 19, 2010

Hi Friends, today i faced very nasty situation in establishing network connection with Oracle database.

I created a user as per request from application team and i got response that they are not able to connect. when analyzing i found tnsping is not working.

I started looking at tnsnames.ora and compared that with what is there in server and its same. so as next step i looked at SQLNET.ORA file and added following line to make sure both the machines are in same domain

NAMES.DEFAULT_DOMAIN = klpcph.local

Still nothing worked. Then i tried telnet from client machine and realized that 1521 port is blocked at firewall level.

Once firewall team provided access, tnsping worked but it throwed ORA-12638 : credential retrieval failed error

I found following line in sqlnet.ora file

SQLNET.AUTHENTICATION_SERVICES= (NTS)

Then i modified the above line as below and it started working

SQLNET.AUTHENTICATION_SERVICES= (NONE)

Reason : 

Oracle client attempt to use your current Windows domain credentials to authenticate you with the Oracle server. This could fail for a couple of reasons:

– The Oracle server is not configured to support Windows authentication
– The credentials you use to login to your local machine are not sufficient to allow you to login to the server.

In my case, it was the later. This failed because I was logged on to my local machine using my normal domain credentials rather than my administrator account. 

This entry was posted on May 19, 2010 at 5:14 PM and is filed under Networking with Oracle.
Tagged: credentials retrieval failed, ora-12638. You can follow any responses to this entry through the RSS 2.0 feed.

You can leave a response, or trackback from your own site.

You like unexpected changes and surprises, don’t you? And especially those which aren’t in the patch notes or the docs. I blogged about such changes a few weeks ago. And thanks to the people reading this blog, I learned now about another change with Oracle 19.10.0 on the Windows platform. You may receive now an ORA-12638 on Windows only from Oracle 19.10.0 onwards.

What has been changed?

So at first, thanks to Ernst and Marcus for bringing this to my attention. This is an issue which happens on MS Windows only.

When you have SQLNET.AUTHENTICATION_SERVICES=NTS in your sqlnet.ora, then you may see now ORA-12638: Credential retrieval failed when you for instance select over a database link. Or it happens simply when you try to connect from the client using sqlplus user/pw@servicename.

When you’d do a SQLnet trace, you would spot this message: NO_NTLM set, not local conn, not actively falling back to NTLM even if server might not support kerberos. And this points to the solution. NTLM is the Windows Networks LAN Manager authentication service. Access to it has been disabled by default due to a security fix. So NO_NTLM=TRUE is now the standard from 19.10.0 on for Windows systems.

How to solve it?

I hope you don’t have too many clients.

You will need to set this in your client-side sqlnet.ora:

SQLNET.NO_NTLM=FALSE

Then everything should work as it has been worked before.

Further Questions?

As many of you commented already, I have not more information about this issue – and especially no further advice. I would like to ask you to open SRs and check with Oracle Support for further guidance as I don’t have the chance to test with all the different client options and possibilities. Thanks!

Further Links and Information

  • MOS Note: 2757734.1 – Windows: While Connect to  Database Getting ORA-12638 After Applying Jan 2021 WINDBBP 19.10.0.0.210119
  • New Parameters in Oracle 19.10.0 – and a default change

–Mike

Понравилась статья? Поделить с друзьями:
  • Openvpn ошибка сертификата
  • Openvpn ошибка аутентификации
  • Openvpn ошибка tls error
  • Openvpn ошибка openssl
  • Ora 12571 ошибка