Меню

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,6067 gold badges50 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

46.8k8 gold badges56 silver badges71 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

1172 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

5132 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

1013 silver badges5 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:oracleoraXXnetworkadmin
  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»}}]

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

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.

May 9, 2020

Sometimes You can get “ORA-12638: Credential retrieval failed ” error.

ORA-12638: Credential retrieval failed

Details of error are as follows.

ORA-12638: Credential retrieval failed

Cause: The authentication service failed to retrieve the credentials of a user.

Action: Enable tracing to determine the exact error.

SQLNET.ORA

To solve this problem, change SQLNET.AUTHENTICATION_SERVICES= (NTS) parameter to SQLNET.AUTHENTICATION_SERVICES = (NONE) on sqlnet.ora under $ORACLE_HOME/NETWORK/ADMIN directory.

The old value is as follows.

SQLNET.AUTHENTICATION_SERVICES= (NTS)

The new value should be as follows.

SQLNET.AUTHENTICATION_SERVICES= (NONE)

Do you want to learn more details about RMAN, then read the following articles.

RMAN Tutorial | Backup, Restore and Recovery Tutorials For Beginner Oracle DBA

 1,919 views last month,  1 views today

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

  • Remove From My Forums
  • Question

  • From Windows10 client, I received the error “ORA-12638:
    Credential retrieval failed
    ” when I was trying to establish a connection to Oracle12c database using Oracle12c sqlplus.
    The error occur only when the attempt login, Windows account, is 
    not under the same domain as the database. 

    On Windows7 client, ORA-12638 error NEVER occurs, whether the client and server domains are the same or different. 

     Configuration: 
        — SQLNET.AUTHENTICATION_SERVICES
    is set to NTS

        — Oracle Home user is Local System. 

     Environment (64-bit): 
        — Oracle Client 12.1.0.2 running on Windows 10 Enterprise version  
        — Oracle Database EE
    12.1.0.2 running on Windows Server 2012 R2 Standard version 

    From SQLNet client trace file, Kerberos authentication returned an error in InitializeSecurityContext as shown below.

    naun5authent: SPP is KERBEROS 
    naun5authent: SSPI: 0x80090342 error in InitializeSecurityContext 
    naun5authent: exit 
    naunauthent: exit 
    nau_ccn: get credentials function failed 
    nau_ccn: failed with error 12638 

    I can connect without the error by changing SQLNET.AUTHENTICATION_SERVICES
    to NONE.  However, this workaround is 
    not feasible per my security policy.

    Question:
        1)  Do you have any suggestion/solution on the “SSPI: 0x80090342 error in InitializeSecurityContext” ?
        2)  Is there any difference between Windows 7 and Windows 10 regarding Kerberos authentication ?

Cause: The authentication service failed to retrieve the credentials of a user.

 

Action: Enable tracing to determine the exact error.

The original question was referring to a problem installing Oracle Designer, in which the user was thrown ORA-12638 when testing the connection, before the installation had completed.  

The ORA-12638 is an Oracle database error, indicating that the SQL*Net client was unable to connect to the database.  In Windows, the Oracle Windows client attempt to use your current Windows domain credentials to authenticate you with the Oracle server. This could fail because the Windows box is not configured to support Windows authentication or because the credentials you use to login to your local machine are not sufficient to allow you to login to the server. There are several possible resolutions for the ORA-12638 error:



1:  In on Windows, bounce the server (stop and re-start) the Windows services for Oracle.


2:  The following direction was given, and once administered, was a successful resolution to ORA-12638:

Please change the sqlnet.ora file in the $ORACLE_HOME/network/admin directory. 

Change the following entry:

Change — 

SQLNET.AUTHENTICATION_SERVICES= (NTS)

To: — 

SQLNET.AUTHENTICATION_SERVICES= (NONE)

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Ora 00918 column ambiguously defined ошибка
  • Ora 12560 tns ошибка адаптера протокола как исправить