ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oracle 10g rac em重建实施步骤

oracle 10g rac em重建实施步骤

原创 Linux操作系统 作者:paulyibinyi 时间:2010-05-11 19:37:11 0 删除 编辑

1.1      删除oracle 10g rac em

1.1.1  删除db control 配置文件用emca脚本

bin/emca -deconfig dbcontrol db -cluster

 

[oracle@p595a2:/oracle/app/oracle]$emca -deconfig dbcontrol db -cluster

 

STARTED EMCA at May 10, 2010 5:02:53 PM

EM Configuration Assistant, Version 10.2.0.1.0 Production

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

 

Enter the following information:

Database unique name: fsyyk

 

Do you wish to continue? [yes(Y)/no(N)]: y

May 10, 2010 5:02:58 PM oracle.sysman.emcp.EMConfig perform

INFO: This operation is being logged at /oracle/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/fsyyk/emca_2010-05-10_05-02-53-PM.log.

May 10, 2010 5:03:00 PM oracle.sysman.emcp.util.DBControlUtil stopOMS

INFO: Stopping Database Control (this may take a while) ...

Enterprise Manager configuration completed successfully

FINISHED EMCA at May 10, 2010 5:03:44 PM  

        注意如果是双机,则需要加-cluster选项。

1.1.2  

         Remove the following directories from your filesystem:
/
/oc4j/j2ee/OC4J_DBConsole__

         一般在运行2.1.1脚本时会自动删除上面目录,如果没删除掉,请手工删除

1.1.3   删除db control资料库用RepManager命令(两个节点)

 

 In both 10g R1 and R2 run: 
/sysman/admin/emdrep/bin/RepManager -action drop
 
[oracle@p595a2:/oracle/app/oracle/product/10.2.0/db_1]$sysman/admin/emdrep/bin/RepManager p595a2 1521 fsyyk1 -action drop
Enter SYS user's password : 
Enter repository user name : dbsnmp
Enter repository user password : 
Getting temporary tablespace from database...
Found temporary tablespace: TEMP
Checking SYS Credentials ... OK.
Dropping the repository..
Quiescing DB ...

[oracle@p595a2:/oracle/app/oracle/product/10.2.0/db_1]$sysman/admin

/emdrep/bin/RepManager p595b2 1521 fsyyk2 -action drop

 

1.1.4  手工删除db control 对象

Step 1: Drop AQ related objects in the SYSMAN schema
Logon SQLPLUS as user SYSMAN
SQL> exec DBMS_AQADM.DROP_QUEUE_TABLE(queue_table=>'MGMT_NOTIFY_QTABLE',force =>TRUE);

Step 2: Drop the DB Control Repository Objects
Logon SQLPLUS as user SYS or SYSTEM, and drop the sysman account and management objects:
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP RESTRICT;
SQL> EXEC sysman.emd_maintenance.remove_em_dbms_jobs;
SQL> EXEC sysman.setEMUserContext('',5);
SQL> REVOKE dba FROM sysman;
SQL> 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;
/
SQL> DROP USER mgmt_view CASCADE;
SQL> DROP ROLE mgmt_user;
SQL> DROP USER sysman CASCADE;
SQL> ALTER SYSTEM DISABLE RESTRICTED SESSION;
注意这里数据库要停机。

1.1.5 删除db control配置文件和相关对象,用命令删除

/bin/emca -deconfig dbcontrol db -repos drop -cluster

[oracle@p595a2:/oracle/app/oracle/product/10.2.0/db_1]$emca -deconfig dbcontrol db -repos drop -cluster

 

STARTED EMCA at May 10, 2010 5:37:32 PM

EM Configuration Assistant, Version 10.2.0.1.0 Production

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

 

Enter the following information:

Database unique name: fsyyk

Listener port number: 1521

Password for SYS user: 

Password for SYSMAN user: 

Password for SYSMAN user: 

Password for SYSMAN user: 

Do you wish to continue? [yes(Y)/no(N)]: y

May 10, 2010 5:37:54 PM oracle.sysman.emcp.EMConfig perform

INFO: This operation is being logged at /oracle/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/fsyyk/emca_2010-05-10_05-37-32-PM.log.

May 10, 2010 5:37:55 PM oracle.sysman.emcp.EMDBPreConfig performDeconfiguration

WARNING: EM is not configured for this database. No EM-specific actions can be performed.

May 10, 2010 5:37:55 PM oracle.sysman.emcp.EMReposConfig dropRepository

INFO: Dropping the EM repository (this may take a while) ...

May 10, 2010 5:37:56 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Repository successfully dropped

Enterprise Manager configuration completed successfully

 

注意加cluster选项和输入sys,sysman等用户密码

1.2      用dbca图形界面重建EM

   dbca,选择集群,选择配置数据库选项,选择要配置的数据库,

   删除em后,这时Enterprise Manager资料档案库是可选状态的,输入dbsnmp和

   sysman用户密码,点finish,即可创建Em

   在创建过程中可以监控

/oracle/app/oracle/product/10.2.0/db_1/cfgtoollogs/dbca/fsyyk

下的emConfig.log

  如果出现以下信息,则表示创建成功

****************  Current Configuration  ****************

 INSTANCE            NODE           DBCONTROL_UPLOAD_HOST

----------        ----------        ---------------------

fsyyk1            p595a2            p595a2

fsyyk2            p595b2            p595a2

May 10, 2010 5:48:24 PM oracle.sysman.emcp.EMConfig restoreOuiLoc

      用IE浏览器登录EM正常。

 

也可以用脚本来重建em,

参考metalink文档ID 278100.1 见附件

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7199859/viewspace-662460/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
学习数据库

注册时间:2007-12-11

  • 博文量
    907
  • 访问量
    6894393