{"id":11456,"date":"2018-07-17T14:39:26","date_gmt":"2018-07-17T12:39:26","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/restarting-a-failed-transportable-tablespace-metadata-import\/"},"modified":"2018-07-17T14:39:26","modified_gmt":"2018-07-17T12:39:26","slug":"restarting-a-failed-transportable-tablespace-metadata-import","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/restarting-a-failed-transportable-tablespace-metadata-import\/","title":{"rendered":"Restarting a failed transportable tablespace metadata import"},"content":{"rendered":"<p>I&#8217;m currently working in a project to migrate a Datawarehouse-database from Solaris to Linux Intel (Endian-change). We do use the cross platform incremental backups method as described in My Oracle Support Note 1389592.1 for that.<br \/>\nI.e. incremental backups are applied to database files and during the migration the recovered datafiles are attached to the target database via the transportable tablespace method. When testing the transportable tablespace metadata import I got an error for a table:<\/p>\n<p><code><br \/>\nProcessing object type TRANSPORTABLE_EXPORT\/TABLE<br \/>\nORA-39083: Object type TABLE:\"DWHT\".\"TDWHTAB\" failed to create with error:<br \/>\nORA-01843: not a valid month<br \/>\nFailing sql is:<br \/>\nCREATE TABLE \"DWHT\".\"TDWHTAB\" (...,\"PROCESSING_TM\" DATE DEFAULT '01-01-0001' NOT NULL ENABLE,...<br \/>\n<\/code><\/p>\n<p>I.e. metadata of all tables in the tablespace were successfully imported except one. The reason for the error was a default-defintion of column &#8220;PROCESSING_TM&#8221; without a TO_DATE-casting. I.e. it relied on the NLS_DATE_FORMAT-setting. E.g.<\/p>\n<p><code><br \/>\nSQL&gt; create table t1 (\"PROCESSING_TM\" DATE DEFAULT '01-01-0001' NOT NULL ENABLE);<br \/>\ncreate table t1 (\"PROCESSING_TM\" DATE DEFAULT '01-01-0001' NOT NULL ENABLE)<br \/>\n&nbsp;                                              *<br \/>\nERROR at line 1:<br \/>\nORA-01843: not a valid month<br \/>\n&nbsp;<br \/>\nSQL&gt; alter session set nls_date_format='dd-mm-yyyy';<br \/>\n&nbsp;<br \/>\nSession altered.<br \/>\n&nbsp;<br \/>\nSQL&gt; create table t1 (\"PROCESSING_TM\" DATE DEFAULT '01-01-0001' NOT NULL ENABLE);<br \/>\n&nbsp;<br \/>\nTable created.<br \/>\n<\/code><\/p>\n<p>There are different possibilities on why a metadata import fails for specific tables (see e.g. My Oracle Support Note 1082116.1 for another reason). The question was: How to restart the import without going through the whole process of copying datafiles from the source-database again? As we imported the metadata through a network-link the tablespace on the source database and the tablespace on the target database were still set to &#8220;READ ONLY&#8221;.<\/p>\n<p>So first of all I fixed the error in the table definition on the source database:<\/p>\n<p><code><br \/>\nalter table \"DWHT\".\"TDWHTAB\" modify (\"PROCESSING_TM\" DATE DEFAULT TO_DATE('01-01-0001', 'DD-MM-YYYY'));<br \/>\n<\/code><\/p>\n<p>That was possible even having the associated tablespace of the table on READ ONLY as it is just a metadata update and does not touch the tablespace.<\/p>\n<p>On the target database I cleaned up the tablespace of the failed table metadata import:<\/p>\n<p><code><br \/>\ndrop tablespace DWH_DATA including contents;<br \/>\n<\/code><\/p>\n<p>It&#8217;s of course important to NOT specify &#8220;AND DATAFILES&#8221; when dropping the tablespace to avoid having to copy all files again.<\/p>\n<p>In my case I actually transported 146 tablespaces and modified the impdp-parameterfile xttplugin.par to contain only the single tablespace, which contained failing tables. Of course you have to drop and include all tablespaces, which have tables with dependencies between each other. In my case that was not an issue as my tables had no dependencies to tables in other tablespaces.<\/p>\n<p>Afterwards I could just restart my metadata-import with the single tablespace:<\/p>\n<p><code><br \/>\n$ cat xttplugin2.par<br \/>\ndirectory=DATA_PUMP_DIR<br \/>\nlogfile=tts_imp2.log<br \/>\nnetwork_link=ttslink<br \/>\ntransport_full_check=no<br \/>\ntransport_tablespaces=DWH_DATA<br \/>\ntransport_datafiles='\/u01\/DWH\/oradata\/DWH_DATA_001.dbf','\/u01\/DWH\/oradata\/DWH_DATA_002.dbf'<br \/>\n$ imdp parfile=.\/xttplugin2.par<br \/>\nPassword: \/ as sysdba<br \/>\n<\/code><\/p>\n<p>So to restart a failed transportable tablespace metadata import, just fix the root cause, drop the associated tablespace on the target database without dropping the datafiles and restart the import again. That becomes handy especially in cross platform incremental backup migration scenarios.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m currently working in a project to migrate a Datawarehouse-database from Solaris to Linux Intel (Endian-change). We do use the cross platform incremental backups method as described in My Oracle Support Note 1389592.1 for that. I.e. incremental backups are applied to database files and during the migration the recovered datafiles are attached to the target [&hellip;]<\/p>\n","protected":false},"author":35,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229,59],"tags":[1110,1403,96,940],"type_dbi":[],"class_list":["post-11456","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring","category-oracle","tag-cross-platform-migration","tag-impdp","tag-oracle","tag-transportable-tablespaces"],"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>Restarting a failed transportable tablespace metadata import - 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\/restarting-a-failed-transportable-tablespace-metadata-import\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Restarting a failed transportable tablespace metadata import\" \/>\n<meta property=\"og:description\" content=\"I&#8217;m currently working in a project to migrate a Datawarehouse-database from Solaris to Linux Intel (Endian-change). We do use the cross platform incremental backups method as described in My Oracle Support Note 1389592.1 for that. I.e. incremental backups are applied to database files and during the migration the recovered datafiles are attached to the target [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/restarting-a-failed-transportable-tablespace-metadata-import\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-17T12:39:26+00:00\" \/>\n<meta name=\"author\" content=\"Clemens Bleile\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ifgtxD2SrQ8r!YuXj\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Clemens Bleile\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 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\/restarting-a-failed-transportable-tablespace-metadata-import\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/restarting-a-failed-transportable-tablespace-metadata-import\/\"},\"author\":{\"name\":\"Clemens Bleile\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0ac04011f60f2e93c115358d0789c2da\"},\"headline\":\"Restarting a failed transportable tablespace metadata import\",\"datePublished\":\"2018-07-17T12:39:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/restarting-a-failed-transportable-tablespace-metadata-import\/\"},\"wordCount\":388,\"commentCount\":0,\"keywords\":[\"Cross Platform Migration\",\"impdp\",\"Oracle\",\"Transportable Tablespaces\"],\"articleSection\":[\"Database Administration &amp; Monitoring\",\"Oracle\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/restarting-a-failed-transportable-tablespace-metadata-import\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/restarting-a-failed-transportable-tablespace-metadata-import\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/restarting-a-failed-transportable-tablespace-metadata-import\/\",\"name\":\"Restarting a failed transportable tablespace metadata import - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2018-07-17T12:39:26+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0ac04011f60f2e93c115358d0789c2da\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/restarting-a-failed-transportable-tablespace-metadata-import\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/restarting-a-failed-transportable-tablespace-metadata-import\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/restarting-a-failed-transportable-tablespace-metadata-import\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Restarting a failed transportable tablespace metadata import\"}]},{\"@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\/0ac04011f60f2e93c115358d0789c2da\",\"name\":\"Clemens Bleile\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/1f596609fc67cb28ed714e7bccc81ed4cd73b8582a8148a490c77daeb2fde21a?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1f596609fc67cb28ed714e7bccc81ed4cd73b8582a8148a490c77daeb2fde21a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1f596609fc67cb28ed714e7bccc81ed4cd73b8582a8148a490c77daeb2fde21a?s=96&d=mm&r=g\",\"caption\":\"Clemens Bleile\"},\"description\":\"Clemens Bleile has more than 30 years of IT experience, thirteen in Oracle Support and fifteen in Oracle Consulting. He is specialized in Oracle Database Performance Tuning (SQL Tuning, DB Tuning) and developing an Oracle DB IT architecture (highly available, low-maintenance, cost efficient storage of data). He is an expert in problem analysis and resolution. Prior to joining dbi services, Clemens Bleile was Manager of the EMEA Database Performance team at the Oracle Global Customer Support Services. Clemens Bleile is Oracle Certified Professional 11g, 12c and Oracle Certified Expert for Performance Management and Tuning and holds a Master Degree, Business Information Systems from the Fachhochschule Furtwangen, Germany.\",\"sameAs\":[\"https:\/\/www.dbi-services.com\",\"https:\/\/x.com\/ifgtxD2SrQ8r!YuXj\"],\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/clemens-bleile\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Restarting a failed transportable tablespace metadata import - 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\/restarting-a-failed-transportable-tablespace-metadata-import\/","og_locale":"en_US","og_type":"article","og_title":"Restarting a failed transportable tablespace metadata import","og_description":"I&#8217;m currently working in a project to migrate a Datawarehouse-database from Solaris to Linux Intel (Endian-change). We do use the cross platform incremental backups method as described in My Oracle Support Note 1389592.1 for that. I.e. incremental backups are applied to database files and during the migration the recovered datafiles are attached to the target [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/restarting-a-failed-transportable-tablespace-metadata-import\/","og_site_name":"dbi Blog","article_published_time":"2018-07-17T12:39:26+00:00","author":"Clemens Bleile","twitter_card":"summary_large_image","twitter_creator":"@ifgtxD2SrQ8r!YuXj","twitter_misc":{"Written by":"Clemens Bleile","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/restarting-a-failed-transportable-tablespace-metadata-import\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/restarting-a-failed-transportable-tablespace-metadata-import\/"},"author":{"name":"Clemens Bleile","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0ac04011f60f2e93c115358d0789c2da"},"headline":"Restarting a failed transportable tablespace metadata import","datePublished":"2018-07-17T12:39:26+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/restarting-a-failed-transportable-tablespace-metadata-import\/"},"wordCount":388,"commentCount":0,"keywords":["Cross Platform Migration","impdp","Oracle","Transportable Tablespaces"],"articleSection":["Database Administration &amp; Monitoring","Oracle"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/restarting-a-failed-transportable-tablespace-metadata-import\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/restarting-a-failed-transportable-tablespace-metadata-import\/","url":"https:\/\/www.dbi-services.com\/blog\/restarting-a-failed-transportable-tablespace-metadata-import\/","name":"Restarting a failed transportable tablespace metadata import - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2018-07-17T12:39:26+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0ac04011f60f2e93c115358d0789c2da"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/restarting-a-failed-transportable-tablespace-metadata-import\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/restarting-a-failed-transportable-tablespace-metadata-import\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/restarting-a-failed-transportable-tablespace-metadata-import\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Restarting a failed transportable tablespace metadata import"}]},{"@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\/0ac04011f60f2e93c115358d0789c2da","name":"Clemens Bleile","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1f596609fc67cb28ed714e7bccc81ed4cd73b8582a8148a490c77daeb2fde21a?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1f596609fc67cb28ed714e7bccc81ed4cd73b8582a8148a490c77daeb2fde21a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1f596609fc67cb28ed714e7bccc81ed4cd73b8582a8148a490c77daeb2fde21a?s=96&d=mm&r=g","caption":"Clemens Bleile"},"description":"Clemens Bleile has more than 30 years of IT experience, thirteen in Oracle Support and fifteen in Oracle Consulting. He is specialized in Oracle Database Performance Tuning (SQL Tuning, DB Tuning) and developing an Oracle DB IT architecture (highly available, low-maintenance, cost efficient storage of data). He is an expert in problem analysis and resolution. Prior to joining dbi services, Clemens Bleile was Manager of the EMEA Database Performance team at the Oracle Global Customer Support Services. Clemens Bleile is Oracle Certified Professional 11g, 12c and Oracle Certified Expert for Performance Management and Tuning and holds a Master Degree, Business Information Systems from the Fachhochschule Furtwangen, Germany.","sameAs":["https:\/\/www.dbi-services.com","https:\/\/x.com\/ifgtxD2SrQ8r!YuXj"],"url":"https:\/\/www.dbi-services.com\/blog\/author\/clemens-bleile\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/11456","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\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=11456"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/11456\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=11456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=11456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=11456"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=11456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}