暂无图片
分享
明靓
2019-10-15
Oracle数据库用户密码问题
暂无图片 5M

场景一:

在重置一些系统sys和system用户密码(已过期)时(还是使用原密码,根据user$中的password修改重置),在user$查看sys和system用户信息时发现这两个用户的PASSWORD为空,如下:

SQL> select name,password from user$ where name in ('SYS','SYSTEM');


NAME                                                         PASSWORD

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

SYS

SYSTEM


但是通过闪回查询user$发现这两个用户的password字段在之前是有值的,如下(上一条查询大概是在10点左右):


SQL> select name,password from user$ as of timestamp to_timestamp('20191014 090000','yyyymmdd hh24miss') where name in ('SYS','SYSTEM');

NAME                                                         PASSWORD

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

SYS                                                          8A8F025737A9097A

SYSTEM                                                       2D594E86F93B17A1


询问过客户说是没人修改过密码(这里也不能确认了,因为还有其他维护人员也有权限操作)

查看用户profile发现并没有使用密码函数


后面通过测试,发现如下命令可以使user$ 的password为空:

alter user scott identified by values ' '; --引号里面是空格


场景二:

在对另外一套系统(rac+dg)的sys及system用户进行密码重置时(也是使用原密码,根据user$中的password修改重置,与上面不同的是这里的password是正常的),重置命令如下:

alter user sys identified by values '&password' account unlock;


但是紧接着发现主库一直报错ora-16191,日志如下:

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

Check that the primary and standby are using a password file

and remote_login_passwordfile is set to SHARED or EXCLUSIVE, 

and that the SYS password is same in the password files.

      returning error ORA-16191

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

ARC3: Error 16191 attaching to RFS for reconnect

FAL[server, ARC3]: Error 3113 creating remote archivelog file 'dgvatms'

FAL[server, ARC3]: FAL archive failed, see trace file.

ARCH: FAL archive failed. Archiver continuing

ORACLE Instance vatms1 - Archival Error. Archiver continuing.

Tue Oct 15 08:30:27 2019

Error 1017 received logging on to the standby

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

Check that the primary and standby are using a password file

and remote_login_passwordfile is set to SHARED or EXCLUSIVE, 

and that the SYS password is same in the password files.

      returning error ORA-16191

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

PING[ARC2]: Heartbeat failed to connect to standby 'dgvatms'. Error is 16191.

Tue Oct 15 08:31:30 2019

Error 1017 received logging on to the standby

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

Check that the primary and standby are using a password file

and remote_login_passwordfile is set to SHARED or EXCLUSIVE, 

and that the SYS password is same in the password files.

      returning error ORA-16191

这时候检查备库发现备库是正常在接收应用归档,拷贝节点一的密码文件至节点二和dg备库,问题得到解决,没有出现ora-16191


这里有几个问题想请问下:

1.除了alter user scott identified by values ' '; 会导致user$的password为空(这里是空格),是否还有其他的操作会导致password为空?

2.alter user scott identified by values ' ';这条命令修改用户密码之后,用户的真实密码是什么?

3.数据库中重置用户sys密码这个动作是否对密码文件造成了影响,才导致的ora-16191,还是因为其他的一些原因

麻烦老师们帮忙看看


收藏
分享
4条回答
默认
最新
杨德龙

为什么简单的事搞这么复杂。 这样不就行了吗。

sqlplus / as sysdba

alter user sys identified by Aa123456;


alter user system identified by Aa123456;


暂无图片 评论
暂无图片 有用 0
杨德龙
问题已关闭: 问题已经得到解决
暂无图片 评论
暂无图片 有用 0
章芋文

1、怀疑你在修改密码时指定绑定变量'&password'时候出现了空值。可以参考下user$里面的PTIME字段;

2、仅凭密文是无法解密知道密码的,除非是oracle、123456这种弱密码;

3、主库修改sys密码后,需要重新同步密码文件。

暂无图片 评论
暂无图片 有用 0
明靓
问题已关闭: 问题已经得到解决
暂无图片 评论
暂无图片 有用 0
回答交流
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
暂无图片墨值悬赏