Lob retention not changing when undo_retention is changed (Doc ID 563470.1)

APPLIES TO:

Oracle Database - Enterprise Edition - Version 8.1.7.4 to 10.2.0.5 [Release 8.1.7 to 10.2]
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Information in this document applies to any platform.
Checked for relevance on 09-Jul-2012

SYMPTOMS

Disclaimer: this note illustrates a "problem"/behavior of setting retention in 10g (8.1.7.4~10.2.0.5), and is not intended to explain how retention/pctversion works or more retention option in 11g/12c.
免责声明:此注释说明了在10g(8.1.7.4〜10.2.0.5)中设置retention的"problem"/behavior,而无意于解释在11g/12c中 retention/pctversion 的工作方式或更多retention选项

In 10g we have no control over the actual setting for RETENTION for lobs other than the current setting for UNDO_RETENTION at the time of the creation or modification of the LOB.

在10g中,除了创建或修改LOB时当前对UNDO_RETENTION的设置外,我们无法控制对lob的RETENTION的实际设置

Stopping and starting the database will not modify the setting as it seems to be static.

停止和启动数据库不会修改设置,因为它似乎是静态的

It is assumed  that when UNDO_RETENTION is changed the lobs connected to that retention are also changed which is not the case . (this is incorrect)

假定当UNDO_RETENTION更改时,与该保留连接的叶也将更改,情况并非如此。(这是不正确的)

If a lob is modified from RETENTION to PCTVERSION and back to RETENTION again then the lob retention is updated based on the current UNDO_RETENTION at the time that the LOB was altered / created to use RETENTION.

如果将lob从RETENTION修改为PCTVERSION,然后再次返回RETENTION,则基于更改/创建LOB以使用RETENTION时的当前UNDO_RETENTION来更新lob保留

In 11g we allow users to specify retention for each LOB segment

在11g中,我们允许用户为每个LOB段指定保留时间

Current documentation reads

Oracle� Database Application Developer's Guide - Large Objects
10g Release 2 (10.2)
Part Number B14249-01

4 LOBs in Tables

RETENTION

As an alternative to the PCTVERSION parameter, you can specify the RETENTION  parameter in the LOB storage clause of the CREATE TABLE or ALTER TABLE statement. Doing so, configures the LOB column to store old versions of LOB data for a period of time, rather than using a percentage of the table space.
作为PCTVERSION参数的替代方法,可以在CREATE TABLE或ALTER TABLE语句的LOB存储子句中指定RETENTION参数。 这样做,将LOB列配置为在一段时间内存储LOB数据的旧版本,而不是使用表空间的一定百分比。

For example:

CREATE TABLE ContainsLOB_tab (n NUMBER, c CLOB)
lob (c) STORE AS SEGNAME (TABLESPACE lobtbs1 CHUNK 4096
RETENTION
NOCACHE LOGGING
STORAGE (MAXEXTENTS 5)
);

The RETENTION parameter is designed for use with Undo features of the database, such as Flashback Versions Query.When a LOB column has the RETENTION property set, old versions of the LOB data are retained for the amount of time specified by the UNDO_RETENTION parameter.
RETENTION参数设计用于与数据库的undo功能一起使用,例如闪回版本查询。当LOB列设置了RETENTION属性时,LOB数据的旧版本将保留由UNDO_RETENTION参数指定的时间。

Note the following with respect to the RETENTION parameter:

关于RETENTION参数,请注意以下几点:

* Undo SQL is not enabled for LOB columns as it is with other datatypes. You must set the RETENTION property on a LOB column to use Undo SQL on LOB data.

* 与其他数据类型一样,未为LOB列启用undo SQL。 您必须在LOB列上设置RETENTION属性,才能对LOB数据使用Undo SQL。

* You cannot set the value of the RETENTION parameter explicitly. The amount of time for retention of LOB versions in determined by the UNDO_RETENTION parameter.

