sqlnet.ora and tnsnames.ora file relationship
The NAMES.DIRECTORY_PATH parameter in sqlnet.ora can be commented out (or not even included) because the order shown below is the default search order for names resolution in Net8 (Oracle Net for 9i).
The service name equals the instance name + the default domain. If you are trying to connect to an instance running on your machine, you don't need to have the listener running. Net8 spawns a bequeath session, which is the same as a dedicated server process. You DO need to have the ORACLE_SID environment variable set to the name of the database on your machine you are trying to connect to. If you set the NAMES.DEFAULT_DOMAIN parameter in this file (e.g., company.com), then Oracle will append company.com to the net service name in the connect string (the net service name is the name following the @ sign). After that, Oracle will look for an address of name_you_used.company.com. If your database names are not named that way in the tnsnames.ora file, you will see a TNS- or ORA-12154 error ("could not resolve service name"). Other errors are possible too.
NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
If you are using NAMES.DEFAULT_DOMAIN, the value should match the domain name of your local environment. For example, assume your domain name is company.com. A fully qualified net service name for a database named kfm would be kfm.company.com. If you are connecting remotely (and you can do this on the server by going thru the
network), the connect descriptor is username/password@kfm. What Oracle Net8 does is take "kfm" and add the value for NAMES.DEFAULT_DOMAIN to it (i.e., kfm.company.com) and then looks for an entry of kfm.company.com in your tnsnames.ora file. If Net8 does not see kfm.company.com in the file, you get an error.
If you don't use a default domain name, leave that parameter commented out or just delete the line in sqlnet.ora. That way, when you use username/password@kfm, Net8 simply looks for a stanza begining with "kfm" in the tnsnames.ora file.
NAMES.DEFAULT_DOMAIN = company.com
Note: If you are using the Database Configuration Assistant (usually see this when installing the RDBMS software at the point where the seed database is created), don't use a hyphen in the domain name because the assistant won't recognize a hyphen as a valid character. You can go back later and manually edit sqlnet.ora and tnsnames.ora
to add the hyphen in the domain name.
Last edited by stecal; 12-20-2002 at 05:20 PM.
Modify ur TNS.ora, give the servername with domain.
Say domainz company.net.......try with
HOST = dsd.company.net or IP
while login try with domain in connect string.
Set defualt domain in SQLNet.ora as ur compnay domain.
Hope this shud work
Was my explanation not clear enough?
Click Here to Expand Forum to Full Width