创建em

                                                         手动创建em


之前装oracle之前已经知晓是否要使用em,手头有个库要用em

但安装时没有装。其实很简单可以看第二步,第一步删除em

1)删除下面的schema、role、synonym (在sql里以管理员身份运行)

DROP public synonym SETEMVIEWUSERCONTEXT;
DROP PUBLIC SYNONYM MGMT_TARGET_BLACKOUTS;
drop role MGMT_USER;
DROP USER MGMT_VIEW CASCADE;
DROP USER SYSMAN CASCADE;

emca -deconfig dbcontrol db -repos drop

删除可能报错,如果报错可能是你库中某些账户没删干净,或者解锁什么的。

2)安装em (此时注意lsnrctl 状态,lsnrctl status 一定要有正常服务)

[oracle@hvr oradata]$ lsnrctl status



LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 13-APR-2016 06:47:39


Copyright (c) 1991, 2013, Oracle.  All rights reserved.


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hvr)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                13-APR-2016 06:01:19
Uptime                    0 days 0 hr. 46 min. 20 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/hvr/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hvr)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "test" has 1 instance(s).
  Instance "test", status READY, has 1 handler(s) for this service...
Service "testXDB" has 1 instance(s).
  Instance "test", status READY, has 1 handler(s) for this service...
The command completed successfully

[oracle@hvr ~]$ emca -config dbcontrol db -repos create




STARTED EMCA at Apr 13, 2016 5:48:25 AM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.


Enter the following information:
Database SID: Database SID: test
Listener port number: 1521
Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0/dbhome_1 ]: 
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 ................ /u01/app/oracle/product/11.2.0/dbhome_1


Local hostname ................ hvr
Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_1
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
Apr 13, 2016 5:48:54 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/test/emca_2016_04_13_05_48_25.log.
Apr 13, 2016 5:48:54 AM oracle.sysman.emcp.DatabaseChecks performReposChecks
SEVERE: Dbcontrol Repository already exists.  Fix the error(s) and run EM Configuration Assistant again in standalone mode.

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值