* 您不能显式设置RETENTION参数的值。 保留LOB版本的时间由UNDO_RETENTION参数确定。

* Usage of the RETENTION parameter is only supported in Automatic Undo Management mode. You must configure your tablefor use with Automatic Undo Management before you can set RETENTION on a LOB column.

* 仅在“自动undo管理”模式下支持使用RETENTION参数。 必须先配置表以供“自动undo管理”使用,然后才能在LOB列上设置RETENTION。

* The LOB storage clause can specify RETENTION or PCTVERSION, but not both.

* LOB存储子句可以指定RETENTION或PCTVERSION,但不能同时指定两者。

CAUSE

Problem is caused as current documentation not fully explaining how lob retention works.

由于当前文档未完全说明lob保留的工作原理而导致了问题

SOLUTION

Here is example of the problem. 这是问题的例子

SQL> CREATE TABLE lobretention
(LOBLOC blob,id NUMBER)
LOB ( lobLoc ) STORE AS
(TABLESPACE users STORAGE (INITIAL 5k NEXT 5k PCTINCREASE 0) retention); SQL> select retention from dba_lobs where table_name='LOBRETENTION'; RETENTION
----------
1400 SQL> show parameter undo_retention; NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_retention integer 1400 SQL> alter system set undo_retention= 1800 scope=both;
System altered. SQL> select retention from dba_lobs where table_name='LOBRETENTION'; RETENTION
----------
1400 SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup SQL> connect test/test
Connected.
SQL> select retention from dba_lobs where table_name='LOBRETENTION'; RETENTION
----------
1400 SQL> show parameter undo_retention; NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_retention integer 1800 SQL> alter table lobretention modify lob(lobLoc) (pctversion 5);
Table altered. SQL> alter table lobretention modify lob(lobLoc) (retention);
Table altered. SQL> select retention from dba_lobs where table_name='LOBRETENTION'; RETENTION
----------
1800

