当前位置: 代码迷 >> Oracle管理 >> oracle 11g em重建,提醒口令无效。口令用pl/SQL都能登录,就EMCA说无效
  详细解决方案

oracle 11g em重建,提醒口令无效。口令用pl/SQL都能登录,就EMCA说无效

热度:26   发布时间:2016-04-24 05:15:44.0
oracle 11g em重建,提示口令无效。口令用pl/SQL都能登录,就EMCA说无效!
安装oracle11gr2
用户口令全部设置成sys

忽略错误安装。

安装到一半的时候,谈出一个错误窗口内容大概是:
由于以下错误,Entrprise Manager配置失败
无法对所有EM相关账户解锁。有关详细资料请参阅
D:\oracle\Administrator\cfgtoollogs\dbca\dk\emConfig.log

继续安装后,没有EM管理,服务器用PL/SQL能正常登陆。

我网上查资料,说重建EM。

结果执行emca 命令,非说我口令无效, 为什么如此蛋疼啊?


----------------命令:------------------------------------------
C:\Documents and Settings\Administrator>emca -repos create

EMCA 开始于 2012-5-30 18:52:01
EM Configuration Assistant, 11.2.0.0.2 正式版
版权所有 (c) 2003, 2005, Oracle。保留所有权利。

输入以下信息:
数据库 SID: dk
监听程序端口号: 1521
SYS 用户的口令:
用户名/口令无效。
SYS 用户的口令:
SYS 用户的口令: 用户名/口令无效。
SYS 用户的口令:
SYS 用户的口令: 用户名/口令无效。
SYS 用户的口令:
SYS 用户的口令: 用户名/口令无效。
SYS 用户的口令:
用户名/口令无效。
SYS 用户的口令:
SYS 用户的口令: 用户名/口令无效。
SYS 用户的口令:




-----------log日志信息:----------------------------------------
2012-5-30 18:00:51 oracle.sysman.emcp.ParamsManager getParam
配置: 未设置参数 ORACLE_HOSTNAME 的值。
2012-5-30 18:00:52 oracle.sysman.emcp.util.PlatformInterface executeCommand
配置: 开始执行: CMD /C D:\oracle\Administrator\product\11.2.0\dbhome_1\sysman\admin\scripts\emca\emcaDbUtil.bat "D:\oracle\Administrator\product\11.2.0\dbhome_1\sysman\admin\scripts;D:\oracle\Administrator\product\11.2.0\dbhome_1\bin;" D:/oracle/Administrator/product/11.2.0/dbhome_1/perl/bin\perl.exe D:\oracle\Administrator\product\11.2.0\dbhome_1\sysman\admin\scripts\emca\emcaDbUtil.pl D:\oracle\Administrator\product\11.2.0\dbhome_1 "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.163.241.21)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=dk)))" SYS SYSDBA declare repos_pwd varchar2(30); view_user varchar2(30); view_user_pwd varchar2(30); view_user_acc_status varchar2(30); begin repos_pwd := ?; sysman.mgmt_view_priv.get_view_user(view_user); select account_status into view_user_acc_status from sys.dba_users where upper(username) = upper ( view_user ); IF view_user_acc_status like '%LOCKED%' THEN execute immediate 'alter user ' || view_user || ' account unlock'; END IF; IF view_user_acc_status like '%EXPIRED%' THEN sysman.mgmt_view_priv.set_view_user_creds ( repos_pwd ); sysman.mgmt_view_priv.GET_VIEW_USER_CREDS ( view_user, view_user_pwd ); execute immediate 'alter user ' || view_user || ' identified by ' || view_user_pwd || ''; END IF; end; dk 1 SYSMAN_PWD 
2012-5-30 18:00:53 oracle.sysman.emcp.util.PlatformInterface executeCommand
配置: Exit value of 255
2012-5-30 18:00:53 oracle.sysman.emcp.util.PlatformInterface executeCommand
配置: Arguments passed D:\oracle\Administrator\product\11.2.0\dbhome_1 (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.163.241.21)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=dk))) SYS SYSDBA declare repos_pwd varchar2(30); view_user varchar2(30); view_user_pwd varchar2(30); view_user_acc_status varchar2(30); begin repos_pwd := ?; sysman.mgmt_view_priv.get_view_user(view_user); select account_status into view_user_acc_status from sys.dba_users where upper(username) = upper ( view_user ); IF view_user_acc_status like '%LOCKED%' THEN execute immediate 'alter user ' || view_user || ' account unlock'; END IF; IF view_user_acc_status like '%EXPIRED%' THEN sysman.mgmt_view_priv.set_view_user_creds ( repos_pwd ); sysman.mgmt_view_priv.GET_VIEW_USER_CREDS ( view_user, view_user_pwd ); execute immediate 'alter user ' || view_user || ' identified by ' || view_user_pwd || ''; END IF; end; dk 1 SYSMAN_PWD 

Connecting to database using connect string (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.163.241.21)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=dk))) in home D:\oracle\Administrator\product\11.2.0\dbhome_1 with user "SYS" role "SYSDBA". 

2012-5-30 18:00:53 oracle.sysman.emcp.util.PlatformInterface executeCommand
配置: Couldn't connect to the db - ORA-28056: Writing audit records to Windows Event Log failed (DBD ERROR: OCISessionBegin) at D:\oracle\Administrator\product\11.2.0\dbhome_1\sysman\admin\scripts\emca\emcaDbUtil.pl line 106, <STDIN> line 2.
  相关解决方案