I am a SQL Server user .
I am on a project that is using oracle (which I rarely use) I need to create an ODBC connection so I can access the some data via MS Access I have a application on my machine called oraHome90. It seems to allow a configuration of something called a listener in a “net configuration utility”, I think that a “Local Net Service Name Configuration” needs to also be done. The IT support gave me this information to set up the ODBC connection . I have tried every combination that I can think of. I can get past a test that successfully passes a test to “login“ to the oracle server database. When I try to create the ODBC connection I get the following error: ORA-12154: TNS: Could not resolve service name.
Assuming that I want to start from scratch and the following information is supposed to allow for me to connect to the database….. Any suggestions or comment ? Note: ultimately the project will have a website .ASP page query the data, but I have to first prove that I can see the data using the ODBC connection via MS Access
Service name: SERVICENAME
HOST = HOST.XYZi.com
User Id: MYUSERID
Password: MYPASSWORD
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'Oracle Connection
Dim ocst
Dim oconn
ocst = "Provider=OraOLEDB.Oracle;" & _
"Data Source=DATASOURCE;" & _
"User ID=CHIJXL;" & _
"Password=password;"
set oconn = CreateObject("ADODB.Connection")
We resolved our issues by re-installing the Oracle Database Client. Somehow the installation wasn't successful on 1 of the workstations (even though there was no logging), however when comparing size/files/folders of the Oracle directory to a working client workstation, there was a significant amount of files that were missing. Once we performed a clean install, everything worked perfectly.
If you have a 32bit DSN and a 64bit DSN with same names, Windows will automatically choose the 64bit one and If your application is 32bit it shows this error. Just watch out for that.
I fixed this problem using this steps.
First of all, this error occured , if you didn't install same directory or drive.
But the answer is here.
Find the OS variable and change name as a "TNS_ADMIN"
And change the value as a "tnsnames's directory address"
Restart the system.