Error connecting Oracle - ORA-12638: Credential retrieval failed - oracle

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?

When I've encountered this issue, it's because of the following line in sqlnet.ora:
SQLNET.AUTHENTICATION_SERVICES= (NTS)
This causes Oracle to attempt to use Windows Native Authentication Services.
If Oracle cannot authenticate via this method, you'll get the 12638 error. To troubleshoot, change this line to
SQLNET.AUTHENTICATION_SERVICES= (NONE)
and repeat your test to the live database.

Oracle 12c & Above:
Sometimes, there are chances that 2 Oracle Pluggable DB services running under different root databases can run with same listener creating this chaos. Check and stop (if not Prod) unwanted PDB and try connecting to the required DB.

Related

Export Database connection to Oracle Developer

I have a database Connection established in odbcad and Microsoft Access (aswell as working in Excel) via ODBC and want to also get it working in Oracle SQL developer.
It is a Windows SQL Server as far as i know and I have tried several Settings, of which None works. I have also installed Driver for ODBC. I would like to Import Settings into SQL developer as applied in MS Access, is there any possibility?
No, SQL Developer is a Java application and uses a JDBC driver.
But if you look at the odbc properties for your connection, those should largely translate to what you need to define a basic connection.
Oracle:
Server name or IP address of the DB, port # for the listener, and the name of the SID or Service, plus a valid username and password is all you need to connect to Oracle.
What error do you get when you try to connect?
Show us what you're trying.
Update:
You're trying to connect to SQL Server but you're getting"
Native SSPI library not loaded
You're trying to use OS Authentication for your connection. For this to work with the jTDS driver, you need to copy a DLL file named ntlmauth.dll (which is for NT authentication) under the jtds-x.x.x-dist\x86\SSO\ or jtds-x.x.x-dist\x64\SSO\, to any directories in the PATH environment.
Please update your question such that's it's clear you're connecting to SQL Server and share the error message so others can find it.
I imagine this question is a duplicate of many previous iterations of the same challenge.

Error when adding Oracle DB to ODBC connection

Hi everyone here,
I am pretty new to Oracle DB configurations as I have been using SAS and Microsoft SQL all this while.
What i want to do is to add Oracle DB to ODBC(64-bit) in a new server.
This is the scenario:
Server A:- Existing Application server that has Oracle configured in ODBC(64-bit)(Been using for the past 3 years, configured by other people).
Server DB:- The Database server
Server B:- Brand new server that i want to configure Oracle DB in ODBC(64-bit)(Brand new).
I copy every single details of the server information in Server A ODBC for the same Oracle DB and put it in Server B ODBC. I have both Server A and Server B remote connection side by side and do "Test Connection".
Server A can connect successfully. However, Server B is giving me this error:
SQLState=08004
This is my first time trying to configure for ODBC to Oracle DB. I have previously configured many Microsoft SQL DB without any issue. Do take note that i have not installed any Oracle driver or any necessary-tool needed for ODBC to link with Oracle as i do not know of any. Is there anything i have to install for this to work or any necessary settings need to be done before configuring it?
All this while for Microsoft SQL connection to ODBC, i just put in the DB credentials and voila.
Your help is very much appreciated.

informatica powercenter sql server connection issue

