objects:
SQL> drop user sysman cascade; SQL> drop role MGMT_USER;
SQL> drop user MGMT_VIEW cascade;
SQL> drop public synonym MGMT_TARGET_BLACKOUTS; SQL> drop public synonym SETEMVIEWUSERCONTEXT; b)
创建一个EM资料库 $emca -repos create
STARTED EMCA at Aug 18, 2008 9:49:01 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: orcl1 Listener port number: 1521 Password for SYS user: Password for SYSMAN user: Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]: y
Aug 18, 2008 9:49:08 PM oracle.sysman.emcp.EMConfig perform INFO:
This
operation
is
being
logged
/u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/orcl/emca_2008-08-18_09-49-01-PM.log.
Aug 18, 2008 9:49:08 PM oracle.sysman.emcp.EMReposConfig createRepository INFO: Creating the EM repository (this may take a while) ...
Aug 18, 2008 10:01:29 PM oracle.sysman.emcp.EMReposConfig invoke INFO: Repository successfully created
Enterprise Manager configuration completed successfully FINISHED EMCA at Aug 18, 2008 10:01:30 PM c)
配置数据库的 Database Control emca -config dbcontrol db
STARTED EMCA at Aug 18, 2008 10:03:46 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: orcl1 Listener port number: 1521 Password for SYS user: Password for DBSNMP user: ys Password for SYSMAN user:
Password for SYSMAN user: Email address for notifications (optional): Outgoing Mail (SMTP) server for notifications (optional): ASM ORACLE_HOME [ /u01/app/oracle/product/10.2.0/db_1 ]:
at
ASM SID [ +ASM ]: ASM port [ 1521 ]: ASM user role [ SYSDBA ]: ASM username [ SYS ]: ASM user password: y
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................ /u01/app/oracle/product/10.2.0/db_1
Database hostname ................ rac10g1 Listener port number ................ 1521 Database SID ................ orcl1
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
ASM ORACLE_HOME ................ /u01/app/oracle/product/10.2.0/db_1 ASM SID ................ +ASM ASM port ................ 1521 ASM user role ................ SYSDBA ASM username ................ SYS
----------------------------------------------------------------- Do you wish to continue? [yes(Y)/no(N)]: y
Aug 18, 2008 10:04:36 PM oracle.sysman.emcp.EMConfig perform INFO:
This
operation
is
being
logged
/u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/orcl/emca_2008-08-18_10-03-46-PM.log.
Aug 18, 2008 10:05:00 PM oracle.sysman.emcp.util.DBControlUtil startOMS INFO: Starting Database Control (this may take a while) ...
Aug 18, 2008 10:07:41 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration INFO: Database Control started successfully
Aug 18, 2008 10:07:42 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration INFO: >>>>>>>>>>> The Database Control URL is http://rac10g1:1158/em <<<<<<<<<<< Enterprise Manager configuration completed successfully FINISHED EMCA at Aug 18, 2008 10:07:42 PM d)
先设置ORACLE_SID环境变量后,启动EM console服务 emctl start dbconsole TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved. http://rac10g1:1158/em/console/aboutApplication Agent Version : 10.1.0.4.1 OMS Version : Unknown Protocol Version : 10.1.0.2.0
at
Agent Home : /u01/app/oracle/product/10.2.0/db_1/rac10g1_orcl1 Agent binaries : /u01/app/oracle/product/10.2.0/db_1 Agent Process ID : 23102 Parent Process ID : 20546
Agent URL : http://rac10g1:3938/emd/main Started at : 2008-08-18 22:06:45 Started by user : oracle
Last Reload : 2008-08-18 22:06:45
Last successful upload : (none) Last attempted upload : (none) Total Megabytes of XML files uploaded so far : 0.00 Number of XML files pending upload : 26 Size of XML files pending upload(MB) : 3.99 Available disk space on upload filesystem : 12.61% Agent is already started. Will restart the agent Stopping agent ... stopped.
Starting Oracle Enterprise Manager 10g Database Control .................. started. ------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/10.2.0/db_1/rac10g1_orcl1/sysman/log e) 十五、 十六、
a) b)
先设置ORACLE_SID环境变量后,查看EM console服务的状态 emctl status dbconsole 创建RMAN备份
创建DataGuard
创建 logic standby database