Mandalika's scratchpad [ Work blog @Oracle | Stock Market Notes | My Music Compositions ]

Old Posts: 09.04  10.04  11.04  12.04  01.05  02.05  03.05  04.05  05.05  06.05  07.05  08.05  09.05  10.05  11.05  12.05  01.06  02.06  03.06  04.06  05.06  06.06  07.06  08.06  09.06  10.06  11.06  12.06  01.07  02.07  03.07  04.07  05.07  06.07  08.07  09.07  10.07  11.07  12.07  01.08  02.08  03.08  04.08  05.08  06.08  07.08  08.08  09.08  10.08  11.08  12.08  01.09  02.09  03.09  04.09  05.09  06.09  07.09  08.09  09.09  10.09  11.09  12.09  01.10  02.10  03.10  04.10  05.10  06.10  07.10  08.10  09.10  10.10  11.10  12.10  01.11  02.11  03.11  04.11  05.11  07.11  08.11  09.11  10.11  11.11  12.11  01.12  02.12  03.12  04.12  05.12  06.12  07.12  08.12  09.12  10.12  11.12  12.12  01.13  02.13  03.13  04.13  05.13  06.13  07.13  08.13  09.13  10.13  11.13  12.13  01.14  02.14  03.14  04.14  05.14  06.14  07.14  09.14  10.14  11.14  12.14  01.15  02.15  03.15  04.15  06.15  09.15  12.15  01.16  03.16  04.16  05.16  06.16  07.16  08.16  09.16  12.16  01.17  02.17  03.17  04.17  06.17  07.17 


Monday, February 18, 2008
 
Oracle 10g: Setting up The Oracle Enterprise Manager Console

