How to set ENV:  ORALCE_SID + ORACLE_HOME

Hi all,
I am new to this company, just 2 weeks.
We have lots of linux/aix/sun/unix envi and lots of databases in it, like 1000+
The sysadmin is good in shell scripting, in managing the servers.
One thing is setting environment variables to set your OracleHome and OracleSID choice.
Since we have lots of databases and different versions in 1 server, I login as "oracle" , then at command prompt $ I just type SID PROD1 or
$ sid prod1
or
$ SID PROD1
Then I am set to the ORACLE_HOME and SID of my choice database which is "PROD1"
My question is, how do I program similar to this? or where can I find the program that accept this paramter "SID PROD1".
I am asking because I want to add my new database that I have cloned or installed. Say I created a new database named DEV020. How do I add this to the program?
Or is it automatically enrolled?
Thanks a lot

KinsaKaUy? wrote:
Hi all,
I am new to this company, just 2 weeks.
We have lots of linux/aix/sun/unix envi and lots of databases in it, like 1000+
The sysadmin is good in shell scripting, in managing the servers.
One thing is setting environment variables to set your OracleHome and OracleSID choice.
Since we have lots of databases and different versions in 1 server, I login as "oracle" , then at command prompt $ I just type SID PROD1 or
$ sid prod1
or
$ SID PROD1
Then I am set to the ORACLE_HOME and SID of my choice database which is "PROD1"
My question is, how do I program similar to this? or where can I find the program that accept this paramter "SID PROD1".
I am asking because I want to add my new database that I have cloned or installed. Say I created a new database named DEV020. How do I add this to the program?
Or is it automatically enrolled?
Thanks a lotIt seems to be an alias. Check .bash_profile and .bashrc file (in the home directory), there should be alias called SID
Kamran Agayev A.
Oracle ACE
My Oracle Video Tutorials - http://kamranagayev.com/oracle-video-tutorials/
My ebook - http://kamranagayev.com/2011/10/19/step-by-step-oracle-installation-all-in-one-e-book/

