oracle数据库管理员登陆时的认证方法有两种:OS认证和password file认证。
如下图:

其中OS认证是凌驾于password file之上的。
使用OS认证
1 建立用户并将其加入OSDBA或OSOPER组
2 本地登陆 connect / as sysdba或connect / as sysoper
远程安全连接 CONNECT /@net_service_name AS SYSDBA
CONNECT /@net_service_name AS SYSOPER
使用password file认证
1 创建password file(工具建库后默认已创建,目录为$ORACLEHOME/dbs/orapw
sid)
ORAPWD FILE=filename PASSWORD=password ENTRIES=max_users
2 设置remote_login_passwordfile为EXCLUSIVE(默认值,静态参数)
alter system set remote_login_passwordfile=exclusive scope=spfile;
需要重启库生效
3 给用户赋予sysdba或sysoper权限
grant sysdba to jeff;
grant sysoper to jeff;
4 v$pwfile_users包含现在password file内的用户
SQL> select * from v$pwfile_users;
USERNAME SYSDB SYSOP
------------------------------ ----- -----
SYS TRUE TRUE
auth.JPG
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/11946422/viewspace-666290/
,如需转载,请注明出处,否则将追究法律责任。