{"id":4106,"date":"2022-01-24T16:29:02","date_gmt":"2022-01-24T16:29:02","guid":{"rendered":"https:\/\/nenadnoveljic.com\/blog\/?p=4106"},"modified":"2022-01-31T16:28:03","modified_gmt":"2022-01-31T16:28:03","slug":"compilation-error-in-19-14-datapatch","status":"publish","type":"post","link":"https:\/\/nenadnoveljic.com\/blog\/compilation-error-in-19-14-datapatch\/","title":{"rendered":"Compilation Error in 19.14 datapatch"},"content":{"rendered":"<p>We were migrating a non-cdb 19.7 database from Solaris x86 to 19.14 pdb on Linux. datapatch threw the compilation error while executing prvthadoop.plb:<\/p>\n<pre><code>Validating logfiles...done\nPatch 33515361 apply (pdb DB11): WITH ERRORS\n  logfile: \/u00\/oracle\/orabase\/cfgtoollogs\/sqlpatch\/33515361\/24589353\/33515361_apply_DB1C_DB11_2022Jan24_12_28_40.log (errors)\n  -&gt; Error at line 274912: script rdbms\/admin\/prvthadoop.plb\n      - Warning: Package Body created with compilation errors.<\/code><\/pre>\n<p>prvthadoop.plb is a wrapper for prvthadoop1:<\/p>\n<pre><code>:execfile := 'prvthadoop1.plb';<\/code><\/pre>\n<p>prvthadoop1 creates the DBMS_HADOOP_INTERNAL package:<\/p>\n<pre><code>CREATE OR REPLACE PACKAGE BODY DBMS_HADOOP_INTERNAL wrapped<\/code><\/pre>\n<p>The compilation of DBMS_HADOOP_INTERNAL failed because a table or view was missing:<\/p>\n<pre><code>select name, text from dba_errors\n\nNAME\n--------------------------------------------------------------------------------\nTEXT\n--------------------------------------------------------------------------------\nDBMS_HADOOP_INTERNAL\nPL\/SQL: ORA-00942: table or view does not exist<\/code><\/pre>\n<p>dba_errors doesn&#8217;t show which tables or views are missing, just the program line. But this information is to no avail because the package body is wrapped.<\/p>\n<p>I queried dba_dependencies on a healthy database to see which objects are referenced in DBMS_HADOOP_INTERNAL:<\/p>\n<pre><code>select referenced_name from dba_dependencies where name = 'DBMS_HADOOP_INTERNAL'\n\nREFERENCED_NAME\n--------------------------------------------------------------------------------\n...\nDBA_HIVE_TABLES\nDBA_HIVE_COLUMNS\nDBA_HIVE_TAB_PARTITIONS\nDBA_HIVE_PART_KEY_COLUMNS\n...<\/code><\/pre>\n<p>The referenced DBA_HIVE* views exist on Linux:<\/p>\n<pre><code>SQL&gt; select object_name from dba_objects where object_name like 'DBA_HIVE%' ;\n\nOBJECT_NAME\n--------------------------------------------------------------------------------\nDBA_HIVE_TABLES\nDBA_HIVE_TABLES\nDBA_HIVE_COLUMNS\nDBA_HIVE_COLUMNS\nDBA_HIVE_DATABASES\nDBA_HIVE_DATABASES\nDBA_HIVE_TAB_PARTITIONS\nDBA_HIVE_TAB_PARTITIONS\nDBA_HIVE_PART_KEY_COLUMNS\nDBA_HIVE_PART_KEY_COLUMNS<\/code><\/pre>\n<p>but are missing on Solaris x86:<\/p>\n<pre><code>select object_name from dba_objects where object_name like 'DBA_HIVE%' ;\n\nno rows selected<\/code><\/pre>\n<p>These views are created by the script cathive1:<\/p>\n<pre><code>grep -il DBA_HIVE *\n...\ncathive1.sql\ndbmshadp1.sql\n...<\/code><\/pre>\n<p>cathive1.sql is called by cathive.sql only on Linux (platform_id=13) and Solaris SPARC (platform_id=2), but not on Solaris x86 (platform_id=20):<\/p>\n<pre><code>IF (:pfid = 13 OR :pfid = 2) THEN\n  :execfile := 'cathive1.sql';\nELSE\n  :execfile := 'nothing.sql';\nEND IF;<\/code><\/pre>\n<pre><code>select platform_id, platform_name from v$transportable_platform where platform_id in (13,2,20);\n\nPLATFORM_ID\n-----------\nPLATFORM_NAME\n--------------------------------------------------------------------------------\n          2\nSolaris[tm] OE (64-bit)\n\n         13\nLinux x86 64-bit\n\n         20\nSolaris Operating System (x86-64)<\/code><\/pre>\n<p><b>Simply put, datapatch on Linux expect Hadoop objects, but they won&#8217;t be there if the database was migrated from another platform.<\/b><\/p>\n<h1>Workaround<\/h1>\n<p>You can first migrate to 19.13 PDB on Linux and than apply the 19.14 RU.<\/p>\n<p>I also tried the following unsupported way: created the Hadoop objects on Solaris x86 (in the lab) prior to migrating to 19.14 on Linux.<\/p>\n<pre><code>@?\/rdbms\/admin\/dbmshadp1\n@?\/rdbms\/admin\/cathive1\n@?\/rdbms\/admin\/prvthadoop1.plb<\/code><\/pre>\n<p>datapatch ran without errors. You&#8217;d need to clarify with Oracle support before using it in the production.<\/p>\n<h1>Update January 31, 2022<\/h1>\n<p>Oracle Support confirmed the workaround with creating the views on the source database.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>datapatch is failing when migrating from Solaris to Linux  <a href=\"https:\/\/nenadnoveljic.com\/blog\/compilation-error-in-19-14-datapatch\/\" class=\"more-link\">Continue Reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[36,48,5],"tags":[],"class_list":["post-4106","post","type-post","status-publish","format-standard","hentry","category-19c","category-datapatch","category-oracle"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Compilation Error in 19.14 datapatch - All-round Database Topics<\/title>\n<meta name=\"description\" content=\"datapatch is failing when migrating from Solaris to Linux\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/nenadnoveljic.com\/blog\/compilation-error-in-19-14-datapatch\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Compilation Error in 19.14 datapatch - All-round Database Topics\" \/>\n<meta property=\"og:description\" content=\"datapatch is failing when migrating from Solaris to Linux\" \/>\n<meta property=\"og:url\" content=\"https:\/\/nenadnoveljic.com\/blog\/compilation-error-in-19-14-datapatch\/\" \/>\n<meta property=\"og:site_name\" content=\"All-round Database Topics\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-24T16:29:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-01-31T16:28:03+00:00\" \/>\n<meta name=\"author\" content=\"Nenad Noveljic\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@NenadNoveljic\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nenad Noveljic\" \/>\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:\\\/\\\/nenadnoveljic.com\\\/blog\\\/compilation-error-in-19-14-datapatch\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/compilation-error-in-19-14-datapatch\\\/\"},\"author\":{\"name\":\"Nenad Noveljic\",\"@id\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/#\\\/schema\\\/person\\\/51458d9dd86dbbdd19f5add451d44efa\"},\"headline\":\"Compilation Error in 19.14 datapatch\",\"datePublished\":\"2022-01-24T16:29:02+00:00\",\"dateModified\":\"2022-01-31T16:28:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/compilation-error-in-19-14-datapatch\\\/\"},\"wordCount\":238,\"commentCount\":1,\"articleSection\":[\"19c\",\"datapatch\",\"Oracle\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/compilation-error-in-19-14-datapatch\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/compilation-error-in-19-14-datapatch\\\/\",\"url\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/compilation-error-in-19-14-datapatch\\\/\",\"name\":\"Compilation Error in 19.14 datapatch - All-round Database Topics\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/#website\"},\"datePublished\":\"2022-01-24T16:29:02+00:00\",\"dateModified\":\"2022-01-31T16:28:03+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/#\\\/schema\\\/person\\\/51458d9dd86dbbdd19f5add451d44efa\"},\"description\":\"datapatch is failing when migrating from Solaris to Linux\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/compilation-error-in-19-14-datapatch\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/compilation-error-in-19-14-datapatch\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/compilation-error-in-19-14-datapatch\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Compilation Error in 19.14 datapatch\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/\",\"name\":\"All-round Database Topics\",\"description\":\"Nenad Noveljic\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/#\\\/schema\\\/person\\\/51458d9dd86dbbdd19f5add451d44efa\",\"name\":\"Nenad Noveljic\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a97b796613ea48ec8a7b79c8ffe1c685dcffc920c68121f6238d5caab5070670?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a97b796613ea48ec8a7b79c8ffe1c685dcffc920c68121f6238d5caab5070670?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a97b796613ea48ec8a7b79c8ffe1c685dcffc920c68121f6238d5caab5070670?s=96&d=mm&r=g\",\"caption\":\"Nenad Noveljic\"},\"sameAs\":[\"nenad-noveljic-9b746a6\",\"https:\\\/\\\/x.com\\\/NenadNoveljic\"],\"url\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/author\\\/nenad\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Compilation Error in 19.14 datapatch - All-round Database Topics","description":"datapatch is failing when migrating from Solaris to Linux","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:\/\/nenadnoveljic.com\/blog\/compilation-error-in-19-14-datapatch\/","og_locale":"en_US","og_type":"article","og_title":"Compilation Error in 19.14 datapatch - All-round Database Topics","og_description":"datapatch is failing when migrating from Solaris to Linux","og_url":"https:\/\/nenadnoveljic.com\/blog\/compilation-error-in-19-14-datapatch\/","og_site_name":"All-round Database Topics","article_published_time":"2022-01-24T16:29:02+00:00","article_modified_time":"2022-01-31T16:28:03+00:00","author":"Nenad Noveljic","twitter_card":"summary_large_image","twitter_creator":"@NenadNoveljic","twitter_misc":{"Written by":"Nenad Noveljic","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/nenadnoveljic.com\/blog\/compilation-error-in-19-14-datapatch\/#article","isPartOf":{"@id":"https:\/\/nenadnoveljic.com\/blog\/compilation-error-in-19-14-datapatch\/"},"author":{"name":"Nenad Noveljic","@id":"https:\/\/nenadnoveljic.com\/blog\/#\/schema\/person\/51458d9dd86dbbdd19f5add451d44efa"},"headline":"Compilation Error in 19.14 datapatch","datePublished":"2022-01-24T16:29:02+00:00","dateModified":"2022-01-31T16:28:03+00:00","mainEntityOfPage":{"@id":"https:\/\/nenadnoveljic.com\/blog\/compilation-error-in-19-14-datapatch\/"},"wordCount":238,"commentCount":1,"articleSection":["19c","datapatch","Oracle"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/nenadnoveljic.com\/blog\/compilation-error-in-19-14-datapatch\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/nenadnoveljic.com\/blog\/compilation-error-in-19-14-datapatch\/","url":"https:\/\/nenadnoveljic.com\/blog\/compilation-error-in-19-14-datapatch\/","name":"Compilation Error in 19.14 datapatch - All-round Database Topics","isPartOf":{"@id":"https:\/\/nenadnoveljic.com\/blog\/#website"},"datePublished":"2022-01-24T16:29:02+00:00","dateModified":"2022-01-31T16:28:03+00:00","author":{"@id":"https:\/\/nenadnoveljic.com\/blog\/#\/schema\/person\/51458d9dd86dbbdd19f5add451d44efa"},"description":"datapatch is failing when migrating from Solaris to Linux","breadcrumb":{"@id":"https:\/\/nenadnoveljic.com\/blog\/compilation-error-in-19-14-datapatch\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/nenadnoveljic.com\/blog\/compilation-error-in-19-14-datapatch\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/nenadnoveljic.com\/blog\/compilation-error-in-19-14-datapatch\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/nenadnoveljic.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Compilation Error in 19.14 datapatch"}]},{"@type":"WebSite","@id":"https:\/\/nenadnoveljic.com\/blog\/#website","url":"https:\/\/nenadnoveljic.com\/blog\/","name":"All-round Database Topics","description":"Nenad Noveljic","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/nenadnoveljic.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/nenadnoveljic.com\/blog\/#\/schema\/person\/51458d9dd86dbbdd19f5add451d44efa","name":"Nenad Noveljic","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/a97b796613ea48ec8a7b79c8ffe1c685dcffc920c68121f6238d5caab5070670?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a97b796613ea48ec8a7b79c8ffe1c685dcffc920c68121f6238d5caab5070670?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a97b796613ea48ec8a7b79c8ffe1c685dcffc920c68121f6238d5caab5070670?s=96&d=mm&r=g","caption":"Nenad Noveljic"},"sameAs":["nenad-noveljic-9b746a6","https:\/\/x.com\/NenadNoveljic"],"url":"https:\/\/nenadnoveljic.com\/blog\/author\/nenad\/"}]}},"_links":{"self":[{"href":"https:\/\/nenadnoveljic.com\/blog\/wp-json\/wp\/v2\/posts\/4106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nenadnoveljic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nenadnoveljic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nenadnoveljic.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nenadnoveljic.com\/blog\/wp-json\/wp\/v2\/comments?post=4106"}],"version-history":[{"count":1,"href":"https:\/\/nenadnoveljic.com\/blog\/wp-json\/wp\/v2\/posts\/4106\/revisions"}],"predecessor-version":[{"id":4126,"href":"https:\/\/nenadnoveljic.com\/blog\/wp-json\/wp\/v2\/posts\/4106\/revisions\/4126"}],"wp:attachment":[{"href":"https:\/\/nenadnoveljic.com\/blog\/wp-json\/wp\/v2\/media?parent=4106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nenadnoveljic.com\/blog\/wp-json\/wp\/v2\/categories?post=4106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nenadnoveljic.com\/blog\/wp-json\/wp\/v2\/tags?post=4106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}