查看用户是否具有sysdba或者sysoper权限,有2种方法
1、Oracle提供一视图查看用户是否具有sysdba或者sysoper权限,分别用TRUE和FALSE来表示
引用
SQL> select * from V$PWFILE_USERS;
USERNAME                       SYSDB SYSOP
------------------------------ ----- -----
SYS                            TRUE  TRUE
WZDBRA                         TRUE  FALSE
TEST                           FALSE TRUE
2、用操作系统命令strings查看密码文件,可以看到WZDBRA,TEST具有sysdba或者sysoper权限。
引用
[ora10g@hzmc dbs]$ strings  orapwdrb
]\[Z
ORACLE Remote Password file
INTERNAL
AB27B53EDC5FEF41
8A8F025737A9097A
WZDBRA
0E93C336B3A73A0A
TEST
7A0F2B316C212D67
当然Oracle密码文件可以用命令orapwd重建,但只能重建sys用户的密码,其他用户授予sysdba、sysoper权限,需要在数据库中显式赋权。显式赋权之后,Oracle将更新密码文件。需要注意的一点就是在RAC情况下,Oracle只更改当前节点的密码文件。以下是orapwd语法的说明
引用
[ora10g@hzmc dbs]$ orapwd
Usage: orapwd file=<fname> password=<password> entries=<users> force=<y/n> nosysdba=<y/n>
  where
    file - name of password file (mand),
    password - password for SYS (mand),
    entries - maximum number of distinct DBA,
    force - whether to overwrite existing file (opt),
    nosysdba - whether to shut out the SYSDBA logon (opt for Database Vault only).
  There are no spaces around the equal-to (=) character.


授予用户sysdba 或sysoper权限
grant sysdba to scott;
回收
revoke sysdba from  scott;