Environment Variables in a single host same user  two Oracle homes OAS

Hello All.
I've been googleing and looking over otn site but I cannot find solution to my question that, perhaps, is pretty easy.
I have an OAS 10g installation in a Linux single node.
I've made the installation the INFRA and the MT with the same user (oracle)
If I set the ORACLE_HOME in the oracle user .bash_profile my command lines will work just for the ONE of the Oracle Home (the one pointed in the profile).
I have two solutions:
1. Make the .bash_profile dynamic. that is to program like a menu to ask what Environment Variables to load (infra's or MT's.)
2. Make like .bat files to just call them and set whatever I need.
Sounds simple, but I have no idea how to make or program any of them. I am pretty much a newbie in unix shell script programming.
Thanks in advance any help.

Ricard wrote:
Hi
This is for test purpose.
I know oracle dont enjoy having same SID for 2 instances in same host.
I was reading about it and seems is possible on UNIX machines. So i tried to do in a red hat linux enterprise 4.
But with dbca, im always stoped by oratab, cause cant have same oracle_sid in oratab.
Any idea how to do it?
Not using dbca and making the database manually via script?
ThanksWell, if you read this link,
http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/startup.htm#CNCPT601
And from here, this quote,
>
Multiple instances can run concurrently on the same computer, each accessing its own physical database. In large-scale cluster systems, Real Application Clusters enables multiple instances to mount a single database.>
One instance can be used only by one single database on a box. There may be another instance of the same name available but Oracle won't let you open that database. You will receive,
ORA-01102 cannot mount database in EXCLUSIVE modeCause: Some other instance has the database mounted exclusive or shared.
Action: Shut down the other instance or mount in a compatible mode.>
So , in any case, you are limited to one single database and one instance. As Paul mentioned, using different case, you may be able to achieve this but that still can't be called a true test as on *nix, case does matter and ORCL and orcl are going to be considered as two different databases.
HTH
Aman....

