{"id":32404,"date":"2020-11-30T09:41:05","date_gmt":"2020-11-30T09:41:05","guid":{"rendered":"https:\/\/ittutorial.org\/?p=32404"},"modified":"2020-11-30T09:52:55","modified_gmt":"2020-11-30T09:52:55","slug":"ora-01466-unable-to-read-data-table-definition-has-changed","status":"publish","type":"post","link":"https:\/\/ittutorial.org\/ora-01466-unable-to-read-data-table-definition-has-changed\/","title":{"rendered":"ORA-01466: unable to read data &#8211; table definition has changed"},"content":{"rendered":"<p>I got &#8221; <strong>ORA-01466: unable to read data &#8211; table definition has changed<\/strong> &#8221; error in Oracle database during impdp.<\/p>\n<p><!--more--><\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"color: #ff0000;\">ORA-01466: unable to read data &#8211; table definition has changed<\/span><\/h2>\n<p>&nbsp;<\/p>\n<p>Details of error are as follows.<\/p>\n<pre>ORA-31693: Table data object \"MSDBA\".\"TEST_TABLE\" failed to load\/unload and is being skipped due to error:\r\nORA-02354: error in exporting\/importing data\r\nORA-01466: unable to read data - table definition has changed\r\nProcessing object type TABLE_EXPORT\/TABLE\/PROCACT_INSTANCE\r\nProcessing object type TABLE_EXPORT\/TABLE\/TABLE\r\n\r\n<strong>ORA-01466:\u00a0Unable to read data -- Table definition has changed<\/strong>\r\n\r\n<strong>Cause:\u00a0\u00a0<\/strong>This is a time-based read consistency error for a database object,\u00a0 such as a table or index. Either of the following may have happened: The query was parsed and executed with a snapshot older than the time the object was changed.\r\n\u00a0\r\nThe creation time-stamp of the object is greater than the current system time.\u00a0 This happens, for example, when the system time is set to a time earlier than the creation time of the object.\r\n\u00a0\r\n<strong>Action:\u00a0<\/strong>If the cause is an old snapshot, then commit or rollback the transaction and resume work. a creation time-stamp in the future, ensure the system time is set correctly. If the object creation time-stamp is still greater than the system time, then export the object's data, drop the object, recreate the object so it has a new creation time-stamp, import the object's data, and resume work.<\/pre>\n<p>&nbsp;<\/p>\n\n<p>&nbsp;<\/p>\n<p>The <span style=\"color: #ff0000;\"><strong>ORA-01466<\/strong><\/span> error is related with the table or index <strong>last DDL time<\/strong> is greater than the time of <strong>impdp<\/strong>. Namely someone may drop or truncate the table when you did this action.<\/p>\n<p>Or if you use flashback_scn option,\u00a0The value of SCN supplied to parameter flashback_scn does not correspond to the time of LAST_DDL_TIME from DBA_OBJECTS for the specific table.<\/p>\n<p>A table&#8217;s DDL may have changed due to a truncate job and LAST_DDL_TIME can end up ahead of the flashback_scn time supplied in the parameter.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3><span style=\"color: #ff0000;\">ORA-01466<\/span><\/h3>\n<p>In This example, a developer or business analyist created a job that ran a truncate command while datapump job was running.<\/p>\n<p>To solve this error, you should\u00a0Check if there is any DDL job which is causing <span style=\"color: #ff0000;\"><strong>LAST_DDL_TIME\u00a0<\/strong> <\/span>to be modified to newer value. If so, change the time of execution of that job.<\/p>\n<p>As a work around you can remove <span id=\"form1:panelPage1\">the <strong><span style=\"color: #ff0000;\">FLASHBACK_SCN<\/span><\/strong><\/span><strong><span style=\"color: #ff0000;\">\u00a0<\/span> <\/strong>parameter until you get the solution for the DDL job.<\/p>\n<pre>EXPDP syntax :\r\n\r\nexpdp userid=&lt;LOGIN&gt;\r\n\u00a0\u00a0\u00a0\u00a0 dumpfile=&lt;DUMP_NAME&gt;_%U.dmp\r\n\u00a0\u00a0\u00a0\u00a0 logfile=&lt;LOG_NAME&gt;.log\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\r\n\u00a0\u00a0\u00a0\u00a0 filesize=28000m\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\r\n<strong><span style=\"color: #ff0000;\">\u00a0\u00a0\u00a0\u00a0 flashback_scn=$SCN\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0<\/span><\/strong>\r\n \u00a0\u00a0\u00a0 parallel=8\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0  \r\n\u00a0\u00a0\u00a0\u00a0 cluster=N\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\r\n\u00a0\u00a0\u00a0\u00a0 full=y<\/pre>\n<p>This error can also be generated\u00a0 for <span style=\"color: #ff0000;\"><strong>FLASHBACK_TIME<\/strong><\/span>.<\/p>\n<p>To determine if you are\u00a0 facing this issue, execute following steps:<\/p>\n<ol>\n<li>Check dba_objects for LAST_DDL_TIME :\n<pre class=\"kmcodeblock\">SQL&gt; select object_name,last_ddl_time from dba_objects where owner='&lt;SCHEMA_NAME&gt;' and object_name='&lt;TABLE_NAME&gt;';<\/pre>\n<p><span class=\"awizEndDelimiter\">\u00a0<\/span><\/li>\n<li>Collect SCN timestamp\n<pre class=\"kmcodeblock\">SQL&gt; select SCN_TO_TIMESTAMP(SCN_specified_with_export) from dual;<\/pre>\n<p><span class=\"awizEndDelimiter\">\u00a0<\/span><br \/>\nIf the LAST_TIME is newer than the scn time, you are facing this issue.<\/li>\n<li>Remove the job which is running any DDL command on the failing object.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h4><a href=\"https:\/\/ittutorial.org\/oracle-data-pump-export-import-expdp-impdp-tutorial-with-examples-4\/\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"color: #ff0000;\">Do you want to learn Oracle Datapump ( Export import ), then Click This Link and read the articles.<\/span><\/a><\/h4>\n<blockquote class=\"wp-embedded-content\" data-secret=\"lVVYgpQJJM\"><p><a href=\"https:\/\/ittutorial.org\/oracle-data-pump-export-import-expdp-impdp-tutorial-with-examples-4\/\">Oracle Data Pump &#8211; Export Import ( Expdp Impdp ) Tutorial with Examples-4<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Oracle Data Pump &#8211; Export Import ( Expdp Impdp ) Tutorial with Examples-4&#8221; &#8212; IT Tutorial\" src=\"https:\/\/ittutorial.org\/oracle-data-pump-export-import-expdp-impdp-tutorial-with-examples-4\/embed\/#?secret=LsYUAthmE8#?secret=lVVYgpQJJM\" data-secret=\"lVVYgpQJJM\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I got &#8221; ORA-01466: unable to read data &#8211; table definition has changed &#8221; error in Oracle database during impdp.<\/p>\n","protected":false},"author":1,"featured_media":6095,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2111],"tags":[16065,16068,16062,16067,8027,16071,16072,16061,16069,16066,16063,16064,16070],"class_list":["post-32404","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-ora-errors","tag-and-executed-w-old-snapshot","tag-flashback-table-in-oracle","tag-flashback-table-ora-01466","tag-flashback_scn","tag-how-to-recover-dropped-table-in-oracle-11g-without-flashback","tag-ora-01466","tag-ora-1466","tag-ora-01466-flashback-table-truncate","tag-ora-01466-unable-to-read-data-table-definition-has-changed","tag-ora-1466-ro-tx-began","tag-oracle-12c-expdp-ora-31693-ora-02354-ora-01466","tag-query-parsed-after-tbl-or-index-change","tag-unable-to-read-data-table-definition-has-changed"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/03\/ora-error-e1494274386931.png","jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/32404","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/comments?post=32404"}],"version-history":[{"count":1,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/32404\/revisions"}],"predecessor-version":[{"id":32405,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/32404\/revisions\/32405"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/media\/6095"}],"wp:attachment":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/media?parent=32404"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/categories?post=32404"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/tags?post=32404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}