下面的链接是两者不同的权限说明
http://download.Oracle.com/docs/cd/B19306_01/server.102/b14231/dba.htm#sthref137
The manner in which you are authorized to use these privileges depends upon the method of
authentication that you use.When you connect with SYSDBA or SYSOPER privileges, you connect with
a default schema, not with the schema that is generally associated with your username.For
SYSDBA this schema is SYS; for SYSOPER the schema isPUBLIC.
--两者的schema不同
SQL> show user
USER is "SYS"
SQL> conn / as sysoper
Connected.
SQL> show user
USER is "PUBLIC"
在使用OEM登陆时,还有一种登陆时角色的选择则是normal,这个是对所有普通用户而言,登陆后其schema是自身
--查看密码文件视图,可以得到哪些用户为sysdba,哪些用户为sysoper
SQL> select * from v$pwfile_users;
USERNAMESYSDB SYSOP
------------------------------ ----- -----
SYSTRUETRUE
SCOTTTRUEFALSE
USR1FALSE TRUE
--下面演示了使用不同的角色来登陆
SQL> conn scott/tiger@orcl as sysdba
Connected.
SQL> show user;--尽管登陆的帐户是scott,但执行show user显示的是sys
USER is "SYS"
SQL> conn scott/tiger@orcl as sysoper/*scott的sysop列为false*/
ERROR:
ORA-01031: insufficient privileges
Warning: You are no longer connected to ORACLE.
SQL> conn usr1/usr1@orcl as sysdba
ERROR:
ORA-01031: insufficient privileges
SQL> conn usr1/usr1 as sysoper
Connected.
SQL> show user;--登陆的帐户是usr1,执行show user显示的是public
USER is "PUBLIC"
sys@ORCL> select * from dba_roles where rolelike 'SYS%'; --不存在这两个角色
no rows selected
--下面演示sysdba与sysoper都可以用来启动数据库
idle> conn scott/tiger as sysdba
Connected to an idle instance.
idle> startup
idle> conn usr1/usr1 as sysoper
Connected to an idle instance.
idle> startup
总结:
sysoper与sysdba不是角色,DBA角色也不包含这两种权限。
这是两种用于完成数据库管理任务的特殊权限,如数据库创建,实例启动、关闭等
这两个权限独立于数据库之外,位于数据库密码文件之中,属于密码认证范畴
通常在启动数据库时使用的场合较多,当然也可以以这两种方式连接数据库
连接数据库时使用sysdba则show user查看时为sys,使用sysoper则show user查看时为public
更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12