Similar Messages

  • How to set environment variables in mac mavericks for all users

    Can someone here tell me the file to set JAVA_HOME environment variable for all users?
    Thanks!

    nara999999,
    the file in which to set the environment variable depends upon the login shell of each user. Presuming that every user has bash as his login shell, and that the environment variable will be needed only in interactive shells, then the file to edit will be /etc/bashrc; if the environment variable will also be needed in non-interactive shells, then  /etc/profile should be edited instead (and this will also cover users with either sh or zsh as their login shell). If ksh is used as a login shell, then /etc/ksh.kshrc will need to be edited. If csh or tcsh is used as a login shell, then /etc/csh.login will need to be edited.

  • Environment variables in a OS User-Defined Metric Page

    I'm creating an OS-based User-Defined Metric in a Grid Control through a perl script
    How can I pass my own environment variables in the script setting the User-Interface Element- Environment, where for example i can specify var1=%perlBin% var2=%scriptsDir% etc ?
    The description in the User-Defined Metric Page says:
    Environment
    See Available Properties box for values you can assign to environment variables. Enter as space-separated list: var1=prop1 var2=prop2
    -r
    Josh

    That's exactly correct, you can specify them in the Environment field as defined here:
    Table 15-3 Create User-Defined Metric Page: Definition
    User-Interface Element      Description
    Metric Name
    Metric name identifying the user-defined metric in the Enterprise Manager user interface. This name must be unique for all User-Defined Metrics created on that host.
    Metric Type
    Type of the value returned by the user-defined script. Choose "NUMBER" if your script returns a number. Choose "STRING" if your script returns an alphanumeric text string.
    Command Line
    Enter the complete command line entry required to execute the user-defined script. You must enter the full command path as well as full path to the script location. For example, to run a Perl script, you might enter something like the following in the Command Line entry field:
    /u1/bin/perl /u1/scripts/myScript.pl
    The content of the Command Line is passed as a literal string, so you may use any syntax, special characters, or parameters allowed by your operating system.
    Environment
    Optional. Enter any environmental variable(s) required to run the user-defined script. A list of predefined properties that can be passed to your script as variables is listed in the Available Properties box. You may also specify your own environment variables. Multiple variables can be defined as a space-separated list.
    Example: If your script uses three variables (var1, var2, var3) where var1 is the location of the Perl directory (predefined), var2 is the directory where your Perl scripts are stored (predefined), and var3 is an Oracle home, your entry in the Environment text entry field would appear as follows:
    var1=%perlBin% var2=%scriptsDir% var3=/u1/orahome10
    For example, simply set var1=/this/is/the/directory/i/want/to/have/set/in/var1
    then var1 will be /this/is/the/directory/i/want/to/have/set/in/var1

  • Does "Allow log on locally" work with environment variables?

    This is merely out of curiosity and just because I'm doing some conceptual gambling.
    I'd like to create a GPO having the Allow log on locally set to something like the following list:
    %OWNER%
    BUILTIN\Administrators
    The concept behind this is to prepare the system during OS installation with a value to the OWNER environment variable to allow only the specified user account (apart from the Administrators group, of course) to log on to the system without A) having to
    configure this setting locally on the client and B) having a great range of different GPOs to handle all the user/computer combinations.
    My questions are:
    Does this work at all?
    If it works, what do I need to provide as a value?
    I've already tried to set <user name>, <domain name>\<user name> and
    <user name>@<FQDN> but none of those seem to work.

    Hi,
    Glad to see your problem resolved. Hope your experience could helps other who had same cofusion.
    Roger Lu
    TechNet Community Support

  • Environment Variables (Urgent)

    Hi everyone,
    Does any body know how to use environment variable in any application. I am using Oracle 8.1.6 on Windows NT. And I want to use the value of an environment variable in my procedure.
    Any sooner help will be highly appreciated.
    Thanks
    Mustafa Butt

    Even I am trying this :
    declare
         v_user varchar2(30);
    begin
    Tool_Env.GetVar('USER', v_user);
    message('user name : '||v_user);
    end;
    which doesnt give me result as it is showing null as a value.
    Am I making a mistake???

  • Windows - PERL5LIB Environment variables

    Hi All,
    I was trying out xampp and I removed the perl5lib environment variables for Oracle. Unfortunately, I did not save the settings in notepad or something and yes, I know how stupid that was. Consequently, now all the clients are failing on that server. For example, if I click on SQL*Plus, I get the "Need to set ORACLE_HOME" error (same thing for PHP, etc.).
    I would really appreciate it if someone can send me their PATH and PERL5LIB environment variables from a Windows (preferrably XP) installation of Oracle. Also, is there some other way to restore these values? Like a bat file or something that gets installed. Thanks a lot.

    Hi. Thank you for your response. I tried rebooting, but I still get the error.
    Like I said, the only change I made was to the environment variables. It is possible that xampp made some changes behind the scenes, but the only known change was me replacing the Oracle PERL paths with the xampp PERL paths in the Windows environment variables (through "My Computer" --> "Properties").
    Is it possible to do a re-configuration using the installer instead of a complete re-install? If you have any other ideas, I would appreciate it. Thanks.

  • Forget to set environment variable export SAPINST_USE_HOSTNAME

    Dear Experts
    we have installed the SAP ECC6.0 EhP4 in HACMP environment with AIX6.1 ,Power HA cluster6.1, oracle 11g database
    the problem is while installing the CI and ASCS and Dialog instance I  missed  to set environment variable
    export SAPINST_USE_HOSTNAME = <virtual Host Name> and while starting the sap-inst also i didn't start as like
    ./sapint SAPINST_USE_HOSTNAME  = <virtual Host Name>,Now i am facing problem while doing cluster fail over to another node
    Node A host Name is not reflecting in Node B and I am not able to start  the SAP with host name of Node A
    in AIX6.1 in IBM Admin they didnt give any virtual host name they said that they  have configured  the cluster with two service IP there is no virtual IP in AIX6.1
      please help me out how to resolve this host Name issue and to start the SAP in Node B
    Thanks in Advance
    krishna

    Hi Krishna,
    I dont agree with the AIX 6.1 having no virtual ip's, because i recently installed a HA instance with ASCS, SCS & also ERS on 6.1
    to answer your questions:-
    "can you tell is this correct setup or anything we did mistake for file system setup and installation"
    This depends on what your requirement is. Typically a cluster will have Oracle on one host and SAP on the other host. Ill explain the VCS concept, so you will have a better understanding.
    Lets consider Node1 & Node2. Now each node will have a physical IP and a virtual IP. The Virtual IP will be associated with a set of file systems. For example /oracle will be associated to virtual ip lets say "xyzDB" & the /usr/sap/<sid>, TRANS & sap mount will be associated with virtual ip lets say "abcCI". Now when the cluster fails over to which ever node, these file systems will still be associated with their respective virtual ip's.
    So, the start profile will always have START_DVEBMGS_abcCI. Irrespective of which Node the sap is in, when you start the SAP, it will use the virtual hostname and start up SAP. I hope your getting the concept.?
    Coming back to the setup, since you have ASCS, Oracle , CI & a dialog instance. Im not sure what file systems you have associated with VCS groups. Can you give command "hastatus -sum" and post the output?
    Regarding your other question
    "this file system is moving to Node B but while starting SAP on Node B host Name is not reflecting and SAP is not coming up  due to there hostname didnt change in Node B,, can you advice me please ,,"
    This is inline with what i explained above for cluster mechanism. The physical IP will not change. It is only the virtual IP that is associated with a set of file systems.
    Ill give you one more example, Consider the parameter rdisp/mshost = <> . What should this be? Physical host or Virtual host?? :-) .It should be Virtual. Because the CI can be in Node1 or Node2. If we give the physical host, then if the SAP fails over to the other node. How will it start up? because the profiles still say the message server is in the other host... Getting my point?
    Regards,
    Shanser

  • Does Oracle 10G supports 2 Oracle homes on same Host?

    Hi,
    I have installed oracle 10 G R2 on windows OS. I have installed oracle twice, i.e. i have two oracle homes. After installation these are the problems i am facing:
    1. I am not able to start oracleDBconsoleorcl, OracleOraDb10g_home1TNSlistener services. I am not able to get sql command prompt for the oracle home1.
    2. But I am able to start oracleDBconsoleorcl2, OracleOraDb10g_home2TNSlistener services. I am able to get sql command prompt for the oracle home2.
    Can anyone please tell me what the problem is? Someone told me that in 10G i cannot have two Oracle homes. Is it true? if yes then waht is the work around for this problem.
    Thanks
    Varun

    Why have you installed it twice?
    You only need a single home for running any number of instances. (though I question the logic of the person who runs multiple database instances on the same platform as sop)
    Running multiple homes are usually a solution when having to run two different version instances. E.g. installing Oracle 10G in addition to a 9i installation in order to create a 10G database to use for porting the 9i database, after which the 9i database and installation will be trashed.
    Running two homes of the same version is silly - you're simply duplicating a truck load of static files, executables, libraries, message files and so on.. for what purpose?

  • Setting ORACLE_HOME as Environment variable in Windows

    Hi,
    I have a problem.
    I am using Oracle Application Server 9.0.4. on Windows 2000 server .
    There are 2 homes, one for mid tier and one for Infra.
    Now when I look in PATH variable of the environment variables, i can see both homes specified there.
    But when issue echo %ORACLE_HOME% from command prompt then i can see nothing.
    And there is no ORACLE_HOME environment variable, so i created a ORACLE_HOME variable and assigned the Oracle home path to it.
    Now when i issue the command echo %ORACLE_HOME% i can see the value of the ORACLE_HOME,
    So is this the correct way to set the ORACLE_HOME?
    Is this the way to create the ORACLE_HOME environment variable.
    Thanks & Regards,
    Avinash.
    Pune.
    India.

    So is this the correct way to set the ORACLE_HOME?
    Is this the way to create the ORACLE_HOMEenvironment
    variable.No. Not on Windows platforms.
    The Oracle Home paths are already set via Windows
    Resgistry values. Check HKLM\Software\Oracle\ (HOMEx
    or KEY_<home name>) for ORACLE_HOME settings.
    This is used by programs via PATH and when calling a
    program that uses the oracle.key files from OH\bin.
    Setting it via system environment could override
    individual settings, which may lead to unwanted
    results or issues.True for some areas.
    And yet, for Patching you MUST set the Oracle_Home variable, in which case Virag's response is the correct method.

  • Multiple database instance for one user in Oracle XE

    Hello,
    I would like to know if there is a way to create more than one database/schema for the same user in Oracle XE.
    Thanks.

    And i say...
    yes, indeed.. you can find out some info here..
    http://www.oracle.com/technology/pub/articles/cunningham-database-xe.html

  • I am not getting User Environment Variable Value

    Hi Team,
    I have been Trying to recover variables values using an anonym procedure from Windows XP SP3
    I have already executed following procedure.
    BEGIN
    DECLARE
    gf_filelog UTL_FILE.file_type;
    v_file_log VARCHAR2 (1024) := ' ';
    gv_path_log VARCHAR2 (1024) := ' ';
    gv_path_log2 VARCHAR2 (1024) := ' ';
    gv_file_log VARCHAR2 (1024) := ' ';
    BEGIN
    DBMS_OUTPUT.put_line ( 'obteniendo valores of vars: '
    || gv_path_log
    || ' '
    || gv_file_log
    DBMS_SYSTEM.get_env ('ORACLE_HOME', gv_path_log);
    DBMS_SYSTEM.get_env ('PATH_MODULO', gv_path_log2);
    DBMS_SYSTEM.get_env ('FILELOG', v_file_log);
    DBMS_OUTPUT.put_line ( 'valores vars ORACLE_HOME: '
    || gv_path_log
    || 'PATH_MODULO:'
    || gv_path_log2
                   || ' FILELOG:'
                   || v_file_log
    gv_file_log :=
    v_file_log || TO_CHAR (SYSDATE, 'yyyymmddHH24MISS')
    || '.log';
    DBMS_OUTPUT.put_line ( 'Nombre de Archivo creado'
    || gv_path_log
    || ' '
    || gv_file_log
    gf_filelog := UTL_FILE.fopen (gv_path_log, gv_file_log, 'w');
    DBMS_OUTPUT.put_line ('Archivo creado' || gv_path_log || ' '
    || gv_file_log
    UTL_FILE.put_line (gf_filelog,
    || TO_CHAR (SYSDATE, 'HH24:MI:SSSSS')
    || ']--> '
    || 'Prueba de escritura'
    || gv_path_log
    || ' '
    || v_file_log
    UTL_FILE.fflush (gf_filelog);
    UTL_FILE.fclose (gf_filelog);
    EXCEPTION
    WHEN OTHERS
    THEN
    DBMS_OUTPUT.put_line ( '[reporta_log]Error en :'
    || SQLCODE
    || ' - '
    || SQLERRM
    raise_application_error (-20000,
    '[reporta_log]Error en :'
    || SQLCODE
    || ' - '
    || SQLERRM
    END;
    END;
    I show you data result after procedure was excecuted.
    obteniendo valores of vars:
    valores vars ORACLE_HOME: E:\oracle\product\10.2.0\db_1PATH_MODULO: FILELOG:
    Nombre de Archivo creadoE:\oracle\product\10.2.0\db_1 20111122171625.log
    [reporta_log]Error en :-29280 - ORA-29280: invalid directory path
    BEGIN
    ERROR at line 1:
    ORA-20000: [reporta_log]Error en :-29280 - ORA-29280: invalid directory path
    ORA-06512: at line 55
    I see that only ORACLE_HOME variable value was got, question is why, of course, variable values are already defined as user variables.
    Variables PATH_MODULO and FILELOG was defined using windows maintenance variable method, that is :
    1.- settings
    2.- system
    3.- advanced options
    4.- environment variables
    Here my oracle version
    SQL> select version from v$instance;
    VERSION
    10.2.0.1.0
    SQL>
    Is this an Oracle Issue or variables would be defined in another way?
    ORACLE_HOME VARIABLE was created when oracle engine was installed.
    I have got same result after computer was restart.
    I appreciate wathever clue.

    Ok, that is , I only can read environment variables values, but not variables values at user profile. It happends in unix environment too. So I tried to use another instruction sequence in order to read user variables values.
    Regards

  • Same Environment variables?

    Hi,
    I am creating two environments with two different versions of Forte on
    same server, can we keep all the environment variables same except port
    number. Will this create problems in future if we have to connect the
    environments? As usual your help is appreciated. Thanks.
    Sanjeev Arab

    It shouldn't be a problem to share environment variables between environments.
    But, you may run into variable-dependency problems very quickly like, for e.g.,
    FORTE_ROOT, FORTE_NS_ADDRESS, FORTE_GC_SPECIAL which you may want to have
    different values in each environment. Not to mention that it's even more
    confusing when the same application is running in two different environments and
    expecting different values in some application-specific variables on the same
    machine.
    You are better off by launching the environments with two different logins on
    the same machine. This would reduce the interdepedencies.
    Hope this helps.
    Jagadish
    Sanjeev J Arab <arabsdteenergy.com> on 11/09/2000 07:24:57
    To: forte-users <forte-userslists.xpedior.com>
    cc:
    Fax to:
    Subject: (forte-users) Same Environment variables?
    Hi,
    I am creating two environments with two different versions of Forte on
    same server, can we keep all the environment variables same except port
    number. Will this create problems in future if we have to connect the
    environments? As usual your help is appreciated. Thanks.
    Sanjeev Arab
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

  • Environment variables (user) created at OS level dont show up in BIDS 2008

    Environment variables (user) created at OS level don't show up in BIDS 2008.
    I had a variable ConfigLocation created and it is not showing up when I am trying to configure it in BIDS
    Is this a known issue or a bug?
    Now in BIDS it doesnt show up
    Mudassar

    Yes it shows up after restart of BIDS .
    But during design time this is a bug I hope Microsoft fixes this bug in the future releases
    Mudassar
    It's not really a bug. Visual Studio loads the environment variables when starting up.
    In future releases you use projects and parameters instead of environment variables, so the issue goes away ;)
    MCSE SQL Server 2012 - Please mark posts as answered where appropriate.

  • Same user with administrative rights on all the servers in single domain versus domainadmin as a part of administrator group in all the servers

    same user with administrative rights on all the servers in single domain user as a part of administrator group in all the servers:
    same user is configured as administrator on all the servers in one domain at windows 2003 server. Should this user be made part of domain admin and then this can be set up in the group of administrator for all the servers.
    How this is technically different?
    If same user is set up as an administrator on all the servers in domain, will it have the same access on all the files as a domain admin user?
    dhomya

    If the account is not admin on the domaincontrollers and the account is not member of domain admins or any other privileged AD group, the account has only user privileges on AD and thus cannot perform actions like creating and managing  accounts,
    groups, OUs,policies, sites, ...in other words cannot potentially ruin Active Directory.
    I think that is a pretty big difference.
    In fact, it is bad practice to perform you daily server management with an AD privileged account.
    In regards of file access. The domain administrator will be just an admin, and thus has the privilies assigned to the local admin group, just as any other admin. But if it are different accounts they might be member of different groups assigning different
    privileges. Always be carefull when assuming resulting privileges will be the same.
    MCP/MCSA/MCTS/MCITP

  • Best practices for defining Environment Variables/User Accounts in Linux

    Hello,
    After reading throught the Quick Install guide for 10gR2 on x86_64 Linux, I see that it is not recommended to define ANY variables in .bash_profile.
    I'm hoping to get a Best practices approach for defining environment variables - right now we use the oracle linux account for administration including sql*plus. So, where should the myriad variables be defined? Is it important enough to create a user account in linux to support best practices?
    What variables, exactly, should be defined? It seems that LD_LIBRARY_PATH is no longer being used?
    Thanks in advance
    Doug

    Something that I've done for years on unix/linux boxes is to create a seperate environment variable setup file for each instance on the box. This would include things like ORACLE_HOME, ORACLE_SID, etc. Then I would create an alias in my .bash_profile that would execute this script. As an example, I would create a orcl.env file that would hold all of the environment variables for this instance. Then in my .bash_profile I would create a line like the following:
    alias orcl=". $HOME/orcl.env"
    Then from anywhere you could type orcl and you would set your environment to connect to that database.
    Also, if you are using 10g, something else that is really nice if you are using sqlplus, and you connect to different databases without starting a new sqlplus session is to set a parameter in your $ORACLE_HOME/sqlplus/admin/glogin.sql file:
    set sqlprompt "_user 'at' _connect_identifier >"
    This will automatically change your command prompt to look like this:
    RALPH at ORCL >
    if you connect as GEORGE, your prompt will immediately change to :
    GEORGE at ORCL >
    This way you can always know who and where you are connected to.
    Good luck!

Maybe you are looking for