DEFERRED_SEGMENT_CREATION <11g的…
2013-01-28 22:06
337 查看
首先先了解下DEFERRED_SEGMENT_CREATION
的参数信息
如下:DEFERRED_SEGMENT_CREATION
Property | Description |
---|---|
Parameter type | Boolean |
Default value | true |
Modifiable | ALTER SESSION, ALTER SYSTEM |
Range of values | true | false |
Basic | No |
DEFERRED_SEGMENT_CREATIONspecifies the semantics
of deferred segment creation. If set to
true, then
segments for tables and their dependent objects (LOBs, indexes)
will not be created until the first row is inserted into the
table.
Before creating a set of tables, if it is known that a
significant number of them will not be populated, then consider
setting this parameter to
true. This saves disk space
and minimizes install
time.《如果在创建一组表前已经知道,相当数量的表不会立即被使用,则建议将该参数设为true
,这将有利于节省磁盘空间,和安装时间》
问题情形:
oracle 11.2.0.1.0
创建用户aaa,给其connect和resource角色,但回收unlimited
tablespace权限:
SQL> create
user aaa identified by aaa default tablespace users;
User created.
SQL> grant connect,resource to aaa;
Grant succeeded.
SQL> revoke unlimited tablespace from aaa;
Revoke succeeded.
SQL> select * from role_sys_privs where
role="RESOURCE";
ROLE PRIVILEGE ADM
------------------------------
---------------------------------------- ---
RESOURCE CREATE SEQUENCE NO
RESOURCE CREATE TRIGGER NO
RESOURCE CREATE CLUSTER NO
RESOURCE CREATE PROCEDURE NO
RESOURCE CREATE TYPE NO
RESOURCE CREATE OPERATOR NO
RESOURCE CREATE TABLE NO
RESOURCE CREATE INDEXTYPE NO
8 rows selected.
SQL> alter user aaa quota unlimited on users;
User altered.
现在的问题是:aaa在任何表空间都有创建表的权限
[oracle@master /]$ sqlplus
aaa
SQL*Plus: Release 11.2.0.1.0 Production on Wed Jun 6 18:38:25
2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Enterprise
Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data
Mining
and Real Application Testing options
SQL> create table test1(id int) tablespace
users;
Table created.
SQL> create table test2 (id int) tablespace
system;
Table created.
SQL> create table test3(id int) tablespace
zaodian;
Table created.
表test1可以正常插入数据,test2和test3都无法插入数据,这是正常的:
SQL> insert into test1 values(1);
1 row created.
SQL> insert into test2 values(1);
insert into test2 values(1)
*
ERROR at line 1:
ORA-01950: no privileges on tablespace 'SYSTEM'
SQL> insert into test3 values(1);
insert into test3 values(1)
*
ERROR at line 1:
ORA-01950: no privileges on tablespace 'ZAODIAN'
请问,为什么用户aaa可以在system,zaodian表空间上有创建表的权限?
这是一个相当有趣的问题
11g 你创建表,默认不创建segment的,所以你在插入数据的时候,创建segment的失败,导致插入失败
@@deferred_segment_creation
设置为false可以解决普通用户在其他的表空间有建表的权限
相关文章推荐
- 新特性的副产品--从11g的DEFERRED SEGMENT CREATION说起
- 11g参数之deferred_segment_creation
- oracle 11g使用deferred_segment_creation 延迟段创建特性时遇到的问题总结
- 11g deferred_segment_creation
- Oracle 11g的Deferred Segment Creation
- Oracle 11g的Deferred Segment Creation
- Oracle 11g exp导出 deferred_segment_creation参数配置
- oracle 11g使用deferred_segment_creation 延迟段创建特性时遇到的问题总结
- oracle 11g使用deferred_segment_creation 延迟段创建特性时遇到的问题总结
- 新特性的副产品--从11g的DEFERRED SEGMENT CREATION说起 推荐
- oracle 11g导出空表 DEFERRED_SEGMENT_CREATION
- &nbsp|&quot|&amp|&lt|&gt等html字符转义
- JSP 之 JSTL_05:<c:import>
- <meta http-equiv="Refresh" conte…
- 关于>any <any >all <all的理解
- <!--[if IE]>….<![endif]-->&…
- Struts2 <s:token>防止表单重复提交 %{}
- 标题:深度分销的方向和尺度 内容:<P> 深度分销的方向和尺度<BR> 所谓深度分销,有人也称之为通路精耕细作,是通过减少原有渠道层次,并增强中间商分销能力或通过企
- 转 oracle客户端安装 11G
-  |"|&|<|>等html字符转义