{"id":12285,"date":"2019-03-18T08:30:17","date_gmt":"2019-03-18T07:30:17","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/"},"modified":"2019-03-18T08:30:17","modified_gmt":"2019-03-18T07:30:17","slug":"when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/","title":{"rendered":"When you change the UNDO_RETENTION parameter, the LOB segment\u2019s retention value is not modified"},"content":{"rendered":"<p>Below, I will try to explain, a particular case for the general error : <strong>ORA-01555 snapshot too old error..<\/strong><\/p>\n<p>Normally, when we have this error, we are trying to adapt the retention parameters or to tune our queries.<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">SQL&gt; show parameter undo;\n\nNAME                                 TYPE        VALUE\n------------------------------------ ----------- ------------------------------\ntemp_undo_enabled                    boolean     FALSE\nundo_management                      string      AUTO\nundo_retention                       integer     3600 --extended from 900,\nundo_tablespace                      string      UNDOTBS1\n<\/pre>\n<p>But,\u00a0are some scenarios where the above rule is not working .<\/p>\n<p>We got from the alert log file of the DB the sql id which caused the issue : <strong>pmrbk5fdfd665<\/strong><\/p>\n<p>But, when you want to search for it, in <strong>V$SQL\/V$SQLAREA<\/strong>\u00a0 is not there<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">SQL&gt; select sql_fulltext from v$sql where sql_id like '%pmrbk5fdfd665%';\n\nno rows selected\n<\/pre>\n<p><strong>Why?<\/strong><\/p>\n<p>Seems that, sql_id is present in <strong>V$OPEN_CURSOR<\/strong>, with an input into the <strong>sqltext<\/strong> column.<br \/>\nThe issue is coming from the fact that the statement is accessing a LOB column, which causes to Oracle to generate a new sql id.<br \/>\nThe execution part related to the LOBs will not appear into V$SQL\/V$SQLAREA and is not captured into the AWR reports.<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">SQL&gt;  select distinct * from v$open_cursor\n  2     where rownum &lt; 25\n  3     and sql_id like '%pmrbk5fdfd665%';\n\nSADDR                   SID USER_NAME                      ADDRESS          HASH_VALUE SQL_ID        SQL_TEXT                                                     LAST_SQL SQL_EXEC_ID CURSOR_TYPE\n---------------- ---------- ------------------------------ ---------------- ---------- ------------- ------------------------------------------------------------ -------- ----------- ---------------\n0000000670A19780         74 my_user                   00000002EB91F1F0 3831220380 pmrbk5fdfd665 table_104_11_XYZT_0_0_0\n00000006747F0478        131 my_user                   00000002EB91F1F0 3831220380 pmrbk5fdfd665 table_104_11_XYZT_0_0_0\n<\/pre>\n<p>Apparently, the string into the sql_text column is\u00a0 a\u00a0 HEX representation of the object_id that is being accessed.<br \/>\nIn our case is :<strong>XYZT<\/strong><\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">SQL&gt;    select owner, object_name, object_type\n  2    from dba_objects\n  3    where object_id = (select to_number('&amp;hex_value','XXXXXX') from dual);\nEnter value for hex_value: XYZT\nold   3:   where object_id = (select to_number('&amp;hex_value','XXXXXX') from dual)\nnew   3:   where object_id = (select to_number('XYZT','XXXXXX') from dual)\n\n                                                                                                                    \nOWNER                  OBJECT_TYPE                                               OBJECT_NAME\n---------------------- --------------------------------------------------------------------------\nmy_user                TABLE                                                     my_table\n\n\nSQL&gt; desc my_user.my_table;\n Name                  Type\n -------------------   ----------------\n EXPERIMENT_ID          VARCHAR2(20)\n DOCUMENT               BLOB\n............\u2026.\n<\/pre>\n<p>If we are looking for the retention on the &#8221; DOCUMENT &#8221;\u00a0column, we will see :<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">SQL&gt; select table_name, pctversion, retention,segment_name from dba_lobs where table_name in ('my_table');\n\nTABLE_NAME                                                                               \n                                                  PCTVERSION  RETENTION                  SEGMENT_NAME\n---------------------------------------------------------------------------------------- ------------------------------------\nmy_table                                                       900                       SYS_LOB0000027039C00002$$<\/pre>\n<p>In order to fix it , try to run this column to adapt the retention of the blob column, related to the new value of the UNDO_RETENTION parameter,<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">ALTER TABLE my_table MODIFY LOB (DOCUMENT) (3600);<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Below, I will try to explain, a particular case for the general error : ORA-01555 snapshot too old error.. Normally, when we have this error, we are trying to adapt the retention parameters or to tune our queries. SQL&gt; show parameter undo; NAME TYPE VALUE &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; temp_undo_enabled boolean FALSE undo_management string AUTO undo_retention [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229,198,368,199,59],"tags":[656,280,84,96,17,988,209,1184,218,67],"type_dbi":[],"class_list":["post-12285","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring","category-database-management","category-development-performance","category-hardware-storage","category-oracle","tag-12-2","tag-database","tag-high-availability","tag-oracle","tag-oracle-11g","tag-oracle-12-2","tag-oracle-12c","tag-oracle-18c","tag-oracle-enterprise-manager-cloud-12c","tag-performance"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>When you change the UNDO_RETENTION parameter, the LOB segment\u2019s retention value is not modified - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"When you change the UNDO_RETENTION parameter, the LOB segment\u2019s retention value is not modified\" \/>\n<meta property=\"og:description\" content=\"Below, I will try to explain, a particular case for the general error : ORA-01555 snapshot too old error.. Normally, when we have this error, we are trying to adapt the retention parameters or to tune our queries. SQL&gt; show parameter undo; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ temp_undo_enabled boolean FALSE undo_management string AUTO undo_retention [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-18T07:30:17+00:00\" \/>\n<meta name=\"author\" content=\"Oracle Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oracle Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"When you change the UNDO_RETENTION parameter, the LOB segment\u2019s retention value is not modified\",\"datePublished\":\"2019-03-18T07:30:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/\"},\"wordCount\":232,\"commentCount\":0,\"keywords\":[\"12.2\",\"database\",\"High availability\",\"Oracle\",\"Oracle 11g\",\"Oracle 12.2\",\"Oracle 12c\",\"Oracle 18c\",\"Oracle Enterprise Manager Cloud 12c\",\"Performance\"],\"articleSection\":[\"Database Administration &amp; Monitoring\",\"Database management\",\"Development &amp; Performance\",\"Hardware &amp; Storage\",\"Oracle\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/\",\"name\":\"When you change the UNDO_RETENTION parameter, the LOB segment\u2019s retention value is not modified - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2019-03-18T07:30:17+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"When you change the UNDO_RETENTION parameter, the LOB segment\u2019s retention value is not modified\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\",\"name\":\"Oracle Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"caption\":\"Oracle Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"When you change the UNDO_RETENTION parameter, the LOB segment\u2019s retention value is not modified - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/","og_locale":"en_US","og_type":"article","og_title":"When you change the UNDO_RETENTION parameter, the LOB segment\u2019s retention value is not modified","og_description":"Below, I will try to explain, a particular case for the general error : ORA-01555 snapshot too old error.. Normally, when we have this error, we are trying to adapt the retention parameters or to tune our queries. SQL&gt; show parameter undo; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ temp_undo_enabled boolean FALSE undo_management string AUTO undo_retention [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/","og_site_name":"dbi Blog","article_published_time":"2019-03-18T07:30:17+00:00","author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"When you change the UNDO_RETENTION parameter, the LOB segment\u2019s retention value is not modified","datePublished":"2019-03-18T07:30:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/"},"wordCount":232,"commentCount":0,"keywords":["12.2","database","High availability","Oracle","Oracle 11g","Oracle 12.2","Oracle 12c","Oracle 18c","Oracle Enterprise Manager Cloud 12c","Performance"],"articleSection":["Database Administration &amp; Monitoring","Database management","Development &amp; Performance","Hardware &amp; Storage","Oracle"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/","url":"https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/","name":"When you change the UNDO_RETENTION parameter, the LOB segment\u2019s retention value is not modified - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2019-03-18T07:30:17+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"When you change the UNDO_RETENTION parameter, the LOB segment\u2019s retention value is not modified"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee","name":"Oracle Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","caption":"Oracle Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/12285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=12285"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/12285\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=12285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=12285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=12285"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=12285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}