当前位置:首页 > PHP教程 > PHP总结归纳

Oraclesysdba与sysoper的认证方式

1.oracle有两种方式可以认证sysdba/sysoper用户: 1).操作系统级认证:即登录到oracle数据库主机,使用如下用户登录后,可以直接使用sqlplus / as sysdba登录:在linux/unix下隶属于dba权限组(linux/unix)的用户,在windows下隶属于ora_dba组的用户; 2).

1.oracle有两种方式可以认证sysdba/sysoper用户:

1).操作系统级认证:即登录到oracle数据库主机,使用如下用户登录后,可以直接使用sqlplus / as sysdba登录:在linux/unix下隶属于dba权限组(linux/unix)的用户,在windows下隶属于ora_dba组的用户;

2).远程认证:口令文件认证,即在任何主机都可以使用sqlplus sys/xxx@sid登录。

2.两种方式有各自的开关:

1).操作系统级认证的开关:sqlnet.ora中authentication_services,当sqlnet.authentication_services=nts,nts代表ntsecurity时,即采用os认证;如果为none则关闭操作系统级认证,必须采用usr/pwd as sysdba/sysoper 登陆。

2).口令文件认证的开关:spfile/pfile中remote_login_passwordfile参数:

remote_login_passwordfile = exclusive,则一个实例专用;

remote_login_passwordfile = share则可以多个实例共享(用于ops/rac环境);

remote_login_passwordfile = none则不启用口令文件,此时任何sysdba/sysoper都无法连接进来。

remote_login_passwordfile = shared:more than one database canuse a password file. however, the only user recognized by the password file issys.

os级认证是优先于口令文件认证的。这两个认证方式可以同时打开、同时关闭或者只开一个,图示如下:

3.口令文件:

1).口令文件的生成与重建

orapwd file=filename password=password entries=max_users

filename: name of the password file(mandatory)

password: the password forsysoperand sysdba (mandatory)

entries: the maximum number ofdistinct users allowed to connect as sysdbaor

sysoper. if you exceed this number,you must create a new password file. it is safer to have a larger number. thereare no spaces around the equal-to (=) character.

windows下密码文件默认的位置是ora92/database目录,默认的文件名是pwdsid.ora,linux下oracle默认的位置是$oracle_home/dbs目录,默认的文件名是orapwsid,对于别的文件名是不认的。

2).密码文件用户的维护与查询

执行grant sysdba/sysoper to 用户 ,oracle会自动在口令文件中增加一个条目,并且把密码copy过来。

select * fromv$pwfile_users可以查看口令文件

例如:

sql> grant sysdbato scott;

grant succeeded

sql> select * fromv$pwfile_users;

username sysdba sysoper sysasm

------------------------------------ ------- ------

sys true true false

scott true false false

.syntaxhighlighter{padding-top:20px;padding-bottom:20px;}
【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:)!