12 Replies Latest reply on Dec 11, 2007 3:24 PM by Pat_Magroin

    Error creating repository

    JjFBcN
      Hi, I have oracle 10.2.0.2 over Solaris 9. When I try to create the em repository I receive the erro ORA-01034 Oracle not available.

      $ emca -repos create

      $ more /oracle/product/10.1.2.0.0/cfgtoollogs/emca/emca_2006-11-06_05-20-58-PM.log
      06-nov-2006 17:20:58 oracle.sysman.emcp.ParamsManager setFlag
      CONFIG: Flag '-repos' set to true
      06-nov-2006 17:20:58 oracle.sysman.emcp.ParamsManager setFlag
      CONFIG: Flag 'db' set to true
      06-nov-2006 17:20:58 oracle.sysman.emcp.ParamsManager setFlag
      CONFIG: Flag 'create' set to true
      06-nov-2006 17:20:58 oracle.sysman.emcp.ParamsManager setParam
      CONFIG: Setting param: ORACLE_HOME value: /disco2/oracle/product/10.1.2.0.0
      06-nov-2006 17:21:02 oracle.sysman.emcp.ParamsManager setParam
      CONFIG: Setting param: SID value: perseo
      06-nov-2006 17:21:04 oracle.sysman.emcp.ParamsManager setParam
      CONFIG: Setting param: PORT value: 1522
      06-nov-2006 17:21:06 oracle.sysman.emcp.ParamsManager getParam
      CONFIG: No se ha definido ningún valor para el parámetro SYS_PWD
      06-nov-2006 17:21:06 oracle.sysman.emcp.util.GeneralUtil initSQLEngine
      CONFIG: SQLEngine connecting with SID: perseo, oracleHome: /disco2/oracle/product/10.1.2.0.0, and user: SYS
      06-nov-2006 17:21:07 oracle.sysman.emcp.util.GeneralUtil initSQLEngine
      CONFIG: SQLEngine created successfully and connected
      06-nov-2006 17:21:09 oracle.sysman.emcp.ParamsManager setParam
      CONFIG: Setting param: CONFIRMATION ANSWER value:
      06-nov-2006 17:21:11 oracle.sysman.emcp.ParamsManager setParam
      CONFIG: Setting param: CONFIRMATION ANSWER value: sí
      06-nov-2006 17:21:11 oracle.sysman.emcp.ParamsManager getParam
      CONFIG: No se ha definido ningún valor para el parámetro LOG_FILE
      06-nov-2006 17:21:11 oracle.sysman.emcp.ParamsManager setFlag
      CONFIG: Flag 'db' set to true
      06-nov-2006 17:21:11 oracle.sysman.emcp.ParamsManager getParam
      CONFIG: No se ha definido ningún valor para el parámetro DB_UNIQUE_NAME
      06-nov-2006 17:21:11 oracle.sysman.emcp.ParamsManager getParam
      CONFIG: No se ha definido ningún valor para el parámetro DB_UNIQUE_NAME
      06-nov-2006 17:21:11 oracle.sysman.emcp.util.GeneralUtil initSQLEngine
      CONFIG: SQLEngine connecting with SID: perseo, oracleHome: /disco2/oracle/product/10.1.2.0.0, and user: SYS
      06-nov-2006 17:21:11 oracle.sysman.emcp.util.GeneralUtil initSQLEngine
      CONFIG: SQLEngine created successfully and connected
      06-nov-2006 17:21:11 oracle.sysman.emcp.DatabaseChecks checkDbAvailabilityImpl
      CONFIG: ORA-01034: ORACLE not available

      oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-01034: ORACLE not available

      at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeImpl(SQLEngine.java:1467)
      at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeQuery(SQLEngine.java:694)
      at oracle.sysman.emcp.DatabaseChecks.checkDbAvailabilityImpl(DatabaseChecks.java:107)
      at oracle.sysman.emcp.DatabaseChecks.checkDbAvailability(DatabaseChecks.java:143)
      at oracle.sysman.emcp.DatabaseChecks.getDbUniqueName(DatabaseChecks.java:344)
      at oracle.sysman.emcp.EMConfig.addEMCALogFile(EMConfig.java:767)
      at oracle.sysman.emcp.EMConfig.addLogFile(EMConfig.java:655)
      at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:123)
      at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:479)
      at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1123)
      at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:463)

      Of course the database is open and the listener up, I can connect to the database locally and remotely. So I'd like to know what's the check that the emca script performs to chech if the database is available.

      Any idea?

      Thank you in advance,
        • 1. Re: Error creating repository
          mnazim-Oracle
          Seems your database is down please start the database
          set ORACLE_HOME,ORACLE_SID , execute the following command and let me know the result
          emca -config all db -repos create
          • 2. Re: Error creating repository
            JjFBcN
            Hi, thanx for your answer. ORACLE_HOME and ORACLE_SID are set up correctly, so I run the command you said:

            emca -config all db -repos create

            But the result is the same:

            $ more /oracle/product/10.1.2.0.0/cfgtoollogs/emca/emca_2006-11-08_11-28-16-AM.log|more
            08-nov-2006 11:28:16 oracle.sysman.emcp.ParamsManager setFlag
            CONFIG: Flag '-config' set to true
            08-nov-2006 11:28:16 oracle.sysman.emcp.ParamsManager setFlag
            CONFIG: Flag 'UPDATE_EMAIL' set to true
            08-nov-2006 11:28:16 oracle.sysman.emcp.ParamsManager setFlag
            CONFIG: Flag 'dbcontrol' set to true
            08-nov-2006 11:28:16 oracle.sysman.emcp.ParamsManager setFlag
            CONFIG: Flag 'centralAgent' set to true
            08-nov-2006 11:28:16 oracle.sysman.emcp.ParamsManager setFlag
            CONFIG: Flag 'db' set to true
            08-nov-2006 11:28:16 oracle.sysman.emcp.ParamsManager setFlag
            CONFIG: Flag 'create' set to true
            08-nov-2006 11:28:16 oracle.sysman.emcp.ParamsManager setParam
            CONFIG: Setting param: ORACLE_HOME value: /disco2/oracle/product/10.1.2.0.0
            08-nov-2006 11:28:16 oracle.sysman.emcp.ParamsManager getParam
            CONFIG: No se ha definido ningún valor para el parámetro ORACLE_HOSTNAME
            08-nov-2006 11:28:16 oracle.sysman.emcp.ParamsManager setParam
            CONFIG: Setting param: EM_HOME value: /disco2/oracle/product/10.1.2.0.0
            08-nov-2006 11:28:20 oracle.sysman.emcp.ParamsManager setParam
            CONFIG: Setting param: SID value: perseo
            08-nov-2006 11:34:05 oracle.sysman.emcp.ParamsManager setParam
            CONFIG: Setting param: CENTRAL_AGT_HOME value: /software/oracle/product/10.1.2.0.0
            08-nov-2006 11:34:05 oracle.sysman.emcp.ParamsManager getParam
            CONFIG: No se ha definido ningún valor para el parámetro ORACLE_HOSTNAME
            08-nov-2006 11:34:06 oracle.sysman.emcp.util.ClusterUtil getLocalNode
            CONFIG: Cluster.isCluster: false. Skip call to getLocalNode
            08-nov-2006 11:34:06 oracle.sysman.emcp.util.ClusterUtil getLocalNode
            CONFIG: isLocalNodeDone: true localNode: null
            08-nov-2006 11:34:06 oracle.sysman.emcp.ParamsManager getParam
            CONFIG: No se ha definido ningún valor para el parámetro ORACLE_HOSTNAME
            08-nov-2006 11:34:06 oracle.sysman.emcp.util.DBControlUtil isDBConsoleConfigured
            CONFIG: Sid: perseo Host: sunsig5 Node: null OH: /disco2/oracle/product/10.1.2.0.0 isDBC: false
            08-nov-2006 11:34:06 oracle.sysman.emcp.util.CentralAgentUtil isCentralAgentConfigured
            CONFIG: Sid: perseo Host: sunsig5 Node: null OH: /disco2/oracle/product/10.1.2.0.0 agentHome: null isCentral: false
            08-nov-2006 11:34:06 oracle.sysman.emcp.util.CentralAgentUtil isCentralAgentConfigured
            CONFIG: Sid: perseo Host: sunsig5 Node: null OH: /disco2/oracle/product/10.1.2.0.0 agentHome: /software/oracle/product/10.1.2.0.0 is
            Central: false
            08-nov-2006 11:34:06 oracle.sysman.emcp.ParamsManager getParam
            CONFIG: No se ha definido ningún valor para el parámetro SYS_PWD
            08-nov-2006 11:34:06 oracle.sysman.emcp.util.GeneralUtil initSQLEngine
            CONFIG: SQLEngine connecting with SID: perseo, oracleHome: /disco2/oracle/product/10.1.2.0.0, and user:
            08-nov-2006 11:34:07 oracle.sysman.emcp.util.GeneralUtil initSQLEngine
            CONFIG: SQLEngine created successfully and connected
            08-nov-2006 11:34:07 oracle.sysman.emcp.DatabaseChecks checkDbAvailabilityImpl
            CONFIG: ORA-01034: ORACLE not available

            oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-01034: ORACLE not available

            at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeImpl(SQLEngine.java:1467)
            at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeQuery(SQLEngine.java:694)
            at oracle.sysman.emcp.DatabaseChecks.checkDbAvailabilityImpl(DatabaseChecks.java:107)
            at oracle.sysman.emcp.DatabaseChecks.checkDbAvailability(DatabaseChecks.java:143)
            at oracle.sysman.emcp.DatabaseChecks.isASMDb(DatabaseChecks.java:715)
            at oracle.sysman.emcp.EMConfigAssistant.getParamsWarnsList(EMConfigAssistant.java:1793)
            at oracle.sysman.emcp.EMConfigAssistant.getDisplayAndPromptWarnsParms(EMConfigAssistant.java:2276)
            at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:928)
            at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:463)
            at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:412)
            08-nov-2006 11:34:07 oracle.sysman.emcp.DatabaseChecks isASMDb
            CONFIG: Instancia de base de datos no disponible.
            oracle.sysman.emcp.exception.DatabaseUnavailableException: Instancia de base de datos no disponible.
            at oracle.sysman.emcp.DatabaseChecks.throwDBUnavailableException(DatabaseChecks.java:131)
            at oracle.sysman.emcp.DatabaseChecks.checkDbAvailabilityImpl(DatabaseChecks.java:119)
            at oracle.sysman.emcp.DatabaseChecks.checkDbAvailability(DatabaseChecks.java:143)
            at oracle.sysman.emcp.DatabaseChecks.isASMDb(DatabaseChecks.java:715)
            at oracle.sysman.emcp.EMConfigAssistant.getParamsWarnsList(EMConfigAssistant.java:1793)
            at oracle.sysman.emcp.EMConfigAssistant.getDisplayAndPromptWarnsParms(EMConfigAssistant.java:2276)
            at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:928)
            at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:463)
            at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:412)
            08-nov-2006 11:34:07 oracle.sysman.emcp.ParamsManager setFlag
            CONFIG: Flag 'asm_db' set to false
            08-nov-2006 11:34:11 oracle.sysman.emcp.ParamsManager setParam
            CONFIG: Setting param: PORT value: 1522
            08-nov-2006 11:34:15 oracle.sysman.emcp.ParamsManager getParam
            CONFIG: No se ha definido ningún valor para el parámetro SYS_PWD
            08-nov-2006 11:34:15 oracle.sysman.emcp.util.GeneralUtil initSQLEngine
            CONFIG: SQLEngine connecting with SID: perseo, oracleHome: /disco2/oracle/product/10.1.2.0.0, and user: SYS
            08-nov-2006 11:34:15 oracle.sysman.emcp.util.GeneralUtil initSQLEngine
            CONFIG: SQLEngine created successfully and connected
            08-nov-2006 11:34:19 oracle.sysman.emcp.util.GeneralUtil initSQLEngine
            CONFIG: SQLEngine connecting with SID: perseo, oracleHome: /disco2/oracle/product/10.1.2.0.0, and user: DBSNMP
            08-nov-2006 11:34:19 oracle.sysman.emcp.util.GeneralUtil initSQLEngine
            CONFIG: ORA-01034: ORACLE not available
            ORA-27101: shared memory realm does not exist

            oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-01034: ORACLE not available
            ORA-27101: shared memory realm does not exist

            at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeImpl(SQLEngine.java:1467)
            at oracle.sysman.assistants.util.sqlEngine.SQLEngine.connect(SQLEngine.java:814)

            ...


            Though the log says the database is not available and shared memory realm does not exist, that's not true. The DB is startedup, I connect locally and remotely and I perform querys, so I think emca script is reading some wrong parameters from somewhere and it can't find the instance.

            I upgraded this db from 9.2.0.6 to 10.2.0.2 through DBUA, I think that shouldn't affect but the fact is that in other environment with a clean 10g R2 installation I had no problems and with that upgraded database I can't create the repository.
            • 3. Re: Error creating repository
              mnazim-Oracle
              Could you please bounce the database and try again
              If emca still doesn't work then delete the repository by using Repmanager
              • 4. Re: Error creating repository
                JjFBcN
                I've bounced the database but still the same error.
                I don't know where is repmanager, it must be installed from Oracle Universal Installer? I can't find it.
                • 5. Re: Error creating repository
                  277993
                  I upgraded this db from 9.2.0.6 to 10.2.0.2 through DBUA, I think that shouldn't >affect but the fact is that in other environment with a clean 10g R2 installation I >had no problems and with that upgraded database I can't create the repository.
                  That could be the problem because you now have two ORACLE_HOMEs. So you must ensure that you have set the correct ORACLE_HOME and you are using the correct Listener. Also your Listener need to be started from the 10.2.0.2 home instead of 9.2.0.6 home.
                  • 6. Re: Error creating repository
                    539181
                    I am having the exact same problem, same situation. Upgrade from 9. Did you get a solution?
                    • 7. Re: Error creating repository
                      277993
                      Check my reply above if that the same case as yours.
                      • 8. Re: Error creating repository
                        JjFBcN
                        I think I can't help you very much, my problem was just that I had not installed the EM console, so it was a little bit difficult to create the repositoy and connect to the EM. I was looking for a very difficult problem and it was bilge.

                        I don't know if it could be your case but I'd rather doublecheck everything before looking more. Open the Universal Installer and verify that you have installed EM Console.

                        Good luck!
                        • 9. Re: Error creating repository
                          518046
                          How did you solve the problem? I could not see what you have done to solve the problem from this threads. I have a database on a HP machine and it was created by someone else. How do I know the repository created in the database, by checking the schema dbsnmp? If the schema exists in the db and has some schema objects there, does it mean the repository was created? If I run 'emca -config dbconsole db -repos recreate' I have the error you had.
                          • 10. Re: Error creating repository
                            277993
                            I believe by this you mean you had
                            oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-01034: ORACLE not available
                            You have to ensure that you set the correct ORACLE_HOME and ORACLE_SID and make sure the database is started before you issue the command
                            • 11. Re: Error creating repository
                              518046
                              Both $ORACLE_HOME and $ORACLE_SID are set to the right value and the instance and listner are up. I could connect to the database with sqlplus as sysdba. The error in the log file is oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-01034: ORACLE not available.

                              Thanks.
                              • 12. Re: Error creating repository
                                Pat_Magroin
                                Try doing the following (this worked for me):

                                1. reset the password for sys, sysman, and dbsnmp
                                2. set ORACLE_HOME and ORACLE_SID
                                3. emca -config dbcontrol db -repos recreate
                                4. emca -deconfig dbcontrol db -repos drop