emca/emcaDbUtil: perl/bin/perl: not found

Error

sept 24, 2012 4:01:02 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
CONFIG: Exit value of 1
sept 24, 2012 4:01:02 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
CONFIG: /u01/oracle/product/11.2.0/sysman/admin/scripts/emca/emcaDbUtil: /u01/oracle/product/11.2.0/perl/bin/perl: not found
 
 

Solution :

1- go to $ORACLE_HOME/bin open emca script using

vi emca 

And Correct $ORACLE_HOME inside it .

2-if the above solution not working  , go to emca log location and check perl executable location ,

for example :
/u01/oracle/product/11.2.0/perl/bin/perl

We get this location from the error log , then find out the Location of perl in $ORACLE_HOME/perl and try to create link to actual location :

ln -s /u01/oracle/product/11.2.0/perl   /u01/oracle/product/11.2.0/perl

Drop DB Control Repository

I know that i post this topic before , you use emca to drop dbcontrol but what if this command fails 

what should i do ? I post This Topic to show second way to drop dbcontrol let Start :
 
emca
should be used to drop DB Control repository as follows:
emca -deconfig dbcontrol db -repos drop

Steps :

1.Shutdown database

 SHUTDOWN IMMEDIATE;

2.Remove EM job

EXEC sysman.emd_maintenance.remove_em_dbms_jobs;

3.Revoke DBA privilages from SYSMAN user

REVOKE dba FROM sysman;

4.Run 

DECLARE
  CURSOR c1 IS
  SELECT owner, synonym_name name
  FROM dba_synonyms
  WHERE table_owner = 'SYSMAN';
BEGIN
  FOR r1 IN c1 LOOP
    IF r1.owner = 'PUBLIC' THEN
      EXECUTE IMMEDIATE 'DROP PUBLIC SYNONYM '||r1.name;
    ELSE
      EXECUTE IMMEDIATE 'DROP SYNONYM '||r1.owner||'.'||r1.name;
    END IF;
  END LOOP;
END;
/

 5.Drop MGMT_VIEW user.

DROP USER MGMT_VIEW CASCADE;

6.Drop MGMT_VIEW role

DROP ROLE mgmt_user;

7.Drop SYSMAN user

DROP USER sysman CASCADE;

8.Disable restricted mode

ALTER SYSTEM DISABLE RESTRICTED SESSION;

 Thank you
