07 Complete OMS 12.1.0.3.1 Installation


Overview

The installation failed with the following error message:

The database details which you have provided doesn't contain valid Management Repository. Provide correct database details and retry.

References

Diagnosis

Review MOS

MOS Doc ID 1568727.1 was found.

Review Logs

The log at /opt/app/oracle/oraInventory/logs/installActions2014-03-08_07-47-03PM.log shows the following enties:

INFO: calling query: executeSql
        arg: SYS
        arg: *Protected value, not to be logged*
        arg: select count(*) from SYSMAN.MGMT_UPGRADEUTIL_PROPS where PROPERTY_NAME='SEED_TEMPLATE' and PROPERTY_VALUE='TRUE'
    connecting to database with already created connect string
        return value: 0
INFO: POPUP ERROR:The database details which you have provided doesn't contain valid Management Repository. Provide correct database details and retry.

This matches the symptoms described in MOS Doc ID 1568727.1 .

Procedure

Recommended Solution

MOS Doc ID 1568727.1 recommends to download correct the template from Database Template (with EM 12.1.0.3 repository pre-configured) for Installing Oracle Enterprise Manager Cloud Control 12c Release 3 (12.1.0.3) .

Drop SYSMAN Schemae in REPOS

Instead, I decided to drop all of the OEM schemae from REPOS as follows:

DROP USER SYSMAN CASCADE;
DROP USER SYSMAN_OPSS CASCADE;
DROP USER SYSMAN_MDS CASCADE;
DROP USER SYSMAN_APM CASCADE;
DROP USER SYSMAN_RO CASCADE;

Attempt Step 8 Again

After I had removed the OEM schemae from REPOS , I clicked Next to go to the next screen, but I got the following error message instead:

Review the Logs

I found the following errors in /opt/app/oracle/oraInventory/logs/emdbprereqs/2014-03-09-06-38-51/repository.log :

Executing Prereq Action
-----------------------------
executing Action: select status from dba_autotask_client where client_name='auto optimizer stats collection'
output: ENABLED

Prerequisite failed



Executing Prereq Action
-----------------------------
executing Action: select count(1) from dba_synonyms where table_owner in ('SYSMAN','SYSMAN_MDS','MGMT_VIEW','SYSMAN_BIP','SYSMAN_APM','BIP','SYSMAN_OPSS','SYSMAN_RO')
output: 1747

Prerequisite failed


Executing Prereq Action
-----------------------------
executing Action: select count(1) from dba_tablespaces where TABLESPACE_NAME in ('MGMT_ECM_DEPOT_TS','MGMT_TABLESPACE','MGMT_AD4J_TS')
output: 3

Prerequisite failed


Executing Prereq Action
-----------------------------
executing Action: SELECT COUNT(1) FROM ALL_USERS WHERE USERNAME in ('SYSMAN_MDS', 'MGMT_VIEW', 'SYSMAN_BIP','SYSMAN_APM','BIP', 'SYSMAN_OPSS', 'SYSMAN_RO')
output: 1

Prerequisite failed


Executing Prereq Action
-----------------------------
executing Action: select count(1) from SCHEMA_VERSION_REGISTRY where (comp_name,owner) in (('Authorization Policy Manager','SYSMAN_APM'),('Metadata Services','SYSMAN_MDS'),('Oracle Platform Security Services','SYSMAN_OPSS'))
output: 3

Prerequisite failed

Clean Up

Based on the SQL statements listed in the failure messages above, I created several fix up scripts.

Remove Synonyms

In order to remove the old synonyms, I used the following SQL script in REPOS :

DECLARE
  CURSOR l_syn_csr IS
    SELECT 'DROP ' ||
      CASE owner
        WHEN 'PUBLIC'
          THEN 'PUBLIC SYNONYM '
        ELSE 'SYNONYM ' || owner || '.'
      END ||
      synonym_name AS cmd
    FROM
      dba_synonyms 
    WHERE
      table_owner IN (
        'SYSMAN',
        'SYSMAN_MDS',
        'MGMT_VIEW',
        'SYSMAN_BIP',
        'SYSMAN_APM',
        'BIP',
        'SYSMAN_OPSS',
        'SYSMAN_RO'
      );
BEGIN
  FOR l_syn_rec IN l_syn_csr LOOP
    BEGIN
      EXECUTE IMMEDIATE l_syn_rec.cmd;
    EXCEPTION
      WHEN OTHERS THEN
        dbms_output.put_line( '===> ' || l_syn_rec.cmd );
        dbms_output.put_line( sqlerrm );
    END;
  END LOOP;
END;
/

Remove Remaining Objects and Data

To remove the remaining objects and data, I used the following SQL script in REPOS :

DROP USER mgmt_view CASCADE;
DROP TABLESPACE mgmt_ecm_depot_ts INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
DROP TABLESPACE mgmt_tablespace   INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
DROP TABLESPACE mgmt_ad4j_ts      INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;

Clean up Registry

MOS Doc ID 1365834.1 seems to apply here because I did do the following:

