重建EM repository

--删除原有信息
14:46:42 SQL> drop public synonym SETEMVIEWUSERCONTEXT
14:47:22   2  ;

Synonym dropped.

14:47:24 SQL> drop public synonym mgmt_target_blackouts;

Synonym dropped.

14:47:50 SQL> drop role mgmt_user;
        
Role dropped.

14:48:11 SQL> drop user mgmt_view cascade;

User dropped.

14:48:32 SQL> drop user sysman cascade;

User dropped.


--删除EM
$<span style="color:#ff6666;"> emca  -deconfig dbcontrol db -repos drop</span>

STARTED EMCA at Jun 17, 2014 2:52:55 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
Jun 17, 2014 2:53:37 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2014_06_17_14_52_54.log.
Jun 17, 2014 2:53:38 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Jun 17, 2014 2:53:42 PM oracle.sysman.emcp.EMReposConfig stopDBMSJobs
WARNING: Error initializing SQL connection. SQL operations cannot be performed
Jun 17, 2014 2:53:42 PM oracle.sysman.emcp.EMReposConfig invoke
WARNING: Unable to remove DBMS jobs.
Jun 17, 2014 2:53:42 PM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControl
WARNING: Error initializing SQL connection. SQL operations cannot be performed
Jun 17, 2014 2:53:42 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Jun 17, 2014 2:53:48 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jun 17, 2014 2:53:57 PM
$ 


--新建EM
$ <span style="color:#ff6666;">emca  -config  dbcontrol db -repos create</span>

STARTED EMCA at Jun 17, 2014 2:55:25 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
Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0/db_1 ]: 
Password for SYS user:  
Password for DBSNMP user:  
Invalid username/password.
Password for DBSNMP user:  
Invalid username/password.
Password for DBSNMP user:  
Password for SYSMAN 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 ................ /u01/app/oracle/product/11.2.0/db_1

Local hostname ................ TYTC
Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/db_1
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
Jun 17, 2014 2:56:21 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2014_06_17_14_55_24.log.
Jun 17, 2014 2:56:24 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Jun 17, 2014 3:08:13 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Jun 17, 2014 3:08:25 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Jun 17, 2014 3:11:08 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Jun 17, 2014 3:11:14 PM oracle.sysman.emcp.util.DBControlUtil configureSoftwareLib
INFO: Software library configured successfully.
Jun 17, 2014 3:11:14 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Deploying Provisioning archives ...
Jun 17, 2014 3:12:28 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Provisioning archives deployed successfully.
Jun 17, 2014 3:12:28 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Jun 17, 2014 3:12:48 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Jun 17, 2014 3:12:48 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jun 17, 2014 3:21:41 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Jun 17, 2014 3:21:47 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://TYTC:1158/em <<<<<<<<<<<
Jun 17, 2014 3:22:20 PM 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: /u01/app/oracle/product/11.2.0/db_1/TYTC_orcl/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 Jun 17, 2014 3:22:21 PM

--emctl命令
$ emctl
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0 
Copyright (c) 1996, 2009 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 <http://<oms-hostname>:<oms-unsecure-port>/em/*>]
       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> 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值