日期:2014-05-16  浏览次数:20532 次

转:oracle的管理平台到实例的代理连接失败,密码失效

题目很直白,方便被同样问题困扰的孩子们。

数据库运行一直很正常,管理平台之前也可以正常登录。
这次要建表空间,结果em上不去,页面提示到实例的代理连接失败
出现的图上,显示
(1)数据库实例,是红色向下的箭头
(2)到数据库的实例链接,是红色向下的箭头,并有错误提示:
状态? 失败
详细资料?

?

ORA-28001: the password has expired (DBD ERROR: OCISessionBegin)

?
(3)监听,绿色向上的箭头
如果点启动的话,输入主机密码、sys密码,可以起停数据库。
且应用、sqlplus都能连上……
不过用net服务的测试连接的话,自己设置的用户名可以连上,但是system连不上。

很迷惑。
于是搜索了很多。和实例链接失败的很多,但是提示密码失效的并不多。
还有备份空间过满,等问题。
http://space.itpub.net/312079/viewspace-245769
这个帖子里,说到了用户被锁定的事,不过贴主的用户是open的,貌似问题没有解决。
索性一试。

SQL*Plus: Release 11.1.0.6.0 - Production on 星期四 2月 5 10:48:26 2009
Copyright (c) 1982, 2007, Oracle.  All rights reserved.

?
请输入用户名:? sys/oracle as sysdba
连接到:

Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select username,account_status from dba_users;
USERNAME                       ACCOUNT_STATUS
------------------------------ --------------------------------
MGMT_VIEW                      OPEN
SYS                            OPEN
DBSNMP                         EXPIRED
SYSMAN                         EXPIRED
SYSTEM                         EXPIRED(GRACE)
OUTLN                          EXPIRED & LOCKED
FLOWS_FILES                    EXPIRED & LOCKED
MDSYS                          EXPIRED & LOCKED
ORDSYS                         EXPIRED & LOCKED
EXFSYS                         EXPIRED & LOCKED
USERNAME                       ACCOUNT_STATUS
SQL> alter user system account unlock
  2  ;

?
用户已更改。
SQL> alter user sysman account unlock;
用户已更改。

结果发现unlock没用。

SQL> select username,account_status from dba_users;
USERNAME                       ACCOUNT_STATUS
------------------------------ --------------------------------
MGMT_VIEW                      OPEN
SYS                            OPEN
DBSNMP                         EXPIRED
SYSMAN                         EXPIRED
SYSTEM                         EXPIRED(GRACE)
OUTLN                          EXPIRED & LOCKED
FLOWS_FILES                    EXPIRED & LOCKED
MDSYS                          EXPIRED & LOCKED
ORDSYS                         EXPIRED & LOCKED
EXFSYS                         EXPIRED & LOCKED
USERNAME                       ACCOUNT_STATUS

?

试验一下。

SQL> connect system/oracle
ERROR:
ORA-28002: the password will expire within 6 days

?
果然过期了。

SQL> alter user system identified by oracle;

?
用户已更改。

SQL> select username,account_status from dba_users;
USERNAME                       ACCOUNT_STATUS
------------------------------