remote_login_passwordfile=shared的时候的限制

shared口令文件不能被编辑。也就是说不能向shared口令文件增加用户。如果修改sys用户或者其他具有sysdba、sysoper权限的用户的的口令的时候会报错。
如果要增加用户或修改sysdba、sysoper用户的密码,需要设置REMOTE_LOGIN_PASSWORDFILE参数为exclusive然后再设置为shared。
(b14231 第66页)

下面是过程演示:[@more@]

1、remote_login_passwordfile参数的默认值

查看remote_login_passwordfile参数

sys@CNHTM> show parameter remote_login_passwordfile

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile string EXCLUSIVE

2、remote_login_passwordfile参数为shared值的时候

修改remote_login_passwordfile参数为shared

sys@CNHTM> alter system set remote_login_passwordfile=shared scope=spfile;

System altered.

为了使修改生效,重启数据库

sys@CNHTM> startup force;
ORACLE instance started.

Total System Global Area 167772160 bytes
Fixed Size 1218292 bytes
Variable Size 79694092 bytes
Database Buffers 79691776 bytes
Redo Buffers 7168000 bytes
Database mounted.
Database opened.

修改sys用户的口令

sys@CNHTM> alter user sys identified by system;
alter user sys identified by system
*
ERROR at line 1:
ORA-28046: Password change for SYS disallowed

为scott用户授予sysdba权限

sys@CNHTM> grant sysdba to scott;
grant sysdba to scott
*
ERROR at line 1:
ORA-01999: password file cannot be updated in SHARED mode

3、remote_login_passwordfile参数为exclusive值的时候

设置参数为exclusive

sys@CNHTM> alter system set remote_login_passwordfile=exclusive scope=spfile;

System altered.

为了使参数生效,重启数据库

sys@CNHTM> startup force;
ORACLE instance started.

Total System Global Area 167772160 bytes
Fixed Size 1218292 bytes
Variable Size 79694092 bytes
Database Buffers 79691776 bytes
Redo Buffers 7168000 bytes
Database mounted.
Database opened.

修改sys用户的密码

sys@CNHTM> alter user sys identified by system;

User altered.

为scott用户授予sysdba权限

sys@CNHTM> grant sysdba to scott;

Grant succeeded.

--end--

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22049049/viewspace-1031198/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/22049049/viewspace-1031198/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值