更改 undo_retention 时,Lob retention 不更改 (Doc ID 563470.1)的更多相关文章

  1. Data Pump Export 数据泵导出因ORA-31693 ORA-02354 和 ORA-01555 错误且没有LOB损坏而失败 (Doc ID 1507116.1)

    Data Pump Export Fails With ORA-31693 ORA-02354 and ORA-01555 Errors And No LOB Corruption (Doc ID 1 ...

  2. Automatic Tuning of Undo Retention 常见问题 (Doc ID 1579779.1)

    Automatic Tuning of Undo Retention Common Issues (Doc ID 1579779.1) APPLIES TO: Oracle Database - En ...

  3. Troubleshooting ORA-30036 - Unable To Extend Undo Tablespace (Doc ID 460481.1)

    Troubleshooting ORA-30036 - Unable To Extend Undo Tablespace (Doc ID 460481.1) APPLIES TO: Oracle Da ...

  4. 如何使用块更改跟踪文件估算RMAN增量备份大小 (Doc ID 1938079.1)

    How to estimate RMAN incremental backup size using block change tracking file (Doc ID 1938079.1) APP ...

  5. 如何解决在ie下,Echarts多次使用setOption更改数据时,数据错乱问题

    一.问题描述 根据用户的操作,通过Ajax请求,获取某段时间内的某数据趋势折线图数据.用户切换数据项或更改时间段时,ie中渲染的折线图包含了上一次获取的数据,导致数据错乱,如下图所示: 二.代码 数据 ...

  6. 如何确定UNDO_RETENTION参数的值以避免ORA-1555 (Doc ID 822411.1)

    How to Determine the Value Of UNDO_RETENTION Parameter to Avoid ORA-1555 (Doc ID 822411.1) APPLIES T ...

  7. SRDC - ORA-22924 or ORA-1555 on LOB data: Checklist of Evidence to Supply (Doc ID 1682707.1)

    SRDC - ORA-22924 or ORA-1555 on LOB data: Checklist of Evidence to Supply (Doc ID 1682707.1) Action ...

  8. ORA-01555 When Max Query Length Is Less Than Undo Retention, small or 0 Seconds (Doc ID 1131474.1)

    ORA-01555 When Max Query Length Is Less Than Undo Retention, small or 0 Seconds (Doc ID 1131474.1) A ...

  9. 对于一个web工程,如果我们复制一个已有的工程粘贴到同一个workspace下,我们除了需要更改工程的名字还需要更改这个新工程的content root,否则会报错。

    对于一个web工程,如果我们复制一个已有的工程粘贴到同一个workspace下,我们除了需要更改工程的名字还需要更改这个新工程的content root,否则会报错.步骤如下: 右键新的工程---&g ...

随机推荐

  1. flask项目统一捕获异常并自定义异常信息

    背景:      在日常编写了一些flask项目,主要用于测试方面的mock场景,但迭代到后期发现有时候会抛出各种乱七八糟的异常或者直接500且没有任何异常信息,这种情况一般都是某个代码块没有用try ...

  2. Python爬虫基础面试题,为2020年初就业做准备

    前言本文的文字及图片来源于网络,仅供学习.交流使用,不具有任何商业用途,版权归原作者所有,如有问题请及时联系我们以作处理.作者:qiaoziheng 一.题目部分1.python中常用的数据结构有哪些 ...

  3. Newifi D1或 D2在Openwrt中,启用硬件NAT,启用BBR

    Newifi D1或 D2在Openwrt中,启用硬件NAT,启用BBR 转载注明来源: 本文链接 来自osnosn的博客,写于 2019-09-27. 启用 mt7621的硬件nat (Newifi ...

  4. <计算机系统结构中的8个伟大思想>

    摘自<计算机组成与设计>戴维帕森 ——面向摩尔定律的设计 ——使用抽象简化设计 ——加速大概率事件 ——通过并行提高性能 ——通过流水线提高性能 ——存储器层次 ——通过冗余提高可靠性

  5. C语言笔记 02_基本语法&数据类型&变量

    基本语法 令牌 C 程序由各种令牌组成,令牌可以是关键字.标识符.常量.字符串值,或者是一个符号.例如,下面的 C 语句包括五个令牌: printf("Hello, World! \n&qu ...

  6. 利用WPF生成Q币充值二维码——扫码登录篇

    一.前言 虽然腾讯官方不支持使用二维码充值Q币,但对于喜欢钻研的人来说这不是问题,本文利用WPF技术讲解从扫码登录到生成Q币充值二维码的一整套解决方案. 因为充值Q币需要先用QQ号登录官网.所以我们首 ...

  7. 【每天一题】LeetCode 0026. 删除排序数组中的重复项

    开源地址:https://github.com/jiauzhang/algorithms 题目描述 /* * https://leetcode-cn.com/problems/remove-dupli ...

  8. Dubbo学习系列之十(Sentinel之限流与降级)

    各位看官,先提个问题,如果让你设计一套秒杀系统,核心要点是啥???我认为有三点:缓存.限流和分离.想当年12306大面积崩溃,还有如今的微博整体宕机情况,感觉就是限流降级没做好,"用有限的资 ...

  9. wpf 模拟抖音很火的罗盘时钟,附源码,下载就能跑

    wpf 模拟抖音很火的罗盘时钟,附源码 前端时间突然发现,抖音火了个壁纸,就是黑底蕾丝~~~  错错错,黑底白字的罗盘时钟! 作为程序员的我,也觉得很新颖,所以想空了研究下,这不,空下来了就用wpf, ...

  10. mysql 写入中文乱码

    今天从另一个系统往mysql数据库写入数据,发现中文变成了????? 检查数据库的设置 ,server对应字符集是latinl 调整mysql参数配置,配置文件目录/etc/mysql/mysql.c ...