ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Oracle 12cR1的RESOURCE 权限和11g有些出入

Oracle 12cR1的RESOURCE 权限和11g有些出入

原创 Linux操作系统 作者:DBA_oracle_java 时间:2013-07-04 00:05:02 0 删除 编辑
实验对比:
11gR2 11.2.0.3 RAC
SQL> select file_name from dba_data_files;

FILE_NAME
--------------------------------------------------------------------------------
+DATA/test/users01.dbf
+DATA/test/undotbs01.dbf
+DATA/test/sysaux01.dbf
+DATA/test/system01.dbf
+DATA/test/example01.dbf
+DATA/test/undotbs02.dbf

SQL> select tablespace_name from dba_tablespaces;

TABLESPACE_NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS1
TEMP
USERS
UNDOTBS2
EXAMPLE

7 rows selected.



SQL> create tablespace DB11G datafile '+DATA/test/db11g.dbf' size 10M;

Tablespace created.


SQL> create user DB11G identified by oracle
  2  default tablespace db11g;

User created.


SQL> grant connect,resource to db11g;     

Grant succeeded.

SQL> conn db11g/oracle      
Connected.
SQL> select * from user_sys_privs; 

USERNAME                       PRIVILEGE                                ADM
------------------------------ ---------------------------------------- ---      
DB11G                          UNLIMITED TABLESPACE                     NO

  ----赋予resource权限之后,可以查出UNLIMITED TABLESPACE权限


12cR1 12.0.1.0 

SQL> create tablespace DB12C datafile '/ORADATA/DB12C/datafile/db12c01.dbf' size 100M autoextend on;

Tablespace created.

SQL> CREATE USER DB12C IDENTIFIED BY DB12C
  2  DEFAULT TABLESPACE DB12C;

User created.

SQL> GRANT RESOURCE TO DB12C;

Grant succeeded.

SQL> GRANT CONNECT TO DB12C;

Grant succeeded.


SQL> conn db12c/DB12C
Connected.


SQL> select * from user_sys_privs; 

---没有返回记录

SQL> CREATE TABLE T_RECO (ID INT,NAME VARCHAR2(10));

Table created.

SQL> INSERT INTO T_RECO VALUES(1,'SZSCKJ.COM');
INSERT INTO T_RECO VALUES(1,'SZSCKJ.COM')
            *
ERROR at line 1:
ORA-01950: no privileges on tablespace 'DB12C'

----可以创建表,但是不可以插入记录


SQL> GRANT UNLIMITED TABLESPACE TO DB12C;

Grant succeeded.

SQL> INSERT INTO T VALUES(1,'SZSCKJ.COM');

1 row created.

SQL> INSERT INTO T VALUES(2,'SZSCKJ.COM');

1 row created.

SQL> COMMIT;

Commit complete.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26169542/viewspace-765438/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2013-07-02

  • 博文量
    31
  • 访问量
    116870