Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle SID's in NT
jhanway_at_ican.net wrote in message <363e4c1f.1410455104_at_news.ican.net>...
>If you have multiple instances running on a NT Oracle (7.3.3) system,
>is there a variable similar to the SID in UNIX that you can set when
>you go to run say SVRMGR from the command line?
C:\> SET ORACLE_SID=prod2
C:\> SVRMGR23
...
C:\> SET ORACLE_SID=prod1
C:\> SVRMGR23
...
The Oracle environment variables works exactly (well almost) the same in NT
as in Unix. The SET command is a bit long and cumbersome to type in
everytime, so cut and paste the following and save it as ORAENV.CMD in
C:\ORANT\BIN
--cut--
@echo off
if "%1" == "/?" goto :HELP if "%1" == "-h" goto :HELP if "%1" == "-h" goto :HELP if "%1" == "" goto :ERROR
:HELP
echo.usage: %0 SID echo. echo.Sets the ORACLE_SID variable to the specified system idgoto :END
:ERROR
echo.Invalid number of parameters specified. Type '%0 -h' for help.
goto :END
:OK
echo.Oracle SID changed from [%ORACLE_SID%] to [%1]
SET ORACLE_SID=%1
goto :END
:END
echo.
-- cut --
And now you have a kind of oraenv command for NT. If the NT scripting language did not suck so much, we could make this command file behave exactly the same as oraenv on Unix... <sigh>
regards,
Billy
Received on Tue Nov 03 1998 - 00:24:55 CST
![]() |
![]() |