ITPub博客

首页 > 数据库 > Oracle > remote_login_passwordfile=shared的时候的限制

remote_login_passwordfile=shared的时候的限制

原创 Oracle 作者:cnhtm 时间:2010-02-04 21:32:29 0 删除 编辑

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博客 ” ,链接:https://blog.itpub.net/22049049/viewspace-1031198/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: 手动删除数据库
请登录后发表评论 登录
全部评论

注册时间:2009-07-06

  • 博文量
    104
  • 访问量
    812109