Why do we actuallya need the setting of environment variables?

Hello guys,
I read that, in order to connect to the database via SQL*Plus, we need to have the environment variables set. So, SQL*Plus is a command tool, which doesnt know over which path to connect to db, if the environment variables are not set?
How about the needs of setting environment variables at point of view of MS-DOS? I know that over MS-DOS we can check if the environment variables are already set or not. Or we can actively set the environment variables.
When should we actually set the environment variables? Before we run the GUI or after? I read, that if we set it before we run the GUI, then the setting will be taken over when it comes to that step by running GUI. I am curious, since this would be interesting to know, if we use other version than XE.
Thanks..

Oracle's flexibility ... many different versions working the same on many different versions of many different operating systems ... means that a single consistent installation and configuration methodology must work everywhere so as not to have the limitations of other competing products that work on only a single operating system or require that one learn a different syntax and methods for different versions.
Be grateful Oracle is as it is. Your competence in one version and operating system translates into competence in others.

Similar Messages

  • Why do we need to declare CATALINA_HOME environment variable in Tomacat?

    {color:#ff0000}*Why do we need to set CATALINA_HOME
    environment variable while using TomCat and what happens if we do not
    {color}
    {color:#008000}If anybody has the solution .. please do reply
    {color}
    Thanks &
    Regards, Akshay_L

    SoulTech2012 wrote:
    it makes zero sense because if CATALINA_HOME is not set, then CATALINA_HOME/bin won't resolve at all (unless some form of magic is used)
    # Get standard environment variables
    PRGDIR=`dirname "$PRG"`
    # Only set CATALINA_HOME if not already set
    [ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." ; pwd`rightBy "right", are you being sarcastic or are you saying that code is correct?
    It's a pretty standard technique for setting default variables under *nix, no magic involved. And this particular example was taken from the Tomcat 5.5.25 startup script.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Setting new environment variable on Linux

    {noformat}I need to set new environment variable on my linux machine from inside my code. I am using csh and the command works fine from command line:
    setenv IFConfigLocation4 /home/username/myfile.xml
    But when i try the same thing from Java code it does not seem to have any effect. here is my code:
    import java.util.*;
    import java.io.*;
    public class CDE_parser_methods{
    public static String fileParse(String inFile, String parserName, String outFile, String CMConfig_locale)
    String parsed = "SUCCESSFUL";
    System.out.println("Parsing file..." + "\nParser name: " + parserName +"\nInput file name: " + inFile + "\nOutput file name: " + outFile + "\nCMConfig file is: " + CMConfig_locale);
    System.out.println("Current Java version: " + System.getProperty("java.version"));
    try
              String cmd[]={"/bin/csh", "-c", "setenv IFConfigLocation4 " + CMConfig_locale};
              Process proc = Runtime.getRuntime().exec(cmd);
              int exitVal= proc.waitFor();
              System.out.println("Value of setenv command is: " + exitVal);
              String cmd2[]={"/bin/csh", "-c", "env"};
              Process proc2 = Runtime.getRuntime().exec(cmd2);
              InputStream instr = proc2.getInputStream();
              InputStreamReader inread = new InputStreamReader(instr);
              BufferedReader buf = new BufferedReader(inread);
              String line=null;
              while((line=buf.readLine()) != null)
                   System.out.println(line);
              int exitVal2= proc2.waitFor();
              }catch(CMException cme){
                   System.out.println("Issue when trying to executing parse command, details: " + cme.getMessage());
                   System.out.println("Description of the issue is: " + cme.getDescription());
                   parsed = "FAILURE: " + cme.getDescription();
              }catch(Exception e){
                   System.out.println("Uncought exception, details: " + e.getMessage());
                   parsed = "FAILURE: " + e.getMessage();
         return parsed;
    public static void main(String[] args) {
         String results=CDE_parser_methods.fileParse("/opt/itemfield/ServiceDB/Project2/Mapping_for_Account_Number_Structure_ITS_Input_File.xls","MappingforAccountNumberStructure","/opt/itemfield/ServiceDB/Project2/test_ws_44.xml","/home/rvenishe/CMConfig.xml");
         System.out.println("Result of fileParse call is: " + results);
         }The out put of my env command does NOT contain system variable "IFConfigLocation4". Any ideas? {noformat}

    Environment variables and their values set from within a user process has their scope and lifetime limited to the process and its subprocesses. See java.lang.ProcessBuilder class and its API documentation for setting env for a subprocess that will be started by a ProcessBuilder instance. Even in the C programming we have the same limitation for the environment.
    Since they are not globally set, system command like env or Java method like System.getenv() can't see them.

  • Why can't i change the setting at the security

    Why can't i change the setting at the security & privacy? After I switch to OS X Yosemite, i cant install some application. It says that I can install due unidentified developers. Can anyone help?

    You can change the setting, you may need to click the lock at the bottom of the preference pane. Be careful what you download and install, Gatekeeper is there to help you. OS X: About Gatekeeper - Apple Support

  • TS1307 The port I'm using is 465. Not working. Just need the setting for outgoing mail. Incoming is still working.

    The port I'm using is 465. Not working. Just need the setting for outgoing mail. Incoming is still working.

    "Well Known" TCP and UDP ports used by Apple software products
    http://support.apple.com/kb/TS1629?viewlocale=en_US

  • Do I need to set  system env variables for weblogic and SOA server installation?

    Hi All,
       I already have two weblogic application servers on my machine(that were installed by others).
    I observed some environment variables were also set in System variables(ORACLE_HOME,WEB_SERVER_HOME etc) section in Env variables section(Start Menu---> Computer --> properties ---).But why do we need to have system environment variables wherein we already have those variables in files like setDomainEnv.bat or/and setSOADoaminEnv.bat for each server.
    And one more thing system variables will be applicable for all servers(the whole machine) right.It may spoil the installation of new servers and present servers as variables should be unique to each server.
        I want to install weblogic and SOA server installation.
    So Can I remove the existing system variables(as they will applicable for every server) and install weblogic and SOA server installation without setting up the environment variables?
    Especially I have multiple Weblogic servers,In that case how it would be to have environment variables(JAVA_HOME,WL_HOME,ORACLE_HOME etc)?
    Please guide me on this to installl SOA suite .
    Thanks in advance

    Hi All,
       I already have two weblogic application servers on my machine(that were installed by others).
    I observed some environment variables were also set in System variables(ORACLE_HOME,WEB_SERVER_HOME etc) section in Env variables section(Start Menu---> Computer --> properties ---).But why do we need to have system environment variables wherein we already have those variables in files like setDomainEnv.bat or/and setSOADoaminEnv.bat for each server.
    And one more thing system variables will be applicable for all servers(the whole machine) right.It may spoil the installation of new servers and present servers as variables should be unique to each server.
        I want to install weblogic and SOA server installation.
    So Can I remove the existing system variables(as they will applicable for every server) and install weblogic and SOA server installation without setting up the environment variables?
    Especially I have multiple Weblogic servers,In that case how it would be to have environment variables(JAVA_HOME,WL_HOME,ORACLE_HOME etc)?
    Please guide me on this to installl SOA suite .
    Thanks in advance

  • I want to set Jdeveloper environment variables

    First,thanks for your answer.But I mean to set Jdevelop
    environment variables.If I can't set right Jdeveloper
    enironment,program can't pass the compile.Because "import
    oracle.html.*" can't be found by Jdeveloper.
    null

    Hi
    You would need to include jweb.jar file as a library in your
    project properties.
    jweb.jar comes with Oracle Application Server. Copy the jar file
    to lib directory in JDeveloper and add it as a library to the
    project.
    This would make import oracle.html.* work.
    regards
    raghu
    Micheal Chang (guest) wrote:
    : First,thanks for your answer.But I mean to set Jdevelop
    : environment variables.If I can't set right Jdeveloper
    : enironment,program can't pass the compile.Because "import
    : oracle.html.*" can't be found by Jdeveloper.
    null

  • Set DISPLAY environment variable -- in DBCA not working at AIX OS

    Hi,
    I want to create new database in AIX OS and database is oracle 10g:-
    When i say DBCA it is giving below error, what should i do?
    $ dbca
    DISPLAY not set.
    Set DISPLAY environment variable, then re-run.
    Please help...

    Pravin wrote:
    How to set the DISPLAY environment variable in AIX?Usual format is:
    +<host>:<display-number>+
    E.g.
    export DISPLAY=192.168.0.235:1
    Where the host is the hostname or IP address of the client platform running a X-Server. If the X-Server is running locally, then this entry can be omitted.
    The display-number is the display number of the X-Server to use. A single X-Server can have multiple displays. E.g. Unix server running a X-Server can have 10 users connected via X-Terminals and will this have 10 displays.
    Judging from X-Windows questions asked on OTN, it seems to be a tad complex to grasp for some - especially those from a MS Windows background as X-Windows is very different and also reverses the client-server concept, requiring the X-Server component to be running on the client platform (where the server platform runs the program that is the X-client).
    So it is a lot easier to rather use something like VNC instead - supported on most Unix platforms, Linux, Windows and Apple's OS/X.
    Simply run the VNC server on the server platform to create a virtual container for running the X-server display. Connect from a client using a VNC client.
    As it uses the RFB (Remote Frame Buffer) protocol, it is a lot faster than running the slower and larger X11 protocol required for X-Windows connectivity over TCP/IP.

  • 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 you set NLS_LANG environment variable in report builder

    How do you set up the reports builder environment to display foreign fonts.
    So far what I read makes me think that in report builder I have to set the NLS_LANG environment variable .
    If anyone has done this is that true and if so how.
    Also the languages I want to use are the following.
    Armenian
    Cambodian
    Chinese
    Russian
    Tagalog
    Vietnamese
    How do I find the NLS_LANG environment variables for these.
    Where I am at now+
    I have to set the DEVELOPER NLS LANG. I see the NLS LANG in the registry and I guess I have to add the DEVELOPER NLS LANG.
    Now I am searching for syntax. If anyone knows the syntax for those languages please let me know and how do I set more than 1 at a time.
    Howard
    Edited by: csphard on Apr 14, 2010 5:17 PM
    Edited by: csphard on Apr 14, 2010 5:22 PM
    Edited by: csphard on Apr 15, 2010 9:02 AM

    Hello Howard,
    Check out the following link here you can find your desired NLS parameters.
    http://www.oracle.com/technology/tech/globalization/htdocs/nls_lang%20faq.htm
    And about the NLS_LANG for developer why you want to create for developer. Its is already there in REGISTRY. Just seaching in developer registry you can find there.
    how do I set more than 1 at a time.
    You can set only one NLS_LANG parameter at a time.
    -Ammad
    Edited by: Ammad Ahmed on Apr 15, 2010 8:52 PM

  • Best practice for setting an environment variable used during NW AS startup

    We have installed some code which is running in both the ABAP and JAVA environment, and some functionality of this code is determined by the setting of operating system environment variables. We have therefore changed the .sapenv_<host>.csh and .sapenv_<host>.sh scripts found in the <sid>adm user home directory. This works, but we are wondering what happens when SAP is upgraded, and if these custom shell script changes to the .sh and .csh scripts will be overwritten during such an upgrade. Is there a better way to set environment variables so they can be used by the SAP server software when it has been started from <sid>adm user ?

    Hi,
    Thankyou. I was concerned that if I did that there might be a case where the .profile is not used, e.g. when a non-interactive process is started I was not sure if .profile is used.
    What do you mean with non-interactive?
    If you login to your machine as sidadm the profile is invoked using one of the files you meant. So when you start your Engine the Environment is property set. If another process is spawned or forked from a running process it inherits / uses the same Environment.
    Also, on one of my servers I have a .profile a .login and also a .cshrc file. Do I need to update all of these ?
    the .profile is used by bash and ksh
    The .cshrc is used by csh and it is included via source on every Shell Startup if not invoked with the -f Flag
    the .login is also used by csh and it is included via source from the .cshrc
    So if you want to support all shells you should update the .profile (bash and ksh) and one of .cshrc or .login for csh or tcsh
    In my /etc/passwd the <sid>adm user is configured with /bin/csh shell, so I think this means my .cshrc will be used and not the .profile ? Is this correct ?
    Yes correct, as described above!
    Hope this helps
    Cheers

  • Setting Oracle environment variable using batch (.bat) file in windows

    Hi,
    Oracle 9i db
    Windows OS
    I am in process to create the database (Considered that Oracle9i software is already installed) by running one batch file which consist of all the scripts for the database creation.
    But i also want to set the environment variables at MyComputer(right click)>properties>advance>environment, permenently by running the batch (.bat) file
    ORACLE_HOME
    ORACLE_BASE
    ORACLE_SID
    So, how can it be done ?
    With Regards

    Hi,
    *@echo off*
    set ORACLE_SID=iprsdb
    set ORACLE_BASE=C:\oracle
    set ORACLE_HOME=C:\oracle\ora92     
    call C:\install_bkp\test_env_var.bat
    echo Test Successfull.
    Above mentioned is the code written in the batch (.bat) file
    In that i have also called another .bat file which test the env. variable values which is as below:
    c:\>test_env.bat
    ===================
    Testing oracle sid
    ===================
    iprsdb
    =====================
    Testing oracle base
    ===================
    C:\oracle
    =====================
    Testing oracle home
    =====================
    C:\oracle\ora92
    Test Successfull.
    But when i checked at MyComputer(right click)>properties>advance>environment variables
    there, I saw none of the entries from the above, why so ?
    how to set env. variables permanently using the DOS commands. ?
    With Regards

  • Setting Linux environment variable

    Is there other web site which talks about how to set the environment variable of J2EE for Linux?
    I followed this web site
    http://www.dougsparling.com/comp/howto/linux_java.html
    but after all
    when I tired to compile a servlet program... it couldn't be complied. I think the case is that the compiler couldn't find servlet.jar ...
    why is that?

    You have to verify that your CLASSPATH environment variable is set in your account's profile. I use the
    bash shell therefore my variables are set in .bashrc
    for example my CLASSPATH is set to :
    CLASSPATH=.:$J2EE_HOME/lib/j2ee.jar:$J2EE_HOME/lib/locale

  • How to set timezone environment variable to EST

    Hello Experts
    I'm having problem when I try to run my Enterprise Manager. Listner start normaly but then I tries to start the database I got the following message.
    oracle@linux-f4y3:~> /apps/oracle/product/10.2.0/db_1/bin/emctl start dbconsole
    Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
    Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
    http://linux-f4y3.site:1158/em/console/aboutApplication
    Timezone mismatch: The agentTZRegion value (EST) in
    /apps/oracle/product/10.2.0/db_1/linux-f4y3.site_orcl/sysman/config/emd.properties
    does not match the current environment TZ setting(EST).
    The dbconsole cannot run with this mismatch.
    If EST is the correct timezone, set your timezone environment variable to EST and repeat the 'emctl start dbconsole' operation.
    If EST is not the correct timezone, make sure that the timezone in your environment is correct, and then run the following command in your local Oracle Home: 'emctl resetTZ agent'
    The output of this command will include detailed instructions to follow, to correct the mismatch.
    To me looks like I need to fix the timezone on my machine but I don't know how. Can please somebody shows me the steps how to achieve this task?
    Thanks a lot in advance.

    I believe this issue is occurring because timezone info between the OS and oracle is out of synch - possibly because timezone patches have been applied to the OS or oracle, but not both. It is always good practice to apply such patches to both OS and Oracle.
    Pl see these MOS Docs
    401834.1 - Problem: DST: Workaround to EM Agent Restart Problem Due to a Daylight Savings Change
    362888.1 - Problem: Startup Agent: EM Agent will not start due to Timezone mismatch (Daylight Savings changes for Australia)
    549079.1 - Troubleshooting Database Control Startup Issues
    HTH
    Srini

  • Setting windows environment variables from Java program

    Is there any way to set environment variables from Java program in Windows? Any help is appreciated.
    Here is my situation:
    I need to decrypt an encrypted Oracle user password in a batch file which will be used while running a sql script with sqlplus. I was planning to have bat file which will call a Java program decrypt the password and set it as an env variable in windows which will be available while calling sqlplus.
    thanks

    Runtime.exec has a lot of overloadings. Two of them
    allows you to specify the environment variables.
    exec
    public Process exec(String[] cmdarray,
    String[] envp,
    File dir)
    throws IOExceptionExecutes the specified command and
    arguments in a separate process with the specified
    environment and working directory.
    cmdarray - array containing the command to call and
    its arguments.
    envp - array of strings, each element of which has
    environment variable settings in format name=value.
    dir - the working directory of the subprocess, or null
    if the subprocess should inherit the working directory
    of the current process.
    I had this sample program:
    public class SetVarExample {
    public static void main (String[] args) throws Exception {
         String[] cmd_env= new String[] {"password="+"ABCD","Path=C:\\Sun\\AppServer\\jdk\\bin"};
         String cmd = "cmd /c SET ";
         Runtime.getRuntime().exec(cmd,cmd_env);
    System.out.println( "Finish ...." );
    I tried it in a command prompt. But looks like when the program exits, it's a whole new process and so it does not retain the env variables set in the java program.
    Any suggestions? Am I doing it worng?
    thanks

Maybe you are looking for