DEFERRED_SEGMENT_CREATION specifies 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.

这句话的意思是 DEFERRED_SEGMENT_CREATION 参数的作用是:创建表的时候延迟创建这个表相关的segment(包括lobs,indexes),直到第一次插入数据的时候才创建segment.补充说明:DEFERRED_SEGMENT_CREATION 参数从11.2.0.1引进,默认值为true;如果要使其恢复老版本功能,设置该参数为false.

DEFERRED_SEGMENT_CREATION默认值

SQL> select * from v$version;

BANNER

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

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production

PL/SQL Release 11.2.0.3.0 - Production

CORE 11.2.0.3.0 Production

TNS for Linux: Version 11.2.0.3.0 - Production

NLSRTL Version 11.2.0.3.0 - Production

SQL> select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') "WWW.XIFENFEI.COM" FROM DUAL;

WWW.XIFENFEI.COM

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

2012-06-01 05:31:03

SQL> show parameter DEFERRED_SEGMENT_CREATION;

NAME TYPE VALUE

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

deferred_segment_creation boolean TRUE

DEFERRED_SEGMENT_CREATION效果验证

SQL> create table t_xifenfei (id number,name varchar2(30));

Table created.

SQL> create index ind_t_xifenfei on t_xifenfei(id);

Index created.

SQL> select segment_name,segment_type from dba_segments where

2 segment_name in('T_XIFENFEI','IND_T_XIFENFEI') AND OWNER='CHF';

no rows selected

--未创建segment

SQL> INSERT INTO T_XIFENFEI VALUES(1,'WWW.XIFENFEI.COM');

1 row created.

SQL> commit;

Commit complete.

SQL> select segment_name,segment_type from dba_segments where

2 segment_name in('T_XIFENFEI','IND_T_XIFENFEI') AND OWNER='CHF';

SEGMENT_NAME SEGMENT_TYPE

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

IND_T_XIFENFEI INDEX

T_XIFENFEI TABLE

--创建segment

SQL> alter session set deferred_segment_creation=false;

Session altered.

SQL> create table t_xifenfei_2 (id number,name varchar2(30));

Table created.

SQL> select segment_name,segment_type from dba_segments where segment_name='T_XIFENFEI_2';

SEGMENT_NAME SEGMENT_TYPE

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

T_XIFENFEI_2 TABLE

--创建segment

问题1(朋友疑惑为什么它没有给相关表空间分配配额但是创建表成功)

SQL> create user xifenfei identified by xifenfei default tablespace users;

User created.

SQL> grant connect,resource to xifenfei;

Grant succeeded.

SQL> revoke unlimited tablespace from xifenfei;

Revoke succeeded.

SQL> alter user xifenfei quota unlimited on users;

User altered.

SQL> conn xifenfei/xifenfei

Connected.

SQL> create table t_xifenfei (id number,name varchar2(30)) tablespace system;

Table created.

--在system表空间无配额,但是创建表成功

SQL> insert into t_xifenfei values(1,'www.xifenfei.com');

insert into t_xifenfei values(1,'www.xifenfei.com')

*

ERROR at line 1:

ORA-01950: no privileges on tablespace 'SYSTEM'

--插入数据库失败,因为在system上创建segment失败

SQL> alter session set deferred_segment_creation=false;

Session altered.

SQL> create table t_xifenfei_2 (id number,name varchar2(30)) tablespace system;

create table t_xifenfei_2 (id number,name varchar2(30)) tablespace system

*

ERROR at line 1:

ORA-01950: no privileges on tablespace 'SYSTEM'

--deferred_segment_creation设置为false后,创建表直接失败

问题2(exp未导segment不存在表)

该问题帮朋友解决过.因为暂时无11.2.0.1版本数据库,直接摘录MOS

In 11.2 the deferred storage segment feature is enabled by default.

Conventional export (exp) silently skips tables with deferred segment

creation if no segment has yet been created. ie: If the table does

not yet contain any rows. In some cases "exp" will report EXP-11 for

the table.

eg:

create table t(c1 int) tablespace sysaux;

select segment_created from user_tables where table_name='T';

SEG

---

NO

Table level export:

exp scott/tiger file=/tmp/scott.dmp tables=t

^

EXP-11 SCOTT.T does not exist

Schema level export:

exp scott/tiger file=/tmp/scott.dmp owner=scott statistics=none

^

Export completes successfully but silently does not export

table "T".

Rediscovery Notes:

Tables that may be affected by this can be found thus:

select owner, table_name from dba_tables

where segment_created='NO';

EXP-11 on export for tables with no data.

Tables missing after exp/imp

Workaround

Re-create the missing table at the export site from DDL.

(the table did not contain rows otherwise it would have

had a segment created for it)

In 11.2 the deferred storage segment feature is enabled by default.

Conventional export (exp) silently skips tables with deferred segment

creation if no segment has yet been created. ie: If the table does

not yet contain any rows. In some cases "exp" will report EXP-11 for

the table.

eg:

create table t(c1 int) tablespace sysaux;

select segment_created from user_tables where table_name='T';

SEG

---

NO

Table level export:

exp scott/tiger file=/tmp/scott.dmp tables=t

^

EXP-11 SCOTT.T does not exist

Schema level export:

exp scott/tiger file=/tmp/scott.dmp owner=scott statistics=none

^

Export completes successfully but silently does not export

table "T".

Rediscovery Notes:

Tables that may be affected by this can be found thus:

select owner, table_name from dba_tables

where segment_created='NO';

EXP-11 on export for tables with no data.

Tables missing after exp/imp

Workaround