Background: I am really new. Informatica Developer for PowerCenter Express Version: 9.6.1 HotFix 2
I am trying to connect to a sql server 2012 database. I created this connection
, basically just changed the server, database in connection string of meatadata access and data access. I have tested I can use the user name password to access the sql server in sql server management studio. And when I click test it reports successful.
But when I create a mapping and a physical object (read) based on that connection, when I try data view on that object, it reports this error:
[LDTMCMN_0029] message [com.informatica.sdk.dtm.ExecutionException: [LDTM_0072] RR_4036 Error connecting to database [
Microsoft SQL Server Native Client 11.0: Login timeout expired
SQL State: HYT00 Native Error: 0
Microsoft SQL Server Native Client 11.0: A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.
SQL State: 08001 Native Error: 87
Microsoft SQL Server Native Client 11.0: SQL Server Network Interfaces: Connection string is not valid [87].
SQL State: 08001 Native Error: 87
State: 1 Severity: 16
SQL Server Message: SQL Server Network Interfaces: Connection string is not valid [87].
Database driver error...
Function Name : Connect
Database Error: Failed to connect to database using user [bcsgetl] and connection string [192.168.100.88:1433].].]
One thing to note, when I created that physical object, I used that connection and I was able to select a table, which proves the connection is successful.
As from the error message "Connection string is not valid".
For a Native SQL Server connection work without provide it
Your can try a connection with the ODBC protocol, but instead as for the PowerCenter, where it need to be created a ODBC 64 bit connection on the Windows Server 2012, for the developer and PowerCenter Express, instead I found that it need still an ODBC but from the local machine.
Follow this steps:
-Launch the ODBC Administrator using the odbcad32.exe file located in the
C:\Windows\SysWOW64 directory.
-Create a new ODBC SQL data source under user and make sure do not use space in the name.
-Restart the Developer Client.
-Create in the Developer Client a ODBC connection with your parameters.
Please make sure to use as "Connection String" the same you used for the ODBC source on your local machine.
So if you called it "SQL_Local" that is your Connection String

Database Link error ORA-12545: Connect failed because target host or object does not exist

I am currently accessing/connecting to a remote database through VPN and I have no issues querying on the remote database. I want to create a db-link to connect my local db to the remote database in order to join certain tables. Sadly, I am getting error ORA-12545.
This is my db-link code:
CREATE DATABASE LINK DB_LINK
CONNECT TO REMOTE_USER_NAME
IDENTIFIED BY PASSWORD
USING '(DESCRIPTION=(CONNECT_DATA=(SID=test_SID))(ADDRESS=(PROTOCOL=TCP)(HOST=HOST_NAME.com)(PORT=1521)))'
I don't have an Oracle client installed on my machine so I am using the full description. There are no issue accessing both our db and the remote db without an Oracle client installed so I assume this is not the problem.
My ping to the remote address returned TTL expired in transit even though the VPN is connected. This seems a bit weird but I am not entirely sure if this is the problem.
I must be missing a crucial step. Any advice is appreciated.

OBIEE Answers not showing results

I recently installed OBIEE 11.1.1.6.0. I imported the repository I had from 11.1.1.5 which was working fine till now.
In the administration tool, I can query my data and update the rows, I can connect with the same credentials as the connection pool without problems in SQLPLUS.
Users have the RESOURCE and CONNECT privileges.
My weblogic user as all the privileges and has been granted read/write to my Subject area.
I have set the environment variables, modified the instancesconfig.xml and tried all the things i could've found on the OTN but BI Answers continues to give me this ERROR
View Display Error
Odbc driver returned an error (SQLExecDirectW).
Error Details
Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000]
[nQSError: 10058] A general error has occurred.
[nQSError: 43113] Message returned from OBIS.
[nQSError: 43119] Query Failed:
[nQSError: 17001] Oracle Error code: 1017, message: ORA-01017: invalid username/password; logon denied at OCI call OCISessionBegin.
[nQSError: 17014] Could not connect to Oracle database. (HY000)
SQL Issued: SELECT 0 s_0, "SAP_AVIS"."Fait SAP AVIS"."Avis" s_1 FROM "SAP_AVIS" FETCH FIRST 65001 ROWS ONLY
Please help, I am desperate.
I have been able to resolve my OCI ORA-01017 error.
The problem was caused by my connection pools.
I had a connection amed "A" to access tables in a certain schema in my DB and another connection named "B" this time to access tables in another schema but in the same DB.
In Oracle BI Answers (presentation), I was trying to view data whitin the connection B but strangely OBIEE Answers was using the connection A.
In the end I removed/renamed the connection A and everthing worked like nothing never happend.
I am not saying that this is the best method. Maybe i skipped a config that assigns the default connection pool to use but it did the job.
Option 1:
Copy your tnsnames.ora to {Oracle_BI1}\network\admin directory & {oracle_common}\network\admin directory
Option 2:
Instead of using tnsnames.ora entry in the RPD, use the full expanded tnsnames.
I have never faced this issue, so I'm not sure this'll work or not but you can try. Option 2 might just do the trick.
Vijay.
For me oracle client was not installed,
when I Installed the oracle client problem got solved

Resources