need help desperately. I have an Oracle 8i v. 184.108.40.206.0 on Windows NT. I have a front-end application written in C accessing it through Microsoft ODBC for Oracle. I always get the error "ORA-12154 TNS could not resolve service name" whenever I connect to the database using the Microsoft ODBC driver. I have already setup my Tnsnames.ora using Net8 Assistant and is as follows:
(ADDRESS = (PROTOCOL = TCP)(HOST = cnow)(PORT = 1521))
(SERVICE_NAME = EPPIC)
I've tried using Tnsping and I get the error "TNS-03505: Failed to resolve name".
Using the same service name, "EPPIC", I am able to connect to the database using Oracle ODBC Driver. I am really at a loss here.
The Microsoft ODBC driver for Oracle I am using is v. 2.273.6526.00, while the Oracle ODBC driver version is 8.01.05.00.
Thanks for replying to this query.
Before you get ODBC working, make sure you can connect to the box using sqlplus. If you can get sqlplus working, you can get ODBC working.
The steps I use to resolve networking issues are:
1. try to ping the server from the client. If it fails, you have a TCP/IP networking issue.
2. try to tnsping the database from the server. If this fails, you probably have a problem with your listener.
3. Try connect to the database using a loopback test from the server. If this fails, you probably have a tnsnames.ora problem.
4. try to tnsping the database from the client. If this fails, you problably have a naming issue on the CLIENT (tnsnames.ora).
5. try to connect to the database using sqlplus from the client. If this fails, you probably have a naming issue on the client.
Can you elaborate what is the 'loopback test' you mentioned in step 3?
Oh, sorry, I meant to elaborate on my original post.
A loopback test is when you try to connect to the server from the server using a sqlnet alias. For example, say your ORACLE_SID=test and your TNSNAMES.ORA alias is TEST.WORLD.
If you can connect via IPC:
then at least your database is up. Then, you can perform a loopback test using the tnsnames.ora alias:
dev% export ORACLE_SID=test
dev% sqlplus system/manager
This way, you are verifying that you have the listener working correctly and that you have a valid tnsnames.ora alias on the server. The next step is to just copy the correct tnsnames.ora alias to the client and Voila!, you're done.
dev% export ORACLE_SID=prod
dev% sqlplus firstname.lastname@example.org
Why not just use the Oracle ODBC driver you already have working?
Click Here to Expand Forum to Full Width