Re-create the missing table at the export site from DDL.

(the table did not contain rows otherwise it would have

had a segment created for it)

This issue is fixed in

•12.1 (Future Release)

•11.2.0.2 (Server Patch Set)

oracle deferred_segment_creation,DEFERRED_SEGMENT_CREATION 参数相关说明相关推荐

  1. oracle deferred_segment_creation,deferred_segment_creation 参数

    一.导入时少表 1.Oracle 11g EXP导出,再IMP导入时,发现导入后,出现少表,有一些数据为空的表结构没有被导入,原因是于导出时,这些空表没有被导出. 二.查阅资料 1.从网上翻看各类资料 ...

  2. Oracle 11.2 参数详解

    #O7_DICTIONARY_ACCESSIBILITY是用来控制select any table权限是否可以访问data dictionary的,主要用来保护数据字典.oracle建议把O7_DIC ...

  3. oracle创建带参数视图6,Oracle创建带有参数的视图代码介绍

    在Oracle里,视图不像存储过程和函数一样,可以定义输入参数,但我们可以变个方式,使用程序包来实现 首先定义程序包: /* 按个人需要定义,我定义三个参数 ,因我项目程序需要,所以三个参数都是num ...

  4. oracle数据库pfile文件,Oracle pfile/spfile参数文件详解

    Oracle pfile/spfile参数文件详解 在创建数据库时,SPFile文件中部分必须考虑的参数值: 基本规则 a.在SPFile文件中,所有参数都是可选的,也就是说只需要在初始化参数文件中列 ...

  5. 文件管理服务器数据库,Oracle数据库服务器参数文件管理教程

    一.在启动的时候指定参数文件. 在启动数据库的过程中,必须要提供一个准确的初始化参数文件,无论是文本参数文件还是服务器参数文件.在利用Startup命令启动数据库的时候,可以指定其采用的服务器参数文件 ...

  6. oracle中affirm,2.Oracle Data Guard 参数介绍

    Oracle Data Guard 参数介绍 Data Guard作为Oracle提供的一个高可用及灾备解决方案,理解并可以实施它对于DBA来说是非常重要套的技能 上节介绍了有关Data Guard的 ...

  7. 服务器的数据库文件是哪个文件夹,Oracle数据库服务器参数文件管理技巧是什么?...

    在Oracle数据库中,这个初始化参数文件分为两类,分别为文本参数文件与服务器参数文件.他们的内容是相同的,只是所表示的方式不同.在服务器参数文件中,是以二进制的形式保存的.可以利用数据库的命令对他们 ...

  8. c oracle udt,Oracle OCI操作UDT相关学习

    1.Oracle数据类型 Oracle的数据类型如下 字符串类型 char nchar varchar2 nvarchar2 数值类型 int number integer smallint 日期类型 ...

  9. oracle 游标当方法参数,Oracle游标、参数的使用例子

    /// /// 总部审核 /// /// /// public int Update(Hashtable ht) { //修改 StringBuilder sb = new StringBuilder ...

  10. oracle学习笔记 参数文件及数据库的启动和关闭

    oracle学习笔记 参数文件及数据库的启动和关闭 我们这节课把oracle的参数文件以及oracle的启动关闭讲一下 一)参数文件作用 先看oracle的参数文件 它由来已久了 我们知道oracle ...

最新文章

  1. SqlServer2000日志文件过大问题处理
  2. Dynamics CRM 注册插件dll到GAC
  3. 一张图看懂云栖大会·上海峰会重磅产品发布
  4. bean json转kotlin_Android--------kotlin插件神器Json直接生成javaBean
  5. Mac精品软件分享第二期
  6. php 白名单,php实现ip白名单黑名单功能
  7. http 1.php,php – Nginx忽略客户端的HTTP 1.0请求并通过HTTP 1.1响应
  8. sql 2008 清空数据库日志
  9. 如何获取客户端MAC地址(三个方法)
  10. 【Oracle】进阶知识进一步了解
  11. QT的QWebEngineView内存泄漏
  12. 调整swiper底部默认小点的样式
  13. 网页编程语言,网页编程语言大全介绍。
  14. 【git】------git的基本命令 (此文章转载我的老师 Alley-巷子)
  15. 金九银十,一个新的王者在8月即将加冕——Treasure project(TPC)重磅来袭,你参与了吗?
  16. input tabIndex说明
  17. 为什么只有状态转移算法才是真正意义上的智能优化算法,其它的都是“假冒伪劣”?
  18. 系统修复软件测试工资,技术员们有福了,关于怎么用MHDD修复硬盘坏道,现在免费给大家了!!!...
  19. 企业微信 消息推送使用(新建应用、发送消息)
  20. 批量删除微信好友,清粉源码,基于autojs开发的免root自动化脚本

热门文章

  1. 2023年最新清理软件CleanMyMac X测评:效果/功能/价格/优惠/搭配方案与替代方案
  2. 爱奇艺:付费会员的使徒行者
  3. shell语法----expr命令
  4. linux资源监视器可视化,与您分享一个使用Bash编写的很酷的Linux资源监视器
  5. python实现cc攻击_第二章 Requests库的使用:变相的cc攻击
  6. SecureCRT萌新常用命令及Linux命令大全整理
  7. 霍金北京《宇宙的起源》演讲全文
  8. AlphabetJS --- 在console或者shell中打印字符图案的小工具
  9. Project 硬件RAID配置,DELL的远程管理卡iDRAC配置
  10. t430服务器安装系统,戴尔Dell T430安装Windows 2008 R2教程,解决安装程序无法创建新的系统分区,也无法定位现有系统分区。...