1 2 Previous Next 18 Replies Latest reply on Oct 22, 2013 3:55 PM by sb92075

    ORACLE_UNQNAME not defined

    787588
      Hi Experts,

      When i try to check the status of agent. It giving following error and also i set OMS_HOME, ORACLE_HOME & SID also.
      And also provide me how to start & stop the GRID, There is any prefernce? Thanks.

      [oracle@rac1 ~]$ emctl status agent
      Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name.
      [oracle@rac1 ~]$
        • 1. Re: ORACLE_UNQNAME not defined
          12cdb
          Set ORACL_UNQNAME parameter as well.

          export ORACLE_UNQNAME=<name of the database >
          • 2. Re: ORACLE_UNQNAME not defined
            787588
            Hi.

            Thanks for your quick response.

            Still i have the same issue.


            [oracle@rac1 ~]$ ps -ef|grep pmon
            oracle 6258 1 0 2010 ? 00:00:00 asm_pmon_+ASM
            oracle 10087 1 0 Mar17 ? 00:00:00 ora_pmon_PROD
            oracle 31860 30919 0 15:39 pts/1 00:00:00 grep pmon
            [oracle@rac1 ~]$ export ORACLE_SID=PROD
            [oracle@rac1 ~]$ emctl status agent
            Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name.
            [oracle@rac1 ~]$
            • 3. Re: ORACLE_UNQNAME not defined
              sb92075
              post results from following OS command

              env | sort
              • 4. Re: ORACLE_UNQNAME not defined
                Lubiez Jean-Valentin
                Hello,

                provide me how to start & stop the GRID, There is any prefernce? Thanks.
                This link may guide you (just scroll down to Startup/Shutdown) for OEM Grid Control *11gR1*:

                http://www.oracle-base.com/articles/11g/GridControl11gR1InstallationOnOEL5.php#startup_shutdown


                Hope this help.
                Best regards,
                Jean-Valentin
                1 person found this helpful
                • 5. Re: ORACLE_UNQNAME not defined
                  12cdb
                  PLEASE READ.

                  $export ORACLE_UNQNAME=prod
                  • 6. Re: ORACLE_UNQNAME not defined
                    787588
                    Please see the below requested output.




                    [oracle@rac1 ~]$ env | sort
                    _=/bin/env
                    CLASSPATH=/u01/app/oracle/product/11.2.0/db_1/JRE:/u01/app/oracle/product/11.2.0/db_1/jlib:/u01/app/oracle/product/11.2.0/db_1/rdbms/jlib
                    CVS_RSH=ssh
                    G_BROKEN_FILENAMES=1
                    HISTSIZE=1000
                    HOME=/home/oracle
                    HOSTNAME=rac1.bas.com
                    INPUTRC=/etc/inputrc
                    LANG=en_US.UTF-8
                    LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/db_1/lib:/lib:/usr/lib
                    LESSOPEN=|/usr/bin/lesspipe.sh %s
                    LOGNAME=oracle
                    LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
                    MAIL=/var/spool/mail/oracle
                    OMS_HOME=/u01/app/oracle/product/11.2.0/agent_home/agent11g
                    ORACLE_BASE=/u01/app/oracle
                    ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
                    ORACLE_HOSTNAME=rac1.bas.com
                    ORACLE_SID=PROD
                    ORACLE_TERM=xterm
                    ORACLE_UNQNAME=/u01/app/oracle/product/11.2.0/agent_home/agent11g
                    ORA_CRS_HOME=/u01/app/oracle/product/11.2.0/grid
                    PATH=/u01/app/oracle/product/11.2.0/db_1/bin:/u01/app/oracle/product/11.2.0/grid/bin:/u01/app/oracle/product/11.2.0/agent_home/agent11g/bin:/usr/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin
                    PWD=/home/oracle
                    SHELL=/bin/bash
                    SHLVL=1
                    SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
                    TERM=xterm
                    TMPDIR=/tmp
                    TMP=/tmp
                    USER=oracle
                    [oracle@rac1 ~]$
                    • 7. Re: ORACLE_UNQNAME not defined
                      787588
                      Hi,

                      Still i set the SID But im facing same issue. But i can able to get results when i fire command from the direct location as below..






                      [oracle@rac1 ~]$ echo $ORACLE_SID
                      PROD
                      [oracle@rac1 ~]$ emctl status agent
                      EM Configuration issue. /u01/app/oracle/product/11.2.0/db_1/rac1.bas.com_/u01/app/oracle/product/11.2.0/agent_home/agent11g not found.
                      [oracle@rac1 ~]$ /u01/app/oracle/product/11.2.0/agent_home/agent11g/bin/emctl status agent
                      Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
                      Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
                      ---------------------------------------------------------------
                      Agent Version : 11.1.0.1.0
                      OMS Version : 11.1.0.1.0
                      Protocol Version : 11.1.0.0.0
                      Agent Home : /u01/app/oracle/product/11.2.0/agent_home/agent11g
                      Agent binaries : /u01/app/oracle/product/11.2.0/agent_home/agent11g
                      • 8. Re: ORACLE_UNQNAME not defined
                        12cdb
                        ORACLE_BASE=/u01/app/oracle
                        ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
                        ORACLE_HOSTNAME=rac1.bas.com
                        ORACLE_SID=PROD
                        ORACLE_TERM=xterm
                        ORACLE_UNQNAME=/u01/app/oracle/product/11.2.0/agent_home/agent11g
                        Please Set
                        [oracle@rac1 ~]$ export ORACLE_UNQNAME=prod
                        [oracle@rac1 ~]$ emctl status agent
                        • 9. Re: ORACLE_UNQNAME not defined
                          787588
                          Please see the status, Not able to see

                          [oracle@rac1 ~]$ echo $ORACLE_SID
                          PROD
                          [oracle@rac1 ~]$ export ORACLE_UNQNAME=PROD
                          [oracle@rac1 ~]$ emctl status agent
                          EM Configuration issue. /u01/app/oracle/product/11.2.0/db_1/rac1.bas.com_PROD not found.
                          [oracle@rac1 ~]$
                          • 10. Re: ORACLE_UNQNAME not defined
                            12cdb
                            Now better:

                            Please read the metalink note [ID 1099271.1]

                            https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=1099271.1

                            In your case it will be better option for you to re-create repository

                            <ORACLE_HOME>/bin/./emca -deconfig dbcontrol db -repos drop

                            <ORACLE_HOME>/bin/emca -config dbcontrol db -repos create
                            • 11. Re: ORACLE_UNQNAME not defined
                              787588
                              In your case it will be better option for you to re-create repository

                              <ORACLE_HOME>/bin/./emca -deconfig dbcontrol db -repos drop

                              <ORACLE_HOME>/bin/emca -config dbcontrol db -repos create
                              you are completely wrong, See there is problem with environment, that im unable to trace out.
                              if you execute from the direct location you can able to see the status agent, Then what is the need to drop & recreate?

                              If i'm exporting OMS_HOME binaries in ORACLE_HOME, then i can able to see the status & also able to upload the agent.

                              Hope you understood.

                              [oracle@rac1 ~]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/agent_home/agent11g
                              [oracle@rac1 ~]$ export PATH=$ORACLE_HOME/bin:$PATH
                              [oracle@rac1 ~]$ emctl status agent
                              Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
                              Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
                              ---------------------------------------------------------------
                              Agent Version : 11.1.0.1.0
                              OMS Version : 11.1.0.1.0
                              Protocol Version : 11.1.0.0.0
                              Agent Home : /u01/app/oracle/product/11.2.0/agent_home/agent11g
                              Agent binaries : /u01/app/oracle/product/11.2.0/agent_home/agent11g
                              • 12. Re: ORACLE_UNQNAME not defined
                                12cdb
                                :) found the solution. Now mark the post as answered
                                • 13. Re: ORACLE_UNQNAME not defined
                                  787588
                                  Sorry, I have not found the solution.

                                  if i set ORACLE_HOME as OMS_HOME binaries.. what about ORACLE DB HOME?

                                  I want to connect both ORACLE database & also wants to execute emctl commands.

                                  Hope you understood. let me know if you need more clarifications..
                                  • 14. Re: ORACLE_UNQNAME not defined
                                    12cdb
                                    Please copy and pasted the contents of /etc/oratab file.

                                    if i set ORACLE_HOME as OMS_HOME binaries.. what about ORACLE DB HOME?
                                    Whenever you want to connect to the database, type

                                    *$. oraenv*

                                    (mind it is . (dot) space oraenv)

                                    It prompts for ORACLE_SID value, supply the value of ORACLE_SID and it will automatilly set the ORACLE_SID, ORACLE_HOME and PATH variable.
                                    1 person found this helpful
                                    1 2 Previous Next