大师网-带你快速走向大师之路 解决你在学习过程中的疑惑,带你快速进入大师之门。节省时间,提升效率

oracle 11g 修改sysman和dbsnmp

oracle 11g 修改sysman和dbsnmp用户密码后无法使用em

实验背景:

现有一台配置了EM的oracle数据库,数据库版本11.2.0.4,修改sysman和dbsnmp用户密码后重启em,发现em不可用。如图:

查看sysman和dbsnmp用户状态,发现sysman用户状态为锁住

正确修改sysman和dbsnmp用户密码的方法如下:

1、关闭em

[oracle@dbserver ~]$ emctl stop dbconsole

Oracle Enterprise Manager 11g DatabaseControl Release 11.2.0.4.0

Copyright (c) 1996, 2013 OracleCorporation. All rights reserved.

https://dbserver:1158/em/console/aboutApplication

Stopping Oracle Enterprise Manager 11gDatabase Control ...

... Stopped.

[oracle@dbserver ~]$

2、修改sysman的密码并且给sysman用户解锁

3、执行emctl setpasswd dbconsole命令修改密码

[oracle@dbserver ~]$ emctl setpasswddbconsole

Oracle Enterprise Manager 11g DatabaseControl Release 11.2.0.4.0

Copyright (c) 1996, 2013 OracleCorporation. All rights reserved.

https://dbserver:1158/em/console/aboutApplication

Please enter new repository password:

Repository password successfully updated.

[oracle@dbserver ~]$

4、修改dbsnmp用户的口令

[oracle@dbserver emd]$ pwd

/u01/app/oracle/product/11.2.0/db_1/dbserver_sztech1/sysman/emd

[oracle@dbserver emd]$

[oracle@dbserver emd]$ cp targets.xmltargets.xml.bak

[oracle@dbserver emd]$vi targets.xml

修改下面内容

<Property NAME="password"VALUE="oracle123" ENCRYPTED="FALSE"/>

5、重新启动em

[oracle@dbserver emd]$ emctl startdbconsole

Oracle Enterprise Manager 11g DatabaseControl Release 11.2.0.4.0

Copyright (c) 1996, 2013 OracleCorporation. All rights reserved.

https://dbserver:1158/em/console/aboutApplication

Starting Oracle Enterprise Manager 11gDatabase Control ..... started.

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

Logs are generated in directory/u01/app/oracle/product/11.2.0/db_1/dbserver_sztech1/sysman/log

[oracle@dbserver emd]$

6、验证

可以看到,em可以正常使用