oracle 10g rac em重建实施步骤

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:381

本帖最后由 paulyi 于 2014-2-15 18:39 编辑

oracle 10g rac em重建实施步骤

1 删除oracle 10g rac em
1.1 删除db control 配置文件用emca脚本

bin/emca -deconfig dbcontrol db -cluster
[oracle@p595a2:/oracle/app/oracle]$emca -deconfig dbcontrol db -clusterSTARTED EMCA at May 10, 2010 5:02:53 PMEM Configuration Assistant, Version 10.2.0.1.0 ProductionCopyright (c) 2003, 2005, Oracle. All rights reserved.Enter the following information:Database unique name: fsyykDo you wish to continue? [yes(Y)/no(N)]: yMay 10, 2010 5:02:58 PM oracle.sysman.emcp.EMConfig performINFO: 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 stopOMSINFO: Stopping Database Control (this may take a while) ...Enterprise Manager configuration completed successfullyFINISHED EMCA at May 10, 2010 5:03:44 PM 注意如果是双机,则需要加-cluster选项。
1.2 检查相关目录是否删除(两边节点)

Remove the following directories from your filesystem:
/
/oc4j/j2ee/OC4J_DBConsole__一般在运行2.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 dropEnter SYS user's password : Enter repository user name : dbsnmpEnter repository user password : Getting temporary tablespace from database...Found temporary tablespace: TEMPChecking 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.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.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 -clusterSTARTED EMCA at May 10, 2010 5:37:32 PMEM Configuration Assistant, Version 10.2.0.1.0 ProductionCopyright (c) 2003, 2005, Oracle. All rights reserved.Enter the following information:Database unique name: fsyykListener port number: 1521Password for SYS user: Password for SYSMAN user: Password for SYSMAN user: Password for SYSMAN user: Do you wish to continue? [yes(Y)/no(N)]: yMay 10, 2010 5:37:54 PM oracle.sysman.emcp.EMConfig performINFO: 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 performDeconfigurationWARNING: 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 dropRepositoryINFO: Dropping the EM repository (this may take a while) ...May 10, 2010 5:37:56 PM oracle.sysman.emcp.EMReposConfig invokeINFO: Repository successfully droppedEnterprise 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 p595a2fsyyk2 p595b2 p595a2May 10, 2010 5:48:24 PM oracle.sysman.emcp.EMConfig restoreOuiLoc用IE浏览器登录EM正常。也可以用脚本来重建em,参考metalink文档ID 278100.1 见附件

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】