Oracle 查看用户是否具有sysdba或者sysoper权限

查看用户是否具有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]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值