emca配置-Enterprise Manager configuration assistant

来源:互联网 发布:淘宝代购服务点常德 编辑:程序博客网 时间:2024/05/17 07:12

关键步骤:

1. 在bash_profile配置参数 oracle_hostname
2. 在操作系统/etc/hosts 文件中增加 虚礼IP
3.in sqlplus: 运行以下脚本删除资料库配置信息
           EXEC sysman.emd_maintenance.remove_em_dbms_jobs;

           DROP USER mgmt_view CASCADE;

           DROP ROLE mgmt_user;

           drop public synonym MGMT_TARGET_BLACKOUTS;

           drop public synonym SETEMVIEWUSERCONTEXT;

           DROP USER sysman CASCADE;
         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;
/
4.vi /home/oracle/.bash_profile

      in linux:  emca -deconfig dbcontrol db

5.    in linux:   emca -config dbcontrol db -repos create

 

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

STARTED EMCA at Jun 16, 2012 10:24:18 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database SID: dv11
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 ................ /u01/oracle/product/10.2.0/db_1

Database hostname ................ redhat.com
Listener port number ................ 1521
Database SID ................ dv11
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Jun 16, 2012 10:34:48 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/oracle/product/10.2.0/db_1/cfgtoollogs/emca/dv11/emca_2012-06-16_10-24-18-PM.log.
Jun 16, 2012 10:34:52 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Jun 16, 2012 10:41:12 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Jun 16, 2012 10:41:33 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jun 16, 2012 10:43:44 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Jun 16, 2012 10:43:44 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://redhat.com:5500/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jun 16, 2012 10:43:44 PM

原创粉丝点击