1. To start em, run emctl start dbconsole.
[Oracle @ localhost DBOracle] $ emctl start dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996,200 9 Oracle Corporation. All rights reserved.
Https://localhost.localdomain: 1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control ................................ ........................................ ..................... failed.
------------------------------------------------------------------
Logs are generated in directory/usr/oracle/DBOracle/app/localhost. localdomain_mwdb/sysman/log
2. startup failed. Check the log and no solution is found.
[Oracle @ localhost DBOracle] $ vi/usr/oracle/DBOracle/app/localhost. localdomain_mwdb/sysman/log
"============================================== ============================================
"Netrw Directory Listing (netrw v125)
"/Usr/oracle/DBOracle/app/localhost. localdomain_mwdb/sysman/log
"Sorted by name
"Sort sequence: [\/] $ ,\. h $ ,\. c $ ,\. cpp $ ,*,\. o $ ,\. obj $ ,\. info $ ,\. swp $ ,\. bak $ ,\~ $
"Quick Help: <F1>: help-: go up dir D: delete R: rename s: sort-by x: exec
"============================================== ============================================
../
PafLogs/
. Emagent_perl.trc
Emagent. log
Emagent. trc
Emagent. trc.1
Emagent. trc.2
Emagent_perl.trc
Emagentfetchlet. log
Emagentfetchlet. trc
Emctl. log
Emctl. msg
Emdb. nohup
Emdctl. log
Emdctl. trc
Emoms. log
Emoms. trc
Emoms. trc.1
Emoms. trc.2
NfsPatchPlug. log
PatchAgtStPlugin. log
Secure. log
3. Enter emctl start directly to get the command prompt.
[Oracle @ localhost DBOracle] $ emctl start
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996,200 9 Oracle Corporation. All rights reserved.
Oracle Enterprise Manager 10g Database Control commands:
Emctl start | stop dbconsole
Emctl status | secure | setpasswd dbconsole
Emctl config dbconsole-heap_size <size_value>-max_perm_size <size_value>
Emctl status agent
Emctl status agent-secure [-omsurl Emctl getversion
Emctl reload | upload | clearstate | getversion agent
Emctl reload agent dynamicproperties [<Target_name >:< Target_Type>]...
Emctl config agent <options>
Emctl config agent updateTZ
Emctl config agent getTZ
Emctl resetTZ agent
Emctl config agent credentials [<Target_name> [: <Target_Type>]
Emctl gensudoprops
Emctl clearsudoprops
Blackout Usage:
Emctl start blackout <Blackoutname> [-nodeLevel] [<Target_name> [: <Target_Type>]... [-d <Duration>]
Emctl stop blackout <Blackoutname>
Emctl status blackout [<Target_name> [: <Target_Type>]...
The following are valid options for blackouts
<Target_name: Target_type> defaults to local node target if not specified.
If-nodeLevel is specified after <Blackoutname>, the blackout will be applied to all targets and any target list that follows will be ignored.
Duration is specified in [days] hh: mm
Emctl getemhome
Emctl ilint
Em Key Commands Usage:
Emctl config emkey-emkeyfile <emkey. ora path> [-force] [-sysman_pwd <sysman password>]
Emctl config emkey-emkey [-emkeyfile <emkey. ora path>] [-force] [-sysman_pwd <sysman password>]
Emctl config emkey-repos [-emkeyfile <emkey. ora path>] [-force] [-sysman_pwd <sysman password>]
Emctl config emkey-remove_from_repos [-sysman_pwd <sysman password>]
Emctl config emkey-copy_to_repos [-sysman_pwd <sysman password>]
Emctl status emkey [-sysman_pwd <sysman password>]
Secure DBConsole Usage:
Emctl secure dbconsole-sysman_pwd <sysman password> [-passwd_file <abs file loc>]
[-Host <slb hostname>] [-sid <service name>] [-reset] [-secure_port <secure_port>]
[-Root_dc <root_dc>] [-root_country <root_country>] [-root_state <root_state>] [-root_loc <root_loc>]
[-Root_org <root_org>] [-root_unit <root_unit>] [-root_email <root_email>]
[-Wallet <wallet loc>] [-wallet_pwd <wallet pwd>] [-trust_certs_loc <certs loc>]
Emctl secure status dbconsole
Register Targettype Usage:
Emctl register oms targettype [-o <Output filename>] <XML filename> <rep user> <rep passwd> <rep host> <rep port> <rep sid> OR
Emctl register oms targettype [-o <Output filename>] <XML filename> <rep user> <rep passwd> <rep connect descriptor>
4. Use the emctl status dbconsole command as prompted to find that em is not running.
[Oracle @ localhost DBOracle] $ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996,200 9 Oracle Corporation. All rights reserved.
Https://localhost.localdomain: 1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is not running.
------------------------------------------------------------------
Logs are generated in directory/usr/oracle/DBOracle/app/localhost. localdomain_mwdb/sysman/log
5. Use emca-config dbcontrol db-repos recreate for reconstruction as prompted.
[Oracle @ localhost DBOracle] $ emca-config dbcontrol db-repos recreate
Started emca at Oct 17,201 1 9:54:44 AM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003,200 5, Oracle. All rights reserved.
Enter the following information:
Database SID: mwdb
Database Control is already configured for the database mwdb
You have chosen to configure Database Control for managing the database mwdb
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 ORACLE_HOME [/usr/oracle/DBOracle/app]:
Password for SYS user:
Password for DBSNMP user: [oracle @ localhost DBOracle] $
[Oracle @ localhost DBOracle] $ emca-config dbcontrol db-repos recreate
Started emca at Oct 17,201 1 9:55:44 AM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003,200 5, Oracle. All rights reserved.
Enter the following information:
Database SID: mwdb
Database Control is already configured for the database mwdb
You have chosen to configure Database Control for managing the database mwdb
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 ORACLE_HOME [/usr/oracle/DBOracle/app]:
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for communications (optional ):
Outgoing Mail (SMTP) server for communications (optional ):
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ....../usr/oracle/DBOracle/app
Local hostname ......
Listener ORACLE_HOME.../usr/oracle/DBOracle/app
Listener port number... 1522
Database SID ...... mwdb
Email address for communications ...............
Outgoing Mail (SMTP) server for communications ...............
-----------------------------------------------------------------
Do you wish to continue? [Yes (Y)/no (N)]: y
Oct 17,201 1 9:56:28 AM oracle. sysman. emcp. EMConfig perform
INFO: This operation is being logged at/usr/oracle/export toollogs/emca/mwdb/emca_20151110_17_09_55_44.log.
Oct 17,201 1 9:56:28 AM oracle. sysman. emcp. util. DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while )...
Oct 17,201 1 9:56:31 AM oracle. sysman. emcp. EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while )...
Oct 17,201 1 9:58:23 AM oracle. sysman. emcp. EMReposConfig invoke
INFO: Repository successfully dropped
Oct 17,201 1 9:58:23 AM oracle. sysman. emcp. EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while )...
Oct 17,201 1 10:04:20 AM oracle. sysman. emcp. EMReposConfig invoke
INFO: Repository successfully created
Oct 17,201 1 10:04:21 AM oracle. sysman. emcp. EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while )...
Oct 17,201 1 10:05:06 AM oracle. sysman. emcp. EMReposConfig invoke
INFO: Uploaded configuration data successfully
Oct 17,201 1 10:05:09 AM oracle. sysman. emcp. util. DBControlUtil configureSoftwareLib
INFO: Software library configured successfully.
Oct 17,201 1 10:05:09 AM oracle. sysman. emcp. EMDBPostConfig configureSoftwareLibrary
INFO: Deploying Provisioning archives...
Oct 17,201 1 10:05:28 AM oracle. sysman. emcp. EMDBPostConfig configureSoftwareLibrary
INFO: Provisioning archives deployed successfully.
Oct 17,201 1 10:05:28 AM oracle. sysman. emcp. util. DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while )...
Oct 17,201 1 10:06:07 AM oracle. sysman. emcp. util. DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Oct 17,201 1 10:06:07 AM oracle. sysman. emcp. util. DBControlUtil startOMS
INFO: Starting Database Control (this may take a while )...
Oct 17,201 1 10:06:21 AM oracle. sysman. emcp. EMDBPostConfig configure mconfiguration
INFO: Database Control started successfully
Oct 17,201 1 10:06:21 AM oracle. sysman. emcp. EMDBPostConfig configure mconfiguration
INFO: >>>>>>>>>> The Database Control URL is https://localhost.localdomain: 1158/em <
Oct 17,201 1 10:06:23 AM oracle. sysman. emcp. EMDBPostConfig invoke
WARNING:
* *********************** WARNING *************** *********
Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted. the encryption key has been placed in the file:/usr/oracle/DBOracle/app/localhost. localdomain_mwdb/sysman/config/emkey. ora. please ensure this file is backed up as the encrypted data will become unusable if this file is lost.
**************************************** *******************
Enterprise Manager configuration completed successfully
Finished emca at Oct 17,201 1 10:06:23 AM
6. Start em again and start it successfully.
[Oracle @ localhost DBOracle] $ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996,200 9 Oracle Corporation. All rights reserved.
Https://localhost.localdomain: 1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
------------------------------------------------------------------
Logs are generated in directory/usr/oracle/DBOracle/app/localhost. localdomain_mwdb/sysman/log
[Oracle @ localhost DBOracle] $
Http://redhacker.iteye.com/blog/1198156