O7_DICTIONARY_ACCESSIBILITY 控制具有ANY OBJECT权限的用户 对SYS模式下的OBJECT是否具有访问,修改权限。这个参数默认为FALSE,如果这个参数为TRUE,那么SYS也不需要 写 as sysdba 就可以登录 数据库
SQL> alter system set O7_DICTIONARY_ACCESSIBILITY=true scope=spfile;
System altered.
重启数据库
SQL> grant select any table to robinson;
Grant succeeded.
SQL> select * from user_sys_privs;
USERNAME PRIVILEGE ADM
------------------------------ ---------------------------------------- ---
ROBINSON CREATE SESSION NO
ROBINSON SELECT ANY TABLE NO 可以看到robinson用户具有select any table 权限
ROBINSON UNLIMITED TABLESPACE NO
SQL> select count(*) from sys.obj$;
COUNT(*)
----------
11617
SQL> alter system set O7_DICTIONARY_ACCESSIBILITY=false scope=sPfile;
System altered.
重启数据库
SQL> select count(*) from sys.obj$;
select count(*) from sys.obj$
*
ERROR at line 1:
ORA-00942: table or view does not exist
REMOTE_OS_AUTHENT 该参数控制某个用户从远程登录到数据库服务器,需不需要给出用户名和密码再登录到数据库
通过putty 远程登录到数据库服务器
[oracle@oracle ~]$ whoami
oracle 用户名为oracle
将remote_os_authent 改为TRUE ,我这里已经改了
SQL> show parameter remote_os
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_os_authent boolean TRUE
创建与操作系统同名的数据库用户名
SQL> create user oracle identified externally;
User created.
确保os_authent_prefix被清空,这里我已经清空了,默认为OPS$
SQL> show parameter os_authent_prefix
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
os_authent_prefix string
授予oracle 用户基本权限,使之能登陆数据库
SQL> grant connect,resource to oracle;
Grant succeeded.
测试一下不用输入 用户名和密码 能不能登录数据库
[oracle@oracle ~]$ sqlplus /
SQL*Plus: Release 10.2.0.2.0 - Production on Tue Sep 29 12:59:27 2009
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> show user
USER is "ORACLE"
OK,成功了