Similar Messages

  • How to set environment variable ORACLE_HOME ?

    Hi
    I trying to install SAP Solution manager 4.0 SR3:
    OS: Linux RHEL4u4
    DB: Oracle
    SAPinst now stops the installation.
    To proceed with the installation, install the Oracle database as follows:
    1.Log in as user orassm.
    2.Set the DISPLAY variable.
    3.Change to directory /oracle/stage/102_32/database/SAP.
    4.Start './RUNINSTALLER'.
    After you installed the Oracle database software, proceed with the database instance
    installation by choosing 'OK' in this dialog box.
    ./RUNINSTALLER
    oracle_stage is not set (OK)
    oracle_base is not set (OK)
    oracle_home is not set (OK)
    oracle_sid is not set (OK)
    oracle_home_name is not set (OK)
    oracle_inst_group is not set (OK)
    from_location is not set (OK)
    tmp_netca_file is not set (OK)
    tmp_dbca_file is not set (OK)
    Working in /oracle/stage/102_32/database/SAP ...
    The environment variable ORACLE_HOME is not set! abort ...
    How to set environment variable ORACLE_HOME ?
    Regards
    Eric

    i
    Switch shell to bash:
    orassm:x:502:503:SAP Database Administrator:/oracle/SSM:/bin/bash
    [root@csp-p-sm00 ~]# su - orassm
    [orassm@csp-p-sm00 ~]$
    But when try to run ./RUNINSTALL
    [orassm@csp-p-sm00 SAP]$ ./RUNINSTALLER
    oracle_stage is not set (OK)
    oracle_base is not set (OK)
    oracle_home is not set (OK)
    oracle_sid is not set (OK)
    oracle_home_name is not set (OK)
    oracle_inst_group is not set (OK)
    from_location is not set (OK)
    tmp_netca_file is not set (OK)
    tmp_dbca_file is not set (OK)
    Working in /oracle/stage/102_32/database/SAP ...
    The environment variable ORACLE_HOME is not set! abort ...
    Additionaly I've post csh.cshrc and csh.login
    /etc/cshrc
    csh configuration for all shell invocations.
    by default, we want this to get set.
    Even for non-interactive, non-login shells.
    [ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]
    if $status then
            umask 022
    else
            umask 002
    endif
    if ($?prompt) then
      if ($?tcsh) then
        set prompt='[%n@%m %c]$ '
      else
        set prompt=\[`id -nu`@`hostname -s`\]\$\
      endif
    endif
    if ( $?tcsh ) then
            bindkey "^[[3~" delete-char
    endif
    setenv MAIL "/var/spool/mail/$USER"
    limit coredumpsize 0
    if ( -d /etc/profile.d ) then
            set nonomatch
            foreach i ( /etc/profile.d/*.csh )
                    if ( -r $i ) then
                            source $i
                    endif
            end
            unset i nonomatch
    endif
    /etc/csh.login
    System wide environment and startup programs, for login setup
    if ($?PATH) then
            if ( "$" !~ /usr/X11R6/bin ) then
                    setenv PATH "$:/usr/X11R6/bin"
            endif
    else
            if ( $uid == 0 ) then
                    setenv PATH "/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin"
            else
                    setenv PATH "/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin"
            endif
    endif
    setenv HOSTNAME `/bin/hostname`
    set history=1000
    if ( ! -f $HOME/.inputrc ) then
            setenv INPUTRC /etc/inputrc
    endif
    Regards
    Eric

  • How to set env variable

    hi
    How to set the oracle10g (xe) environment variables i.e(ORACLE_HOME,ORACLE_SID) in ubuntu. I have installed the oracle xe on ubuntu,but when i issue the sqlplus in command prompt ,it giving me as command not found.??

    user4587979 wrote:
    hi Ed
    Thanks for replaying..i have installed xe onto nfs (ie, /usr/lib is on an nfs volume).
    I also tried by adding below commands on .bashrc file, but i didn't get the as expected
    ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
    PATH=$PATH:$ORACLE_HOME/bin
    export ORACLE_HOME
    export ORACLE_SID=XE
    export PATH
    Typically, we put that in .bash_profile, not .bashrc
    And you have to 'source' the file after the change .. it's not checked on every command to see what might have changed.

  • How to set ENV variable using user profile in solaris 10 while using ssh

    Hi,
    Please help me in setting the environment variable using user profile file while using ssh method of connection (Can I use the same ~/.profile file?)
    when i am logging in using the telnet, the environment variable is automattically set, but not when I am using SSH.
    Thanks in advance
    ushas symon

    Please list your .profile and a ls -la of your home directory.
    also list the result of env after your logged through telnet and ssh.
    There should be no difference - it depends mostly on your login shell which startup script it executes. ksh uses .profile, bash: bash_profile then .profile.

  • How to set Environment variables........???

    I installed j2sdk in my system.....
    i want to know how to set env variables...?

    Which ones, what for? Did you check whether some are already set?
    Forget about the classpath variable, if you want to add that. Use the command-line arguments.
    And which OS?

  • How to set ORACLE_HOMES on Windows 2000 for 11i

    How to set ORACLE_HOMES on Windows 2000 for 11i
    As am newbie on windows.
    Its very urgent.

    To set ORACLE_HOME on Windows:
    C:\> set ORACLE_HOME=<location>
    i.e.
    C:\> set ORACLE_HOME=d:\oracle\proddb\10.2.0
    To verify:
    echo %ORACLE_HOME%
    In Apps 11i, you do not have to set it manually, just source the environment file and this will set all environment variables for you.
    - To source the application env file, run envshell.cmd under %APPL_TOP%
    - To source the database env file, run <SID>_<hostname>.cmd under %RDBMS_ORACLE_HOME%

  • How to set multiple ORACLE_HOME and ORACLE_SID, on Windows

    How to set multiple ORACLE_HOME and ORACLE_SID, on Windows.
    I have 5 oracle instances. Every time if i want to start up the services , I am manually setting the environment variable (ORACLE_HOME and ORACLE_SID) and starting the services one at a time.
    Can we set multiple ORACLE_HOME and ORACLE_SID in Start->My computer-> properties-> advance-> Environment variable.
    Thanks
    Naveen

    Hi ,
    Can you please give me the link, for the doc you are referring to
    Thanks
    Naveen

  • How to set ORACLE_HOME environment variables in win 2003

    Can anyone tell me how to set ORACLE_HOME environment variables in Win2003
    Please tell me the significance of that also.It will be really helpful if u can help me out from Path variable seting of JAVA SDK also... Thanks in advance...

    hi
    use this code IN FORMS60 variable in Regedit
    \\server\DATA\store\Forms;
    Rizwan

  • How do I set-up on %ORACLE_HOME%\bin for Oracle client on Windows XP

    How do I set-up on %ORACLE_HOME%\bin for Oracle client on Windows XP?
    The Oracle bin directory is: C:\oracle\ora90\bin
    Thank you!

    If you are asking how to setup the resolution of %ORACLE_HOME%\bin to C:\oracle\ora90\bin, you must create a system environment variable called ORACLE_HOME that is set to a value of C:\oracle\ora90.
    Kind regards,
    Russ

  • How to set up Oracle Environment... ?

    I have a fresh copy of Oracle Enterprise Linux with Oracle 11g R1 installed.
    Steps that I did and I am trying to understand……
    1.     Boot the OEL server.
    2.     From remote connection, using PUTTY, I connect to the OEL
    3.     I am setting the variables(ORACLE_HOME & ORACLE_SID) with the ‘export’
    4.     Login to sqlplus as sys with sysdba
    5.     Started the database. Everything is fine!
    6.     If I logout of PUTTY and log back all my step 3 variables are gone.
    7.     You know now I can’t start the Oracle database without error.
    My question is……
    How to make the proper environment for Oracle database?
    Do I have to have the above two variable populated all the time. Does these two variables need to be part of any login script (for root)? Once session (shell) has to be running all the time?
    Missing the link here. I am learning.
    Thank you,
    Smith

    For starters, there are several shell environments that you could have set as your default, such as: sh, csh, ksh, bash, tcsh, zsh, or rc.
    Depending which shell environment you have set, you may or will have a different startup file when you login.
    But the basics still apply:
    For the most part, the first thing is that you should not be running anything as root (related to Oracle).
    Oracle should have its own userid and be part of the DBA group.
    Perhaps you mistyped.
    Next, yes, your environment variables will need to be reset when you log back in.
    There are a number of ways to accomplish this.
    One of the most popular ways (although I don't necessarily agree), is to set the environment variables in your login startup script.
    for example, your .profile (dot-profile). For ksh shell, for example, this is run at start up when you log in, after your session has read the /etc/profile script for system wide settings.
    If the environment variables are set correctly, they are exported, which is sourced as your login script runs.
    Alternately, (which I prefer), is you can 'source' the environment variables yourself.
    This is done differently again depending on your default shell.
    For ksh, you simply type . <shell script name>. (That is: dot-space-scriptfile)
    It is important that you include a space between the dot and the file to be executed.
    This will allow you to spawn additional windows from your main window and carry those env parameter settings forward.
    Another option, preferred by Oracle, is that you set the Oracle $PATH in your login script (.profile or whatever), and then execute . oraenv. (dot-space-oraenv). This sources the parameters that are set when you run the oraenv which sets things such as your ORACLE_SID and ORACLE_HOME.
    HTH...

  • How to set DYLD_LIBRARY_PATH on Mac OS X Mountain Lion?

    Hi all,
    I've been struggling to find a proper way to set up DYLD_LIBRARY_PATH variable on Mountain Lion.
    I have to use Perl Modules for work purposes but eveytime I try to install some CPAN Module (DBD::Oracle to be exact),perl complains that it can't find the DYLD_LIBRARY_PATH and can't continiue with the installation.
    Exact error is:
    Trying to find an ORACLE_HOME
    Your DYLD_LIBRARY_PATH env var is set to ''
          The ORACLE_HOME environment variable is not set and I couldn't guess it.
          It must be set to hold the path to an Oracle installation directory
          on this machine (or a machine with a compatible architecture).
          See the appropriate README file for your OS for more information.
          ABORTED!
    I have downloaded the Oracle Instant Client files for Basic,SQLPLUS and SDK but I don't know how to use these?
    When I try the commands:
    export PATH="$HOME/.rbenv/bin:$PATH"
    and use my directory path of where the instanclient binaries are located for the part "$HOME/.rbenv/bin"  and use "DYLD_LIBRARY_PATH" for '$PATH' but it doesn't helped me at all.
    Still the same errors.What should I download in order to set ORACLE_HOME (DYLD_LIBRARY_PATH) and which files I should point the environemt variable to?
    Anyone please help me?
    Thank a lot

    I simply type in "perl [scriptname.pl]".How is this relevant?I'm not able to install modules.
    I've tried both the direct download/make/install way and doing it from the package as described in CPAN manuals.
    For the direct download way,I simply type in "cpanm DBD::Oracle" for example.It downloads the package,makes and tries to install but fails during the install process.
    Second method is downloading the module package from cpansearch.pearl.org and then pointing the terminal to package path,executing "perl Makefile.PL" and then "make install".
    Both methods fails with the same DYLD_LIBRARY_PATH error.

  • Setting env variables through scheduler

    Hi All,
    I am trying to run a PERL script which makes database connection using DBI module through scheduler. The script works fine if I run it manually but from scheduler it fails because it can't fine libclnt.sh.10.1 lib file. I have LD_LIBRARY_PATH & LIBPATH set in my .profile and i guess when scheduler runs the external job, it creates a new shell but doesn't inherit the .profile settings (same as cron). I tried setting these env variables in PERL script itself but even then it's not working. I tried my theory by running this script from shell but without running .profile and it fail with exact same error.
    I want to know how you guys are handling this situation? How to set or call .profile from scheduler job so that all the env variable get set properly?
    OS: SUSE Linux
    DB: 11gR2
    Thanks
    Daljit Singh

    Thanks for the reply, I am doing the same. I have create a very simple script where I am setting all the env variables and I can see that those variable are getting set but still, it doesn't work. There is something special when we run .profile, that time along with env variables, something else also get set (which i dont know and trying to find out) which makes PERL to search the oracle library in oracle_home. I can see that by turning libraries debugging on. Here is a small snippet when .profile doesn't get execute but the env variables are set:
    25039: find library=libclntsh.so.10.1 [0]; searching
    25039: search cache=/etc/ld.so.cache
    25039: search path=/lib64/tls/x86_64:/lib64/tls:/lib64/x86_64:/lib64:/usr/lib64/tls/x86_64:/usr/lib64/tls:/usr/lib64/x86_64:/usr/lib64 (system search path)
    25039: trying file=/lib64/tls/x86_64/libclntsh.so.10.1
    25039: trying file=/lib64/tls/libclntsh.so.10.1
    25039: trying file=/lib64/x86_64/libclntsh.so.10.1
    25039: trying file=/lib64/libclntsh.so.10.1
    25039: trying file=/usr/lib64/tls/x86_64/libclntsh.so.10.1
    25039: trying file=/usr/lib64/tls/libclntsh.so.10.1
    25039: trying file=/usr/lib64/x86_64/libclntsh.so.10.1
    25039: trying file=/usr/lib64/libclntsh.so.10.1
    25039:
    install_driver(Oracle) failed: Can't load '/usr/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.10.1: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 230.
    at (eval 3) line 3
    Compilation failed in require at (eval 3) line 3.
    Perhaps a required shared library or dll isn't installed where expected
    at /home/oracle/scripts/test 9
    See it is searching for this lib in some system path and not using any of env variable. I want to know where it's getting this value from. Also if I run .profile then, this path changes and inludes what is mentioned in LD_LIBRARY_PATH and then it works.
    Thanks
    Daljit Singh

  • How to set environment variables permanetly?

    I have installed oracle apps R12 on Oracle Enterprise Linux 5.3 successfully. When i run the file APPS<context_name>.env as oracle user(the one who installed software), the variables are set,,,but when i logout and login again,,,,,i dont see $ORACLE_HOME, $APPL_TOP etc......so please can someone tell me how to set the variables permanently..
    thanks

    Hi,
    set the env file in profile of unix user.
    if your shell is bash shell, then edit the user .bash_profile with env file. If your's is bourn shell, edit the user .profile
    for example,
    i have PROD as the database SID
    /oraprod and /applprod are the base mount points of database and application tiers respectively.
    erpserver is the hostname of R12 (single node)
    (1) Database Tier:
    login as oracle user
    $vi .bash_profile
    . /oraprod/db/tech_st/10.2.0/PROD_erpserver.env
    save the file
    (2) Application Tier:
    login as applmgr user
    $vi .bash_profile
    . /applprod/apps/apps_st/appl/APPSPROD_erpserver.env
    save the file
    ------

  • How to set reports server environment

    Hi..
    Now Oracle 9iAS r1 (reports60) was installed on Linux, Unix and NT for testing.
    I typed like below in web browser .
    http://IP:Port/dev60cgi/rwcgi60/showenv?server=ServerName
    then Oracle Reports environment variants(REPORTS_PATH, REPORTS... so on..) did not set . except PATH, LI_LIBRARY_PATH and ORACLE_HOME variants like below..
    ====================================================
    Oracle Reports Server CGI60 Environment Variables:PATH /home/ora9iasr1/product/9.0.1/Apache/perl/bin:/home/ora9iasr1/product/9.0.1/bin:/usr/kerberos/bin:.:/usr/local/bin:/usr/java/jdk1.3.1_07/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/ora9iasr1/bin
    LD_LIBRARY_PATH /home/ora9iasr1/product/9.0.1/6iserver/lib
    ORACLE_HOME /home/ora9iasr1/product/9.0.1/6iserver
    ORACLE_PATH undefined
    REPORTS60_PATH undefined
    REPORTS60_TMP undefined
    REPORTS60_CGIMAP undefined
    ==============================
    I can set it with editing registery on Windows.
    But thought I set it with export option at .bash_profile, reports60.sh and reports_server on Unix platform, it did not affected.
    Please let me know how to set reports environment on Unix.
    regards..
    Ryu,

    The reports CGI is started from script rwcgi60. Did you set those env variables in rwcgi60? Or did rwcgi60 call reports60.sh to set env variables? Please check.
    -Jeff

  • How to set up multiple JVMs on same server

    I try to set at least 2 JVMS run on same server (2CPUS) but I do know how to set manual start server. I can't find the startup and stop scrits in oracle_home/apache/apache/bin directory. Who can help me to set this up?

    my reply is good haina
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by jianing shu ([email protected]):
    I try to set at least 2 JVMS run on same server (2CPUS) but I do know how to set manual start server. I can't find the startup and stop scrits in oracle_home/apache/apache/bin directory. Who can help me to set this up? <HR></BLOCKQUOTE>
    null

Maybe you are looking for