13 Replies Latest reply: Nov 23, 2012 12:57 AM by 44094 RSS

    oracle_unqname and oracle_hostname

    Roger25
      Hi guys,

      Every time i want to stop dbconsole or to start it, i'm prompted to set ORACLE_UNQNAME. Ok, i set it, and then i get an EM configuration issue. How, or where should i (re)define these settings, so the ORACLE_UNQNAME being set to 'orcl' and ORACLE_HOSTNAME to 'localhost'? I did not want every time to set them..
      C:\Documents and Settings\Sorin>emctl stop dbconsole
      Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to da
      tabase unique name.
      
      C:\Documents and Settings\Sorin>set ORACLE_UNQNAME=orcl
      
      C:\Documents and Settings\Sorin>emctl stop dbconsole
      EM Configuration issue. D:\oracle\product\11.2.0\dbhome_1/roger_orcl not found.
      
      
      C:\Documents and Settings\Sorin>set ORACLE_HOSTNAME=localhost
      Thanks
        • 1. Re: oracle_unqname and oracle_hostname
          sb92075
          Roger22 wrote:
          Hi guys,

          Every time i want to stop dbconsole or to start it, i'm prompted to set ORACLE_UNQNAME. Ok, i set it, and then i get an EM configuration issue. How, or where should i (re)define these settings, so the ORACLE_UNQNAME being set to 'orcl' and ORACLE_HOSTNAME to 'localhost'? I did not want every time to set them..
          do the same as for any other OS environmental variable
          • 2. Re: oracle_unqname and oracle_hostname
            Roger25
            Ok, but why the EM configuration issue is in my case D:\oracle\product\11.2.0\dbhome_1/roger_orcl and not localhost_orcl? Where should i redefine it, to be localhost_orcl?
            • 3. Re: oracle_unqname and oracle_hostname
              sb92075
              Roger22 wrote:
              Ok, but why the EM configuration issue is in my case D:\oracle\product\11.2.0\dbhome_1/roger_orcl and not localhost_orcl? Where should i redefine it, to be localhost_orcl?
              use what works.

              what the hostname?

              does hostname depend upon network connect or not?
              • 4. Re: oracle_unqname and oracle_hostname
                Roger25
                I don't know if this depends on what network i'm, but i think in my case i should add an entry in hosts file (?)

                this is my hosts file:
                # Copyright (c) 1993-1999 Microsoft Corp.
                #
                # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
                #
                # This file contains the mappings of IP addresses to host names. Each
                # entry should be kept on an individual line. The IP address should
                # be placed in the first column followed by the corresponding host name.
                # The IP address and the host name should be separated by at least one
                # space.
                #
                # Additionally, comments (such as these) may be inserted on individual
                # lines or following the machine name denoted by a '#' symbol.
                #
                # For example:
                #
                #      102.54.94.97     rhino.acme.com          # source server
                #       38.25.63.10     x.acme.com              # x client host
                
                # This HOSTS file created by Dr.Web Scanner for Windows
                
                     127.0.0.1          localhost
                So if i want that 'roger' to be used as 'localhost' i should add a line:
                roger localhost
                ?
                • 5. Re: oracle_unqname and oracle_hostname
                  Balazs Papp
                  no, your EM is configured with the hostname 'roger', that wont help

                  if you really want it to be localhost that badly, you can reconfigure:
                  set ORACLE_HOSTNAME=roger
                  set ORACLE_SID=orcl
                  set ORACLE_UNQNAME=orcl
                  emca -deconfig dbcontrol db
                  set ORACLE_HOSTNAME=localhost
                  emca -config dbcontrol db
                  also let me note that, in a single instance enviroment, ORACLE_UNQNAME is not required at all, the error message is misleading, and that indicates that you have not set ORACLE_SID
                  • 6. Re: oracle_unqname and oracle_hostname
                    Roger25
                    Ok, koszi ;)
                    but however...
                    C:\Documents and Settings\Sorin>emca -deconfig dbcontrol db
                    Incorrect usage:
                    oracle.sysman.emcp.EMConfigAssistant [options] [list of parameters]
                    Options:
                            -a                           :configure for an ASM database
                            -b                           :configure for automatic backup
                            -c                           :configure a cluster database
                            -e <node>                    :remove a node from the cluster
                            -f <file>                    :specify the file name that contains parame
                    ter values
                            -h                           :help
                            -m                           :configure EM for a central agent
                            -n <node>                    :add a new node to the cluster
                            -r                           :skip creation of repository schema
                            -s                           :silent mode (no user prompts
                            -x <db>                      :deletion of a SID or DB
                            -RMI_PORT <port>             :specify the RMI port for DB Control
                            -JMS_PORT <port>             :specify the JMS port for DB Control
                            -AGENT_PORT <port>           :specify the EM agent port
                            -DBCONSOLE_HTTP_PORT <port>  :specify the DB Control HTTP port
                    
                    The script will prompt for any required data that is not specified in a configur
                    ation file.  The script always prompts for all required passwords.  If you use a
                     configuration file, the file may contain any of the following specifications, a
                    s shown, with the specified values correctly filled in:
                    
                    Parameters for single instance databases:
                            HOST=<Database hostname>
                            SID=<Database SID>
                            PORT=<Listener port number>
                            ORACLE_HOME=<Database ORACLE_HOME>
                            LISTENER=<Listener name>
                            HOST_USER=<Host user name for automatic backup>
                            HOST_USER_PWD=<Host user password for automatic backup>
                            BACKUP_HOUR=<Automatic backup hour in number>
                            BACKUP_MINUTE=<Automatic backup minute in number>
                    .............
                    ........
                    Edited by: Roger22 on 09.09.2011 19:44
                    • 7. Re: oracle_unqname and oracle_hostname
                      Roger25
                      emca -deconfig dbcontrol db -repos drop

                      Is something wrong in this command? It's not executed
                      • 8. Re: oracle_unqname and oracle_hostname
                        sb92075
                        Roger22 wrote:
                        emca -deconfig dbcontrol db -repos drop

                        Is something wrong in this command? It's not executed
                        Problem Exists Between Keyboard And Chair.
                        • 9. Re: oracle_unqname and oracle_hostname
                          Roger25
                          The command it's correct, i have entered exactly as mentioned.

                          C:\Documents and Settings\Sorin>emca -deconfig dbcontrol db -repos drop
                          Incorrect usage:
                          oracle.sysman.emcp.EMConfigAssistant [options] [list of parameters]
                          Options:
                          -a :configure for an ASM database
                          -b :configure for automatic backup
                          -c :configure a cluster database
                          -e <node> :remove a node from the cluster
                          -f <file> :specify the file name that contains parame
                          ter values
                          -h :help
                          -m :configure EM for a central agent
                          -n <node> :add a new node to the cluster
                          -r :skip creation of repository schema
                          -s :silent mode (no user prompts
                          -x <db> :deletion of a SID or DB
                          -RMI_PORT <port> :specify the RMI port for DB Control
                          -JMS_PORT <port> :specify the JMS port for DB Control
                          -AGENT_PORT <port> :specify the EM agent port
                          -DBCONSOLE_HTTP_PORT <port> :specify the DB Control HTTP port

                          The script will prompt for any required data that is not specified in a configur
                          ation file. The script always prompts for all required passwords. If you use a
                          configuration file, the file may contain any of the following specifications, a
                          s shown, with the specified values correctly filled in:

                          Parameters for single instance databases:
                          • 10. Re: oracle_unqname and oracle_hostname
                            sb92075
                            Roger22 wrote:
                            The command it's correct, i have entered exactly as mentioned.
                            then you should file a bug reported with Oracle so they can fix this situation for you.
                            • 11. Re: oracle_unqname and oracle_hostname
                              Roger25
                              myeah.. ok.. very very "helpful" (NOT)
                              • 12. Re: oracle_unqname and oracle_hostname
                                RachelB-Oracle
                                I know this is too late for the thread, but for future reference:-

                                Don't run the emca command from the general command prompt - eg.

                                C:\Documents and Settings\Sorin>emca -deconfig dbcontrol db -repos drop

                                run it from the ORACLE_HOME/bin directory

                                eg.

                                D:\oracle\product\11.2.0\dbhome_1\bin> emca -deconfig dbcontrol db -repos drop

                                This is because there could be multiple oracle homes on the machine, and if you don't run it from a specific home, it will use the emca (which is associated with the first home on the windows path)

                                thanks,
                                rachel
                                • 13. Re: oracle_unqname and oracle_hostname
                                  44094
                                  In my experience the oracle_unqname error is trigger by the Oracle database installation process.

                                  The Time Zone in the installation computer should be set to a 'Oracle valid' time zone like London, UK.

                                  It seem like there is a time zone match up between the Installation computer and the Oracle database. When the computer time zone is set to an 'unkown' time zone it messes up the installation.

                                  Do a clean installation with the computer time zone set to a prominent time zone. This works on Windows 7 and Windows Server 2008.