V$PWFILE_USERS 列出的是password文件里已授予sysdba、sysoper权限的用户,如果查询没有记录,那就有可能没有了password文件了,没有了密码文件当然sqlplus sys/xx as sysdba这种用sys用sysdba用户就无法登录了。下面介绍一下11g和12c的v$pwfile_user视图。
一、v$pwfile_user表(11g)
- V$PWFILE_USERS lists all users in the password file, and indicates whether the user has been granted the SYSDBA, SYSOPER, and SYSASM privileges.
- SELECT * FROM v$pwfile_users ORDER BY username;
二、 v$pwfile_user表(12c)
- V$PWFILE_USERS lists all users in the password file, and indicates whether the user has been granted the SYSDBA, SYSOPER, SYSASM,SYSBACKUP, SYSDG, and SYSKM privileges.