Osama

    ORA-01034: ORACLE not available When Create DBCONSOLE

    ORA-01034: ORACLE not available When Create DBCONSOLE / DBCONTROL

    If you are using the following Command :

        $ emca -deconfig dbcontrol db -repos drop

        $ emca -config dbcontrol db -repos create

    Try Use


    emca -config dbcontrol db -repos recreate -ORACLE_HOSTNAME “Hostname”
      -SID “SID” -PORT “PortNumber” -ORACLE_HOME $ORACLE_HOME -DBDNMP_PWD  “Password”

    It Should be Work

    Thank you
    Osama mustafa

    DBCONSOLE For Real Application Cluster

    Drop DBCONSOLE FOR RAC (Uninstall) : 



    we will user the following command :

    emca -deconfig dbcontrol db -repos drop -cluster

    Make sure you have the below information :

    • Database unique name
    • Listener port number
    • Password for SYS user
    • Password for SYSMAN user

    Create DBCONSOLE FOR RAC ( Install) : 

    In this case you have more than one choice you can use what you want depend on your requirements :

    1-

    emca -config dbcontrol db -repos create -cluster

    2-

     emca -reconfig dbcontrol –cluster –EM_NODE node1 -EM_NODE_LIST node2,node3,node4

    emca -reconfig dbcontrol –cluster –EM_NODE node5 -EM_NODE_LIST node6,node7,node8

     The below Information for installing DBCONSOLE :

    • The Database unique name
    • The Listener port number
    • The Cluster name
    • The Password for SYS user
    • The Password for DBSNMP user
    • The Password for SYSMAN user
    • The Email address for notifications (optional)
    • The Outgoing Mail (SMTP) server for notifications (optional)
    • The ASM ORACLE_HOME e.g. /u01/app/asm/product/10.2.0
    • The ASM port e.g. 1521
    • The ASM user role e.g. SYSDBA
    • The ASM username e.g. SYS
    • The ASM user password

    Note : Sometimes you need to put the password between “” . 
    Thank you
    Osama mustafa

    Oracle Enterprise Manager 10.2.0.4 Unable to start

    Hi All

    we gonna talk about Bug in oracle 10.2.0.4 , 10.2.0.5 since its unable to start enterprise manager after run
    “emctl start dbconsole”

    CONFIG: Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
    Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
    https://myhost:5501/em/console/aboutApplication
    Starting Oracle Enterprise Manager 10g Database Control
    ................................................ failed

    This error appear because the SSL certification has been end .
    But the question is what can i do ?

    Forget Enterprise manager and start using command line

    Not just kidding

    What if we try to recreate it again ?

    emca -config dbcontrol db -repos recreate

    STARTED EMCA at Jan 11, 2011 4:11:01 PM
    EM Configuration Assistant, Version 10.2.0.1.0 Production
    Copyright (c) 2003, 2005, Oracle. All rights reserved.

    Enter the following information:
    Database unique name: catest
    Database Control is already configured for the database catest
    You have chosen to configure Database Control for managing the database catest

    This will remove the existing configuration and the default settings and perform a fresh configuration
    Do you wish to continue? [yes(Y)/no(N)]: Y
    Listener port number: 1521
    Cluster name: mycluster
    Password for SYS user:
    Password for DBSNMP user:
    Password for SYSMAN user:
    Email address for notifications (optional):
    Outgoing Mail (SMTP) server for notifications (optional):

    ........

    Jan 11, 2011 4:18:05 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
    INFO: Securing Database Control (this may take a while) ...
    Jan 11, 2011 4:19:31 PM oracle.sysman.emcp.util.DBControlUtil startOMS
    INFO: Starting Database Control (this may take a while) ...
    Jan 11, 2011 4:28:38 PM oracle.sysman.emcp.EMConfig perform
    SEVERE: Error starting Database Control
    Refer to the log file at /myhost/oracle/product/10.2.0/db_1/cfgtoollogs/emca/catest/emca_2011-01-11_
    04-11-01-PM.log for more details.
    Could not complete the configuration. Refer to the log file at /myhost/oracle/product/10.2.0/db_
    1/cfgtoollogs/emca/catest/emca_2011-01-11_04-11-01-PM.log for more details.

    So what can i do in this case ? i try to recreate what more i can do ?

    ./emctl status dbconsole

    Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
    Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
    https://myhost:1158/em/console/aboutApplication
    Oracle Enterprise Manager 10g is not running.

    ./emctl status agent

    Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
    Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
    ---------------------------------------------------------------
    Agent is Not Running

    Refer to Oracle Metlink Doc [1222603.1]

    we need to do the following :

    1- Ignore any errors and continue with the installation or upgrade. The database will be created without errors.

    2- Apply Patch 8350262 to your Oracle Home installation using OPatch

    To apply the patch :
    A-change to Patch directory .
    B-export ORACLE_SID = ORCL
    C-export ORACLE_HOME= /u01/oracle/product/10.2.0/db_1/
    D-$ORACLE_HOME/OPatch/Opatch apply

    Invoking OPatch 10.2.0.4.2

    Oracle Interim Patch Installer version 10.2.0.4.2
    Copyright (c) 2007, Oracle Corporation. All rights reserved.

    Oracle Home : /myhost
    Central Inventory : /scratch/pchebrol/oraInventory
    from : /etc/oraInst.loc
    OPatch version : 10.2.0.4.2
    OUI version : 10.2.0.4.0
    OUI location : /myhost/oui
    Log file location : /myhost/cfgtoollogs/opatch/opatch2011-01-02_11-00-00AM.log

    ApplySession applying interim patch '8350262' to OH '/myhost'

    Running prerequisite checks...

    OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.

    Backing up files and inventory (not for auto-rollback) for the Oracle Home
    Backing up files affected by the patch '8350262' for restore. This might take a while...
    Backing up files affected by the patch '8350262' for rollback. This might take a while...

    Patching component oracle.sysman.agent.core, 10.2.0.4.0a...
    Updating jar file "/myhost/sysman/jlib/emCORE.jar" with
    "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/fsc/FSWalletUtil.class"
    Updating jar file "/myhost/sysman/jlib/emCORE.jar" with
    "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/rep/RepWalletUtil.class"
    Updating jar file "/myhost/sysman/jlib/emCORE.jar" with
    "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/RootCert.class"
    Updating jar file "/myhost/sysman/jlib/emCORE.jar" with
    "/sysman/jlib/emCORE.jar/oracle/sysman/eml/sec/util/SecConstants.class"
    Updating jar file "/myhost/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_
    java.jar/oracle/sysman/eml/sec/fsc/FSWalletUtil.class"
    Updating jar file "/myhost/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_
    java.jar/oracle/sysman/eml/sec/rep/RepWalletUtil.class"
    Updating jar file "/myhost/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_
    java.jar/oracle/sysman/eml/sec/util/RootCert.class"
    Updating jar file "/myhost/sysman/jlib/emd_java.jar" with "/sysman/jlib/emd_
    java.jar/oracle/sysman/eml/sec/util/SecConstants.class"
    ApplySession adding interim patch '8350262' to inventory

    Verifying the update...
    Inventory check OK: Patch ID 8350262 is registered in Oracle Home inventory with proper meta-data.
    Files check OK: Files from Patch ID 8350262 are present in Oracle Home.

    OPatch succeeded.

    3-If you using linux you need to kill all dbconsole process by “KillDbconsole” you will find it in the same patch directory , if you are using windows no need to kill anything .

    $ /killDBConsole
    ORACLE_HOME=/myhost/db_1
    ORACLE_SID=caem31
    State directory = /myhost/db_1/staxd10_caem31
    WatchDog PID = 802932
    DBconsole PID = 577716
    EMAgent PID = 512156
    Killing WatchDog (pid=802932) ...
    Successfully killed process 802932
    Killing DBConsole (pid=577716) ...
    Successfully killed process 577716
    Killing EMAgent (pid=512156) ...
    Successfully killed process 512156

    4-This not optional steps you need to do it :

    ./emctl secure dbconsole -reset

    Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
    Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
    https://myhost:5501/em/console/aboutApplication
    Enter Enterprise Manager Root Password :
    DBCONSOLE already stopped... Done.
    Agent is already stopped... Done.
    Securing dbconsole... Started.
    Checking Repository... Done.
    Checking Em Key... Done.
    Checking Repository for an existing Enterprise Manager Root Key...
    WARNING! An Enterprise Manager Root Key already exists in
    the Repository. This operation will replace your Enterprise
    Manager Root Key.
    All existing Agents that use HTTPS will need to be
    reconfigured if you proceed. Do you wish to continue and
    overwrite your Root Key
    (Y/N) ?
    Y
    Are you sure ? Reset of the Enterprise Manager Root Key
    will mean that you will need to reconfigure each Agent
    that is associated with this OMS before they will be
    able to upload any data to it. Monitoring of Targets
    associated with these Agents will be unavailable until
    after they are reconfigured.
    (Y/N) ?
    Y
    Generating Enterprise Manager Root Key (this takes a minute)... Done.Fetching Root Certificate from
    the Repository... Done.
    Updating HTTPS port in emoms.properties file... Done.
    Generating Java Keystore... Done.
    Securing OMS ... Done.
    Generating Oracle Wallet Password for Agent.... Done.
    Generating wallet for Agent ... Done.
    Copying the wallet for agent use... Done.
    Storing agent key in repository... Done.
    Storing agent key for agent ... Done.
    Configuring Agent...
    Configuring Agent for HTTPS in DBCONSOLE mode... Done.
    EMD_URL set in /myhost/myhost/sysman/config/emd.properties
    Done.
    Configuring Key store.. Done.
    Securing dbconsole... Sucessful.

    Sometimes reset secure its not enough the same error will be appear , I know its lot of steps but i told you use command line Ok Ok what i can do just recreate enterprise manager again :

    emca -config dbcontrol db -repos recreate

    Ok are you sure its working ??!!

    emctl status dbconsole
    Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
    Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
    https://localhost:1158/em/console/aboutApplication
    Oracle Enterprise Manager 10g is running.
    ——————————————————————
    Logs are generated in directory N:\oracle\product\10.2.0\db/klpdbscph601.klpcph.local_KLPSTAGE01/sys
    man/log

    Thank you all
    hope this topic will be useful .