手动创建oem

[oracle@std bin]$ /u02/app/product/10.2.0/db_1/bin/emca -config dbcontrol db -repos create

STARTED EMCA at 26-Jan-2014 11:28:40
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

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

You have specified the following settings

Database ORACLE_HOME ................ /u02/app/product/10.2.0/db_1

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

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
26-Jan-2014 11:29:09 oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u02/app/product/10.2.0/db_1/cfgtoollogs/emca/CUUG/emca_2014-01-26_11-28-40-AM.log.
26-Jan-2014 11:29:10 oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
26-Jan-2014 11:33:25 oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
26-Jan-2014 11:33:29 oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
26-Jan-2014 11:35:06 oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
26-Jan-2014 11:35:06 oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://std:1158/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at 26-Jan-2014 11:35:06
[oracle@std bin]$ netstat -tulnp|grep 1158
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:1158                0.0.0.0:*                   LISTEN      8652/java  
[oracle@std bin]$ emctl
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0  
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
Invalid arguments

Unknown command option 
Usage:: 
   Oracle Enterprise Manager 10g Database Control commands:
       emctl start| stop| status| setpasswd dbconsole
       emctl secure <options>

       emctl set ssl test|off|on em
       emctl set ldap <host> <port> <user dn> <user pwd> <context dn>
emctl blackout options can be listed by typing "emctl blackout"
emctl config options can be listed by typing "emctl config"
emctl secure options can be listed by typing "emctl secure"
emctl ilint  options can be listed by typing "emctl ilint"
emctl deploy  options can be listed by typing "emctl deploy"
[oracle@std bin]$ emctl status dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0  
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
http://std:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is running. 
------------------------------------------------------------------
Logs are generated in directory /u02/app/product/10.2.0/db_1/std_CUUG/sysman/log
[oracle@std bin]$ emctl stop dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0  
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
http://std:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ... 
 ...  Stopped. 
 [oracle@std ~]$ emca -deconfig dbcontrol db -repos drop

STARTED EMCA at Apr 18, 2014 12:37:57 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: ORCL
Listener port number: 1521
Password for SYS user:  
Password for SYSMAN user:  

Do you wish to continue? [yes(Y)/no(N)]: y
Apr 18, 2014 12:38:13 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u02/app/cfgtoollogs/emca/ORCL/emca_2014_04_18_12_37_57.log.
Apr 18, 2014 12:38:13 PM oracle.sysman.emcp.EMDBPreConfig performDeconfiguration
WARNING: EM is not configured for this database. No EM-specific actions can be performed.
Apr 18, 2014 12:38:14 PM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControl
WARNING: Error initializing SQL connection. SQL operations cannot be performed
Apr 18, 2014 12:38:14 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Apr 18, 2014 12:38:17 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Apr 18, 2014 12:38:18 PM
原文地址:https://www.cnblogs.com/myrunning/p/3987834.html