查看用户是否具有sysdba或者sysoper权限,有2种方法
1、Oracle提供一视图查看用户是否具有sysdba或者sysoper权限,分别用TRUE和FALSE来表示
[quote]SQL> select * from V$PWFILE_USERS;
USERNAME SYSDB SYSOP
------------------------------ ----- -----
SYS TRUE TRUE
WZDBRA TRUE FALSE
TEST FALSE TRUE[/quote]
2、用操作系统命令strings查看密码文件,可以看到WZDBRA,TEST具有sysdba或者sysoper权限。
[quote][ora10g@hzmc dbs]$ strings orapwdrb
]\[Z
ORACLE Remote Password file
INTERNAL
AB27B53EDC5FEF41
8A8F025737A9097A
WZDBRA
0E93C336B3A73A0A
TEST
7A0F2B316C212D67[/quote]
当然Oracle密码文件可以用命令orapwd重建,但只能重建sys用户的密码,其他用户授予sysdba、sysoper权限,需要在数据库中显式赋权。显式赋权之后,Oracle将更新密码文件。需要注意的一点就是[color=red]在RAC情况下,Oracle只更改当前节点的密码文件。[/color]以下是orapwd语法的说明
[quote][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),
[b]password - password for SYS (mand),[/b]
[b]entries - maximum number of distinct DBA,[/b]
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.[/quote]
1、Oracle提供一视图查看用户是否具有sysdba或者sysoper权限,分别用TRUE和FALSE来表示
[quote]SQL> select * from V$PWFILE_USERS;
USERNAME SYSDB SYSOP
------------------------------ ----- -----
SYS TRUE TRUE
WZDBRA TRUE FALSE
TEST FALSE TRUE[/quote]
2、用操作系统命令strings查看密码文件,可以看到WZDBRA,TEST具有sysdba或者sysoper权限。
[quote][ora10g@hzmc dbs]$ strings orapwdrb
]\[Z
ORACLE Remote Password file
INTERNAL
AB27B53EDC5FEF41
8A8F025737A9097A
WZDBRA
0E93C336B3A73A0A
TEST
7A0F2B316C212D67[/quote]
当然Oracle密码文件可以用命令orapwd重建,但只能重建sys用户的密码,其他用户授予sysdba、sysoper权限,需要在数据库中显式赋权。显式赋权之后,Oracle将更新密码文件。需要注意的一点就是[color=red]在RAC情况下,Oracle只更改当前节点的密码文件。[/color]以下是orapwd语法的说明
[quote][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),
[b]password - password for SYS (mand),[/b]
[b]entries - maximum number of distinct DBA,[/b]
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.[/quote]