You might want to check Martin Bach's notes, (I havn't), but there is an order of precedence which I will not attempt to be accurate about. First the environment and which tnsnames.ora file is being used are two different things. For the tnsnames.ora file the order a program would look might probably be - or close to. Remember, once the connect string is found looking for the connect string ceases. 1. The directory you started the program in. if there is one there it will be used. 2. The TNS_ADMIN system environment variable - start control panel, system, ... advanced, env var button,... 3. $ORACLE_HOME/network/admin directory -- this depends of course on what environment is set. (normally the default - which is why it is easier to run one windows DB/server). 4. (might look in path, not sure) 5. not sure of other steps. Hope that helps, or prompts someone to elaborate more specifically. Joel Patterson Database Administrator 904 727-2546 ________________________________ From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Roger Xu Sent: Monday, January 18, 2010 4:28 PM To: oracle-l@xxxxxxxxxxxxx Subject: ORACLE_HOME As I am learning Oracle in the Windows environment, I noticed that I do not have to set ORACLE_HOME. Am I missing something? Thanks! H:\>echo %ORACLE_HOME% %ORACLE_HOME% H:\>sqlplus system/manager@triwebb SQL*Plus: Release 10.1.0.4.2 - Production on Mon Jan 18 15:23:00 2010 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64 bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options H:\>set ALLUSERSPROFILE=C:\Documents and Settings\All Users APPDATA=C:\Documents and Settings\rxu\Application Data CATALINA_HOME=C:\Tomcat5028 CLASSPATH=C:\j2sdk1.4.2_06;C:\Tomcat5028\webapps\WEB-INF\classes CLIENTNAME=BB011257 ClusterLog=C:\WINDOWS\Cluster\cluster.log CommonProgramFiles=C:\Program Files\Common Files COMPUTERNAME=DRAGON ComSpec=C:\WINDOWS\system32\cmd.exe FP_NO_HOST_CHECK=NO HOMEDRIVE=H: HOMEPATH=\ HOMESHARE=\\cbcsrv1\users$\rxu JAVA_HOME=C:\j2sdk1.4.2_06 LOGONSERVER=\\CBCADC2 NUMBER_OF_PROCESSORS=8 OS=Windows_NT Path=E:\OraIAS\jdk\jre\bin\classic;E:\OraIAS\jdk\jre\bin;E:\OraIAS\bin;E :\OraIAS \jlib;E:\OraPortal\bin;E:\OraPortal\jlib;D:\oracle\product\10.2.0\db_1\b in;C:\WI NDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Dell\SysMgt\ RAC5;C:\Program Files\Dell\SysMgt\oma\bin;%OMPATH%;C:\j2sdk1.4.2_06\bin PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH PROCESSOR_ARCHITECTURE=x86 PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 11, GenuineIntel PROCESSOR_LEVEL=6 PROCESSOR_REVISION=0f0b ProgramFiles=C:\Program Files PROMPT=$P$G SESSIONNAME=RDP-Tcp#129 SystemDrive=C: SystemRoot=C:\WINDOWS TEMP=C:\DOCUME~1\rxu\LOCALS~1\Temp\1 TMP=C:\DOCUME~1\rxu\LOCALS~1\Temp\1 USERDNSDOMAIN=CARTERBC.NET USERDOMAIN=CARTERBC USERNAME=rxu USERPROFILE=C:\Documents and Settings\rxu windir=C:\WINDOWS H:\>