Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQLPLUS, TOAD and TNSNAMES

SandLakeFeb 25 2009 — edited Feb 28 2009
I am having a look at the latest version of Toad (9.7.2.5) and have installed a virtual PC for it with a 10.2 client. I currently use version 8.0.0.47 with a 9i client and it works fine. Even though I have copied my existing SQLNET.ORA and TNSNAMES.ORA onto the virtual PC I cannot make a normal connection to the database, the new version of Toad does allow a 'Direct' as opposed to a TNS connection and if I put in the either the IP or the HOST (from TNSNAMES) along with port 1521 and the SERVICE_NAME (from TNSNAMES) I get connected to the database

Here is the entry from my TNSNAMES.ORA

DB_NET_SERVICE_NAME=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=db.office.lan)
(PORT=1521)
)
(CONNECT_DATA=
(SERVER=dedicated)
(SERVICE_NAME=DB_SERVICE_NAME)
)
)

Using the TNS option, I get ORA-12154: TNS:could not resolve the connect identifier specified (DB_NET_SERVICE_NAME)

I have checked the TNSNAMES.ORA file and it all looks OK, I have used Toad to check the syntax and it is OK

SQLNET.ORA has

NAMES.DEFAULT_DOMAIN = office.lan
NAMES.DIRECTORY_PATH=(TNSNAMES, EZCONNECT)

and either
SQLNET.AUTHENTICATION_SERVICES=(NONE)
or
SQLNET.AUTHENTICATION_SERVICES=(NTS)
I have tried both.

I am not using TNS_ADMIN and both TNSNAMES.ORA and SQLNET.ORA are in the default directory


Any ideas as to what is wrong?

I can't connect in SQLPLUS either, what do I need to enter in the HOST String?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 28 2009
Added on Feb 25 2009
19 comments
3,609 views