Book Image

Oracle Enterprise Manager 12c Administration Cookbook

By : Dhananjay Papde, Tushar Nath, Vipul Patel
Book Image

Oracle Enterprise Manager 12c Administration Cookbook

By: Dhananjay Papde, Tushar Nath, Vipul Patel

Overview of this book

<p>Oracle Enterprise Manager is a key tool for any Oracle Administrator, allowing them to manage their Oracle installations and selected other applications, providing a one stop place to manage and maintain the entire infrastructure in any organization.<br /><br />The Oracle Enterprise Manager 12c Cookbook will give administrators a head start towards implementing OEM in their organizations, by taking you through all the aspects of installation, upgrade, configuration, and monitoring of various servers, databases, and various Oracle Fusion Middleware components.<br /><br />Starting with the installation and upgrade of your OEM installation, this book then takes you through the process of using OEM12c to configure and monitor your Oracle application and database servers, including the various supported Oracle Fusion Middleware products.<br /><br />This book will uncover various installations options (with simple advanced options) and various upgrade options.<br /><br />The book will also cover monitoring the infrastructure using Active Session History Analytics. There are recipes on creating, cloning databases, and creating templates. <br /><br />Additionally there are recipes on Configuration of Oracle Business Intelligence, Oracle Golden Gate, Oracle Business Intelligence Publisher, and Oracle Weblogic using OEM12c.</p>
Table of Contents (16 chapters)
Oracle Enterprise Manager 12c Administration Cookbook
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Meeting OEM repository database requirements


There are some additional configuration requirements for an OEM repository database, namely some table spaces should be autoextensible, have a minimum shared_pool_size, a specific number of job_queue_processes, and so on, before the database can be used as a repository for OEM.

Getting ready

Before you start, ensure that the server is connected to the network and an SSH or telnet client is available. Also, make sure you have access to the Unix server as a privileged user.

How to do it...

  1. UNDO and TEMP tablespaces should be autoextensible in the database. Also it is recommended to start with an UNDO tablespace of at least 256 MB.

    SQL> set lines 300
    SQL> col tablespace_name form a16
    SQL> col file_name form a37
    SQL> select tablespace_name, file_name, bytes/1024/1024 as SIZE_MB, autoextensible from dba_data_files
    Union
     select tablespace_name, file_name, bytes/1024/1024 as SIZE_MB, autoextensible from dba_temp_files;
      2    3
    TABLESPACE_NAME FILE_NAME                              SIZE_MB 	AUTO
    --------------- ----------------------------------- ---------- ------------------------------------
    SYSAUX          /dborafiles/oem12c/sysaux01.dbf            490 	YES
    SYSTEM          /dborafiles/oem12c/system01.dbf            700 	YES
    TEMP            /dborafiles/oem12c/temp01.dbf                   29 	YES
    UNDOTBS1     /dborafiles/oem12c/undotbs01.dbf            75        YES
    USERS           /dborafiles/oem12c/users01.dbf                  5 	YES
    
  2. The following database parameter changes need to be done before using the database as a repository:

    SQL> alter database datafile '/dborafiles/oem12c/undotbs01.dbf' resize 512M;
    Database altered.
    SQL> alter system set shared_pool_size=600m scope=spfile;
    System altered.
    SQL> alter system set processes=300 scope=spfile;
    System altered.
    SQL> alter system set job_queue_processes=20 scope=spfile;
    System altered.
    SQL> alter system set session_cached_cursors=200 scope=spfile;
    System altered.
    SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup
    ORACLE instance started.
    Total System Global Area 2137886720 bytes
    Fixed Size                  2215064 bytes
    Variable Size             671089512 bytes
    Database Buffers         1459617792 bytes
    Redo Buffers                4964352 bytes
    Database mounted.
    Database opened.
    SQL> create pfile from spfile;
    File created.
    
  3. Although we explicitly specified not to configure the database with Enterprise Manager, this doesn't prevent the installation of a small part of some sysman object in the database. We have to remove these objects from the database before we can use it as an OEM repository database:

    Unlock sysman user and reset password.
    SQL> select USERNAME, ACCOUNT_STATUS from dba_users where username like 'SYSMAN%';
    SYSMAN                         EXPIRED & LOCKED
    SQL> alter user SYSMAN account unlock;
    SQL> alter user SYSMAN identified by xxxxxx;
    $ emca -deconfig dbcontrol db -repos drop
    
    STARTED EMCA at Apr 9, 2012 3:03:14 PM
    EM Configuration Assistant, Version 11.2.0.0.2 Production
    Copyright (c) 2003, 2005, Oracle.  All rights reserved.
    
    Enter the following information:
    Database SID: oem12c
    Listener port number: 1521
    Password for SYS user:
    Password for SYSMAN user:
    ----------------------------------------------------------------------
    WARNING : While repository is dropped the database will be put in quiesce mode.
    ----------------------------------------------------------------------
    Do you wish to continue? [yes(Y)/no(N)]: y
    Apr 9, 2012 3:04:23 PM oracle.sysman.emcp.EMConfig perform
    INFO: This operation is being logged at /dboracle/cfgtoollogs/emca/oem12c/emca_2012_04_09_15_03_14.log.
    Apr 9, 2012 3:04:24 PM oracle.sysman.emcp.EMDBPreConfig performDeconfiguration
    WARNING: EM is not configured for this database. No EM-specific actions can be performed. Some of the possible reasons may be:
     1) EM is configured with different hostname then physical host. Set environment variable ORACLE_HOSTNAME=<hostname> and re-run EMCA script
     2) ORACLE_HOSTNAME is set. Unset it and re-run EMCA script
    Apr 9, 2012 3:04:24 PM oracle.sysman.emcp.EMReposConfig invoke
    INFO: Dropping the EM repository (this may take a while) ... 
    Apr 9, 2012 3:05:53 PM oracle.sysman.emcp.EMReposConfig invoke
    INFO: Repository successfully dropped
    Enterprise Manager configuration completed successfully
    FINISHED EMCA at Apr 9, 2012 3:05:53 PM
    
  4. Update the /etc/oratab file by using the following command:

    oem12c:/dboracle/product/11.2.0/dbhome_1:Y
    

How it works...

With the completion of the preceding steps, all of the prerequisites of the OEM 12c installation have been met.