Re: ORACLE_HOME

From: Jack van Zanen <jack_at_vanzanen.com>
Date: Tue, 19 Jan 2010 15:11:00 +1100
Message-ID: <77a615a71001182011g50289e39j56b39f6556f36403_at_mail.gmail.com>



Hi

On my laptop I have sort of copied the UNIX environment by creating an oratab file and a batch script that reads from it called setenv.bat. Only input required is the SID (setenv DB1, setenv DB2, etc etc). It also sets the dos box window name to whichever environment it is and sets the service name for the oracle service. The bat file sits somewhere in the path.

i:\temp>setenv db1
i:\temp>net start %SERVICE%
The OracleServiceDB1 service is starting. The OracleServiceDB1 service was started successfully.

i:\temp>sqlplus sys as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Tue Jan 19 14:46:51 2010 Copyright (c) 1982, 2008, Oracle. All rights reserved. Enter password:
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 535662592 bytes

Fixed Size                  1348508 bytes
Variable Size             373296228 bytes
Database Buffers          155189248 bytes
Redo Buffers                5828608 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

i:\temp>setenv dg1
i:\temp>net start %SERVICE%
The OracleServicedg1 service is starting. The OracleServicedg1 service was started successfully.

i:\temp>sqlplus sys as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Tue Jan 19 14:50:37 2010 Copyright (c) 1982, 2008, Oracle. All rights reserved. Enter password:
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 535662592 bytes

Fixed Size                  1348508 bytes
Variable Size             310381668 bytes
Database Buffers          218103808 bytes
Redo Buffers                5828608 bytes
Database mounted.
Database opened.
SQL> Works very well for testing stuff when you have multiple homes and databases etc etc.

Jack

2010/1/19 M Rafiq <rafiq9857_at_hotmail.com>

> There is another way to handle this situation. You may create an
> oraenv_SID.bat file and put some settings like following to login to right
> database using right oracle home. It is quite helpful if you are managing
> more then one database and/or with mutiple oracle homes.
>
> set ORACLE_HOME=c:\oracle
> set local=ORCL ---entry from tnsnames.ora file
> set ORACLE_SID=ORCL
>
> You may run this file on dos command and then login to that database.
>
> Regards
> Rafiq
> ------------------------------
> Date: Mon, 18 Jan 2010 16:27:56 -0800
> From: oratune_at_yahoo.com
> Subject: Re: ORACLE_HOME
> To: wellmetus_at_gmail.com; jslowik_at_cps92.com
> CC: oracle-l_at_freelists.org
>
> If you have multiple ORACLE_HOME locations on a Windows server you'll
> also have the Oracle Home Selector at Start->All programs-> Oracle Universal
> Installer -> Oracle Home Selector. This sets the ORACLE_HOME in the
> registry to point to one of the valid locations Windows knows of. It will
> also tell you which home you're currently using by simply starting it.
>
> David Fitzjarrell
>
>
>
> ------------------------------
> *From:* Roger Xu <wellmetus_at_gmail.com>
> *To:* Joel Slowik <jslowik_at_cps92.com>
> *Cc:* oracle-l_at_freelists.org
> *Sent:* Mon, January 18, 2010 5:03:04 PM
> *Subject:* Re: ORACLE_HOME
>
> In my case below, I just want to know which tnsnames.ora file I am using.
> There are many tnsnames.ora files in this server and I was able to try each
> to figure out the one I am using. But this is not the right way to get the
> answer ... (I feel home when running Oracle in UNIX :)
>
> On Mon, Jan 18, 2010 at 3:41 PM, Joel Slowik <jslowik_at_cps92..com<jslowik_at_cps92.com>
> > wrote:
>
> As I am learning oracle in the windows environment, I’ve noticed that it
> usually only matters if you have more than one oracle database instance up
> and running on the same server.
>
>
>
> That’s just my experience so far.
>
>
>
> -joel
>
>
>
> *From:* oracle-l-bounce_at_freelists.org [mailto:
> oracle-l-bounce_at_freelists.org] *On Behalf Of *Roger Xu
> *Sent:* Monday, January 18, 2010 4:28 PM
> *To:* oracle-l_at_freelists.org
> *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_at_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\bin;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 <http://carterbc.net/>
> USERDOMAIN=CARTERBC
> USERNAME=rxu
> USERPROFILE=C:\Documents and Settings\rxu
> windir=C:\WINDOWS
>
> H:\>
>
>
>
>
>
>
>
> Confidentiality Note: This electronic message transmission is intended only
> for the person or entity to which it is addressed and may contain
> information that is privileged, confidential or otherwise protected from
> disclosure. If you have received this transmission, but are not the intended
> recipient, you are hereby notified that any disclosure, copying,
> distribution or use of the contents of this information is strictly
> prohibited. If you have received this e-mail in error, please contact
> Continuum Performance Systems at {203.245.5000} and delete and destroy the
> original message and all copies.
>
>
>
>
> ------------------------------
> Hotmail: Trusted email with Microsoft’s powerful SPAM protection. Sign up
> now. <http://clk.atdmt.com/GBL/go/196390706/direct/01/>
>

-- 
Jack van Zanen

-------------------------
This e-mail and any attachments may contain confidential material for the
sole use of the intended recipient. If you are not the intended recipient,
please be aware that any disclosure, copying, distribution or use of this
e-mail or any attachment is prohibited. If you have received this e-mail in
error, please contact the sender and delete all copies.
Thank you for your cooperation

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Jan 18 2010 - 22:11:00 CST

Original text of this message