The repository was cleaned-up using "drop user" command instead of "RepManager dropall" . Due to this, the resulting repository record for the sysman_mds, sysman_opss, sysman_apm schemas are not cleaned-up.

Following the solution provided, I ran the following command:

DELETE
  FROM
    schema_version_registry
  WHERE
    (comp_name,owner) IN (
      ('Authorization Policy Manager','SYSMAN_APM'),
      ('Metadata Services','SYSMAN_MDS'),
      ('Oracle Platform Security Services','SYSMAN_OPSS')
    );

DBA Auto Jobs

Searching MOS, I found EM 12c: OUI hangs / freezes after providing repository database details while Upgrading to 12.1.0.2 (Doc ID 1525857.1) which indicates a potential problem only as far as performance goes.

Running the following query from SQL*Plus took 24.61 seconds:

SELECT
    status
  FROM
    dba_autotask_client
  WHERE
    client_name='auto optimizer stats collection';

I consider MOS Doc ID 1525857.1 not to apply in my case.

Step 8: Continue Installation

I clicked OK on the error message display.

Then I clicked Next at Step #8 again, and I got the following error message:

I forgot to a COMMIT . Did so, tried again, and got the following message:

Clicked Yes to automatically fix the problem.

Then I clicked Next at Step #8 again, and I got the following warning message:

Correct Database Parameters

Updated the following parameters in the REPOS database:

control_files            = "/opt/oracle/app/oradata/repos/control01.ctl"
control_files            = "/opt/oracle/app/fast_recovery_area/repos/control02.ctl"
db_block_size            = 8192
compatible               = "11.2.0.4.0"
log_archive_format       = "%t_%s_%r.dbf"
db_recovery_file_dest    = "/opt/oracle/app/fast_recovery_area"
db_recovery_file_dest_size= 20G
undo_tablespace          = "UNDOTBS1"
remote_login_passwordfile= "EXCLUSIVE"
db_domain                = "yaocm.id.au"
dispatchers              = "(PROTOCOL=TCP) (SERVICE=reposXDB)"
job_queue_processes      = 1000
audit_file_dest          = "/opt/oracle/app/admin/repos/adump"
audit_trail              = "DB"
db_name                  = "repos"
open_cursors             = 300
sec_return_server_release_banner= TRUE
diagnostic_dest          = "/opt/oracle/app"
processes                =300#EM12C Small Installation
session_cached_cursors   =300#EM12C Small Installation
sga_max_size             =2G#EM12C Small Installation
sga_target               =2G#EM12C Small Installation
shared_pool_size         =600M#EM12C Small Installation
pga_aggregate_target     =400M#EM12C Small Installation
db_cache_size            =800M#EM12C Small Installation

I also increase the size of the online redo log file to 1G each and removed the small ones as follows:

ALTER DATABASE
  ADD LOGFILE GROUP 4 '/opt/oracle/app/oradata/repos/redo04.log' SIZE 1G;
ALTER DATABASE
  ADD LOGFILE GROUP 5 '/opt/oracle/app/oradata/repos/redo05.log' SIZE 1G;
ALTER DATABASE
  ADD LOGFILE GROUP 6 '/opt/oracle/app/oradata/repos/redo06.log' SIZE 1G;
ALTER SYSTEM SWITCH LOGFILE;
ALTER DATABASE DROP LOGFILE GROUP 1;
ALTER DATABASE DROP LOGFILE GROUP 2;
ALTER DATABASE DROP LOGFILE GROUP 3;

Note: I left the OMS installation process running while I reconfigured the database through a restart.

I clicked OK on the error message display.

Step 9: Enterprise Manager Configuration Details

I filled in the details as follows:

I clicked Next to go to the next screen.

Step 10: Post Configuration Details

I left the details as follows:

I clicked Next to go to the next screen.

Step 11: Review

I reviewed the details as follows:

I clicked Install to go to the next screen.

Step 12: Install Progress

The following screen shot was captured during the installation:

Eventually, the following screen appeared:

Ran the scripts with the following results:

[root@cronulla ~]# /opt/app/oracle/oraInventory/orainstRoot.sh
Changing permissions of /opt/app/oracle/oraInventory
Adding read,write permissions for group,Removing read,write,execute permissions for world.
Changing groupname of /opt/app/oracle/oraInventory to oinstall.
The execution of the script is complete
[root@cronulla ~]# /opt/app/oracle/em/middleware/oms/allroot.sh

Starting to execute allroot.sh .........

Starting to execute /opt/app/oracle/em/middleware/oms/root.sh ......
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /opt/app/oracle/em/middleware/oms

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
/etc exist

Creating /etc/oragchomelist file...
/opt/app/oracle/em/middleware/oms
Finished execution of  /opt/app/oracle/em/middleware/oms/root.sh ......


Starting to execute /opt/app/oracle/em/agent/core/12.1.0.3.0/root.sh ......
Finished product-specific root actions.
/etc exist
Finished execution of  /opt/app/oracle/em/agent/core/12.1.0.3.0/root.sh ......

I clicked OK to go to the next screen.

Step 13: Finish

At completion, the following screen appeared:

I clicked Close to complete the installation.