Re: Where does sqlnet.ora live

From: Joey D'Antoni <>
Date: Thu, 17 Sep 2009 07:44:36 -0700 (PDT)
Message-ID: <>

? $ORACLE_HOME/network/admin/sqlnet.ora (reverse your / if on Windows)

From: "Goulet, Richard" <> To: oracle-l <> Sent: Thursday, September 17, 2009 10:31:03 AM Subject: Where does sqlnet.ora live

Where does sqlnet.ora live
This is a post for a friend who at the moment does not have posting privileges. Steve could I kindly ask you to check on that fact for me?? Thanks. Dick Goulet
Senior Oracle DBA/NA Team Lead
PAREXEL International
900 Chelmsford St, Suite 310
Lowell, MA 01821
SUBJECT: Default Search Hiearchy for Oracle EMAIL ADDRESS:

Please, I need some help/clarification. What is the default search hierarchy for Oracle to locate the sqlnet.ora file and the tnsnames.ora file(s)?
I found an Oracle doc that stated:
By default, Oracle Net configuration files are sought and resolved from the following locations:
  1 TNS_ADMIN environment variable (incl. Windows Registry Key)   2 /etc or /var/opt/oracle (Unix)
  3 $ORACLE_HOME/network/admin (Unix)
  4 %ORACLE_HOME%/Network/Admin or %ORACLE_HOME%/Net80/Admin (Windows) I ran:
truss tnsping 'sqlplus opsdba/xxxxxxxx_at_pcrpi' 2>&1 | grep sqlnet.ora access("/opt/oracle/product/10.2.A/network/admin/sqlnet.ora", F_OK) ERR#2 ENOENT
access("/opt/oracle/product/10.2.A/network/admin/sqlnet.ora", F_OK) ERR#2 ENOENT
I do not have an sqlnet.ora file at this location, so the error message is correct but I do have a sqlnet.ora in /etc yet it did not find it. ls -lai /etc/sqlnet.ora

   -rw-r--r-- 1 oracle dba 1049 Sep 10 2008 /etc/sqlnet.ora
Next test:
truss tnsping 'sqlplus opsdba/xxxxxxx_at_pcrpi' 2>&1 | grep tnsnames.ora access("/home/rusnakga/.tnsnames.ora", F_OK) ERR#2 ENOENT
access("/etc/tnsnames.ora", F_OK)
= 0

stat("/etc/tnsnames.ora", 0x800003fffb0f4de0)
= 0

open("/etc/tnsnames.ora", O_RDONLY|O_LARGEFILE, 0666)
= 3

I do not have a .tnsnames.ora in my home directory so, I can understand that error and it continued its search. I do not have a tnsnames.ora in $ORACLE_HOME but no indication Oracle looked there.
I do have a tnsnames.ora in /etc and it found it. TNS_ADMIN was not set.
So, what is the search order for sqlnet.ora and tnsnames.ora?? How can I verify the search it goes through?
The server is: HP-UX XXXXXXXXX B.11.11 U 9000/800


Al Rusnak
Database Administrator
ManTech International Corporation
Fort Lee, Virginia
Phone: 804.734.8000 ex. 48210

The information transmitted in this communication is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please destroy any copies, contact the sender and delete the material from any computer.       

Received on Thu Sep 17 2009 - 09:44:36 CDT

Original text of this message