Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2232599
  • 博文数量: 310
  • 博客积分: 6853
  • 博客等级: 准将
  • 技术积分: 2833
  • 用 户 组: 普通用户
  • 注册时间: 2005-08-04 16:41
文章分类

全部博文(310)

文章存档

2013年(17)

2012年(42)

2011年(76)

2010年(71)

2009年(99)

2007年(2)

2006年(1)

2005年(2)

分类: Oracle

2012-05-17 17:50:00

使用emca可以手动配置em!
配置em的过程中有一个环节要特别主要:
不论使用dbca还是使用emca -deconfig dbcontrol -repos drop在删除资料库时都有可能删除不干净,
这样在再次创建资料库时都会出现错误(显示的log中有详细的记录),因此在创建资料库时最好使用下面命令手动删除一次:
DROP public synonym SETEMVIEWUSERCONTEXT;
DROP PUBLIC SYNONYM MGMT_TARGET_BLACKOUTS;
drop role MGMT_USER;
DROP USER MGMT_VIEW CASCADE;
DROP USER SYSMAN CASCADE;

C:\Documents and Settings\Administrator\sqlplus sys/password as sysdba

连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> DROP public synonym SETEMVIEWUSERCONTEXT;
同义词已删除。
SQL> DROP PUBLIC SYNONYM MGMT_TARGET_BLACKOUTS;
同义词已删除。
SQL> drop role MGMT_USER;
角色已删除。
SQL> DROP USER SYSMAN CASCADE;
用户已删除。
SQL> DROP USER MGMT_VIEW CASCADE;
用户已删除。
SQL> exit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 断开

=====================
C:\Documents and Settings\Administrator>emctl stop dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.

OracleDBConsoleorcl 服务正在停止........
OracleDBConsoleorcl 服务已成功停止。

####################################################################################

手动建ORACLE 10G EM

C:\Documents and Settings\Administrator\emca -config dbcontrol -repos create

EMCA 开始于 2009-4-1 16:56:32
EM Configuration Assistant 10.2.0.1.0 正式版
版权所有 (c) 2003, 2005, Oracle。保留所有权利。

输入以下信息:
数据库 SID: orcl
已为数据库 orcl 配置了 Database Control
您已选择配置 Database Control, 以便管理数据库 orcl
此操作将移去现有配置和默认设置, 并重新执行配置
是否继续? [yes(Y)/no(N)]: y
监听程序端口号: 1521
SYS 用户的口令:
DBSNMP 用户的口令:
SYSMAN 用户的口令:
SYSMAN 用户的口令: 通知的电子邮件地址 (可选):
通知的发件 (SMTP) 服务器 (可选):
-----------------------------------------------------------------

已指定以下设置

数据库 ORACLE_HOME ................ d:\oracle\product\10.2.0\db_1

数据库主机名 ................ PERFECT
监听程序端口号 ................ 1521
数据库 SID ................ orcl
通知的电子邮件地址 ...............
通知的发件 (SMTP) 服务器 ...............

-----------------------------------------------------------------
是否继续? [yes(Y)/no(N)]: y
2009-4-1 16:57:17 oracle.sysman.emcp.EMConfig perform
信息: 正在将此操作记录到 d:\oracle\product\10.2.0\db_1\cfgtoollogs\emca\orcl\emc
a_2009-04-01_04-56-32-下午.log。
2009-4-1 16:57:18 oracle.sysman.emcp.util.DBControlUtil stopOMS
信息: 正在停止 Database Control (此操作可能需要一段时间)...
2009-4-1 16:57:21 oracle.sysman.emcp.EMReposConfig createRepository
信息: 正在创建 EM 资料档案库 (此操作可能需要一段时间)...
2009-4-1 16:58:56 oracle.sysman.emcp.EMReposConfig invoke
信息: 已成功创建资料档案库
2009-4-1 16:59:04 oracle.sysman.emcp.util.DBControlUtil startOMS
信息: 正在启动 Database Control (此操作可能需要一段时间)...
2009-4-1 16:59:44 oracle.sysman.emcp.EMDBPostConfig performConfiguration
信息: 已成功启动 Database Control
2009-4-1 16:59:44 oracle.sysman.emcp.EMDBPostConfig performConfiguration
警告: 无法创建 Database Control 快捷方式
2009-4-1 16:59:44 oracle.sysman.emcp.EMDBPostConfig performConfiguration
信息: >>>>>>>>>>> Database Control URL 为 < < < < < < < < < < <
已成功完成 Enterprise Manager 的配置
EMCA 结束于 2009-4-1 16:59:44

---------------------
C:\Documents and Settings\Administrator\emctl start dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.

Starting Oracle Enterprise Manager 10g Database Control ...OracleDBConsoleorcl
服务正在启动 .................
OracleDBConsoleorcl 服务已经启动成功。

C:\Documents and Settings\Administrator\emctl status dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.

Oracle Enterprise Manager 10g is not running.
------------------------------------------------------------------
Logs are generated in directory e:oracleproduct10.2.0db_1/XYS_orcl/sysman/log
---------------------
阅读(1677) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~