oracle查询⽤户密码命令,Oracle数据库⽤户密码问题
场景⼀:
在重置⼀些系统sys和⽤户密码(已过期)时(还是使⽤原密码,根据user$中的password修改重置),在user$查看sys和system⽤户信息时发现这两个⽤户的PASSWORD为空,如下:
> select name,password from user$ where name in ('SYS','SYSTEM');
NAME                                                        PASSWORD
------------------------------------------------------------ ------------------------------------------------------------
SYS
SYSTEM
但是通过闪回查询user$发现这两个⽤户的password字段在之前是有值的,如下(上⼀条查询⼤概是在10点左右):
SQL> name,password from user$ as of timestamp to_timestamp('20191014 090000','yyyymmdd hh24
miss') 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.
oracle登录命令ARCH: FAL archive failed. Archiver continuing
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,还是因为其他的⼀些原因
⿇烦⽼师们帮忙看看

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。