Oracle ошибка 12638

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

I am getting the following error while using linked server in sql to connect and external oracle db

Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "xxxx".
OLE DB provider "OraOLEDB.Oracle" for linked server "xxx" returned message "ORA-12638: Credential retrieval failed".

I am having this issue around 4 out 5 times. So it works only sometimes.

In my case, the test and live oracle DB(external) is on the same physical server with different SID/db instance.

The test connection using OraOLEDB works consistently, it’s the live linked server that’s the problem.

Also to take out the network from equation I tried connecting oracle live from our test environment and oracle test from our live. Connection to oracle test works fine irrespective and live doesn’t.

I can connect to the application fronting the External Oracle DB fine using the live login credentials that are used for the live linked server. So that to me takes the login account out of the question.

Question 1:- Is there any other way to connect to external Oracle DB from either via sql or C#?

I used openrowset as below and get an error:

SELECT *
FROM OPENROWSET('OraOLEDB.Oracle', 'Data Source=external_Oracle_serverIP;Initial Catalog=bbinstance;User id=xxx; Password=xx;',
'SELECT * FROM dbname')

I get the following error

OLE DB provider "OraOLEDB.Oracle" for linked server "(null)" returned message "ORA-12560: TNS:protocol adapter error". Msg 7303, Level 16, State 1, Line 1 Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "(null)".

Question 2: What am I doing wrong above?

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»}}]

The Oracle error ORA-12638 occurs when a client fails to retrieve the credentials from the credential store. This error is related to the authentication of the client to the server. In this guide, we will discuss the possible causes of this error and the steps to troubleshoot it.

Causes of ORA-12638 Error

The main causes of the ORA-12638 error are:

  • Incorrect configuration of the credential store
  • Incorrect username or password
  • Expired or locked account
  • Invalid credentials
  • Incorrect network configuration

Troubleshooting ORA-12638 Error

Here are the steps to troubleshoot the ORA-12638 error:

  1. Verify the Credential Store Configuration

Check if the credential store is configured correctly. The location of the credential store can be found in the sqlnet.ora file. Verify that the credentials are stored in the correct location and that the file is not corrupt.

  1. Verify the Username and Password

Verify that the username and password are correct. Check for typos and make sure that the correct case is used.

  1. Check for Account Expiration or Lockout

If the username and password are correct, check if the account is expired or locked out. To check the account status, run the following query:

SELECT USERNAME, ACCOUNT_STATUS, EXPIRY_DATE
FROM DBA_USERS
WHERE USERNAME='[username]';

If the account is expired or locked out, contact the database administrator to unlock or reset the password.

  1. Verify the Credentials

Verify that the credentials are valid. Test the credentials by connecting to the database using SQL*Plus:

sqlplus [username]/[password]@[database]

If the connection is successful, the credentials are valid. If not, the credentials are invalid.

  1. Verify the Network Configuration

Verify that the network configuration is correct. Check if the hostname and port number are correct in the tnsnames.ora file. Also, check if the listener is running on the server.

Conclusion

The ORA-12638 error occurs when a client fails to retrieve the credentials from the credential store. This error can be caused by incorrect configuration of the credential store, incorrect username or password, expired or locked account, invalid credentials, or incorrect network configuration. By following the troubleshooting steps in this guide, you can resolve the ORA-12638 error and successfully authenticate the client to the server.

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.

Понравилась статья? Поделить с друзьями:
  • Oriel 790 ошибка ash как перепрошить через юсб
  • Oracle ошибка 00936
  • Oracle описание ошибок
  • Origin emu ошибка
  • Oracle лог ошибок