(This blog post assumes that the reader is already familiar with the idea behind the Oracle Enterprise Manager (OEM). Hence there won't be any introductory paragraphs around the OEM. And although I haven't tested it on other operating systems, I believe the steps mentioned in this blog post are applicable on all platforms.).

  1. Create the repository for the Oracle Enterprise Manager Console.
    % emca -repos create

    STARTED EMCA at Feb 14, 2008 1:52:03 AM
    EM Configuration Assistant, Version 10.2.0.1.0 Production
    Copyright (c) 2003, 2005, Oracle. All rights reserved.

    Enter the following information:
    Database SID: TEST <- you may have to input your database's SID
    Listener port number: 1521
    Password for SYS user: change_on_install <- choose any string you like
    Password for SYSMAN user: manager <- choose any string you like

    Do you wish to continue? [yes(Y)/no(N)]: y
    Feb 14, 2008 1:52:39 AM oracle.sysman.emcp.EMConfig perform
    INFO: This operation is being logged at /export/home/oracle/cfgtoollogs/emca/TEST/emca_2008-02-14_01-52-03-AM.log.
    Feb 14, 2008 1:52:39 AM oracle.sysman.emcp.EMReposConfig createRepository
    INFO: Creating the EM repository (this may take a while) ...
    Feb 14, 2008 1:54:33 AM oracle.sysman.emcp.EMReposConfig invoke
    INFO: Repository successfully created
    Enterprise Manager configuration completed successfully
    FINISHED EMCA at Feb 14, 2008 1:54:33 AM

    emca is the Enterprise Manager Configuration Assistant. And the repository that we just created will hold a set of tables containing the internal state information of Enterprise Manager for the managed environment.

  2. Dynamically increase the maximum number of processes that can be created for the execution of jobs, JOB_QUEUE_PROCESSES.
    % sqlplus / as sysdba

    SQL*Plus: Release 10.2.0.3.0 - Production on Thu Feb 14 01:54:57 2008
    Copyright (c) 1982, 2006, Oracle. All Rights Reserved.

    SQL> alter system set job_queue_processes = 2;

    System altered.

  3. Unlock the accounts of OEM super admin user, SYSMAN; and the database monitoring agent, DBSNMP.
    % sqlplus / as sysdba

    SQL> alter user dbsnmp identified by dbsnmp account unlock;

    User altered.

    SQL> alter user sysman identified by manager account unlock;

    User altered.

  4. Configure the database control for the database that we just created (step #1)
    % emca -config dbcontrol db

    STARTED EMCA at Feb 14, 2008 1:55:35 AM
    EM Configuration Assistant, Version 10.2.0.1.0 Production
    Copyright (c) 2003, 2005, Oracle. All rights reserved.

    Enter the following information:
    Database SID: TEST
    Listener port number: 1521
    Password for SYS user: change_on_install
    Password for DBSNMP user: dbsnmp
    Password for SYSMAN user: manager
    Email address for notifications (optional):
    Outgoing Mail (SMTP) server for notifications (optional):
    -----------------------------------------------------------------

    You have specified the following settings

    Database ORACLE_HOME ................ /export/home/oracle

    Database hostname ................ ben05
    Listener port number ................ 1521
    Database SID ................ TEST
    Email address for notifications ...............
    Outgoing Mail (SMTP) server for notifications ...............

    -----------------------------------------------------------------
    Do you wish to continue? [yes(Y)/no(N)]: y
    Feb 14, 2008 1:56:17 AM oracle.sysman.emcp.EMConfig perform
    INFO: This operation is being logged at /export/home/oracle/cfgtoollogs/emca/TEST/emca_2008-02-14_01-55-35-AM.log.
    Feb 14, 2008 1:56:20 AM oracle.sysman.emcp.util.DBControlUtil startOMS
    INFO: Starting Database Control (this may take a while) ...
    Feb 14, 2008 1:57:57 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
    INFO: Database Control started successfully
    Feb 14, 2008 1:57:57 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
    INFO: >>>>>>>>>>> The Database Control URL is http://ben05:1158/em <<<<<<<<<<<
    Enterprise Manager configuration completed successfully
    FINISHED EMCA at Feb 14, 2008 1:57:57 AM

    % netstat -a | grep 1158
    *.1158 *.* 0 0 799744 0 LISTEN

  5. Grant sysdba privileges to the sys user.
     % sqlplus / as sysdba

    SQL> grant sysdba to sys;

    Grant succeeded.

    Note:
    If the grant sysdba .. command fails with an ORA-01994: GRANT failed: password file missing or disabled, make sure the parameter REMOTE_LOGIN_PASSWORDFILE is set to EXCLUSIVE, not to NONE. Also create the orapw<ORACLE_SID> file as shown in the following steps.

    SQL> grant sysdba to sys;
    grant sysdba to sys
    *
    ERROR at line 1:
    ORA-01994: GRANT failed: password file missing or disabled

    SQL> show parameter password

    NAME
    ------------------------------------
    TYPE
    --------------------------------------------------------------------------------
    VALUE
    ------------------------------
    remote_login_passwordfile
    string
    NONE

    Set REMOTE_LOGIN_PASSWORDFILE to EXCLUSIVE in the init<ORACLE_SID> file, shutdown the database instance.

    Login as the same OS user that owns the file $ORACLE_HOME/bin/oracle and (re)create the passwordfile as shown below.
    % orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=newsyspassword entries=16 force=y
    % chown oracle:dba $ORACLE_HOME/dbs/orapw$ORACLE_SID <- replace the user id and the group with yours
    % chmod 4640 $ORACLE_HOME/dbs/orapw$ORACLE_SID

    eg.,
    % ls -l $ORACLE_HOME/dbs/orapw$ORACLE_SID
    -rw-r----- 1 oracle dba 39424 Feb 14 02:12 /export/home/oracle/dbs/orapwTEST


    Start up the database and run the grant sysdba .. command again.

  6. At this point, you should be able to access the Oracle Enterprise Manager Console through a web browser using the URL emitted in the emca -config dbcontrol db step (http://ben05:1158/em in this case).

  7. Commands to start, stop and check the status of the console

    • To start the console:
      emctl start dbconsole

      eg.,% emctl start dbconsole
      Oracle Enterprise Manager 10g Database Control Release 10.2.0.3.0
      Copyright (c) 1996, 2006 Oracle Corporation. All rights reserved.
      http://ben05:1158/em/console/aboutApplication
      Starting Oracle Enterprise Manager 10g Database Control ............................ started.
      ------------------------------------------------------------------
      Logs are generated in directory /export/home/oracle/ben05_TEST/sysman/log

    • To stop the console:
      emctl stop dbconsole

      eg., % emctl stop dbconsole
      Oracle Enterprise Manager 10g Database Control Release 10.2.0.3.0
      Copyright (c) 1996, 2006 Oracle Corporation. All rights reserved.
      http://ben05:1158/em/console/aboutApplication
      Stopping Oracle Enterprise Manager 10g Database Control ...
      ... Stopped.

    • To check the status of the console
      emctl status dbconsole

      eg., % emctl status dbconsole
      Oracle Enterprise Manager 10g Database Control Release 10.2.0.3.0
      Copyright (c) 1996, 2006 Oracle Corporation. All rights reserved.
      http://ben05:1158/em/console/aboutApplication
      Oracle Enterprise Manager 10g is not running.

  8. Finally if you want to drop the database console, use this command:
    % emca -deconfig dbcontrol db

________________________
Technorati Tags:
| |


Comments:
Thanks Mandalika
 
as always, your post's a real lifesaver! Thanks dude
 
Thank you very much for this. It has saved me a lot of time and headaches!
 
Post a Comment

Links to this post:

Create a Link



<< Home


2004-2017 

This page is powered by Blogger. Isn't yours?