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.
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.
UNDO
andTEMP
tablespaces should beautoextensible
in the database. Also it is recommended to start with anUNDO
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
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.
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
Update the
/etc/oratab
file by using the following command:oem12c:/dboracle/product/11.2.0/dbhome_1:Y