{"id":28731,"date":"2023-10-20T11:44:27","date_gmt":"2023-10-20T09:44:27","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=28731"},"modified":"2025-01-24T10:42:33","modified_gmt":"2025-01-24T09:42:33","slug":"how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch\/","title":{"rendered":"How can LC_* localisation environment variables can break Oracle datapatch"},"content":{"rendered":"\n<p>by Alexandre Nestor<\/p>\n\n\n\n<p>Recently I had to apply the Oracle 19.21 patch for a client.<\/p>\n\n\n\n<p>In my daily work I use a <strong>MacBook<\/strong> with <strong>iTerm<\/strong> as terminal.<\/p>\n\n\n\n<p>Quite often when connecting by ssh to remote servers <code>perl<\/code> raises warnings like: <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nperl: warning: Setting locale failed.\nperl: warning: Please check that your locale settings:\n\tLANGUAGE = (unset),\n\tLC_ALL = (unset),\n\tLC_CTYPE = &quot;UTF-8&quot;,\n\tLANG = &quot;en_US.UTF-8&quot;\n    are supported and installed on your system.\nperl: warning: Falling back to a fallback locale (&quot;en_US.UTF-8&quot;).\n<\/pre><\/div>\n\n\n<p>The only thing to do is to ignore these warnings or to set the <code>LC_CTYPE<\/code> and <code>LC_ALL<\/code> variables in <strong>iTerm<\/strong> before executing the ssh command to connect to the remote server:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nMacBook $&gt; export LC_CTYPE=en_US.UTF-8       \n                                                                       \nMacBook $&gt; export LC_ALL=en_US.UTF-8\n<\/pre><\/div>\n\n\n<p>I never thought that it could crash the oracle datapatch application.<\/p>\n\n\n\n<p>Here the traces:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\noracleservr $&gt;  $ORACLE_HOME\/OPatch\/datapatch -verbose\nperl: warning: Setting locale failed.\nperl: warning: Please check that your locale settings:\n\tLANGUAGE = (unset),\n\tLC_ALL = (unset),\n\tLC_CTYPE = &quot;UTF-8&quot;,\n\tLANG = &quot;en_US.UTF-8&quot;\n    are supported and installed on your system.\nperl: warning: Falling back to a fallback locale (&quot;en_US.UTF-8&quot;).\nSQL Patching tool version 19.21.0.0.0 Production on Fri Oct 20 09:59:36 2023\nCopyright (c) 2012, 2023, Oracle.  All rights reserved.\n\nLog file for this invocation: \/u00\/app\/oracle\/cfgtoollogs\/sqlpatch\/sqlpatch_22200_2023_10_20_09_59_36\/sqlpatch_invocation.log\n\nConnecting to database...OK\nGathering database info...done\nBootstrapping registry and package to current versions...done\nError: prereq checks failed!\nverify_queryable_inventory returned ORA-20001: Latest xml inventory is not loaded into table\nPrereq check failed, exiting without installing any patches.\n<\/pre><\/div>\n\n\n<p>The fix is pretty straightforward:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\noracleservr &gt; exit; \n\nMacBook&gt;  export LC_CTYPE=en_US.UTF-8     \n                                                                               \nMacBook&gt;  export LC_ALL=en_US.UTF-8\n\nMacBook&gt; ssh oracle@oracleservr\n\noracleservr&gt;  $ORACLE_HOME\/OPatch\/datapatch -verbose\nSQL Patching tool version 19.21.0.0.0 Production on Fri Oct 20 10:02:01 2023\nCopyright (c) 2012, 2023, Oracle.  All rights reserved.\n\nLog file for this invocation: \/u00\/app\/oracle\/cfgtoollogs\/sqlpatch\/sqlpatch_23107_2023_10_20_10_02_01\/sqlpatch_invocation.log\n\nConnecting to database...OK\nGathering database info...done\nBootstrapping registry and package to current versions...done\nDetermining current state...done\n\nCurrent state of interim SQL patches:\nInterim patch 32067171 (OJVM RELEASE UPDATE: 19.10.0.0.210119 (32067171)):\n  Binary registry: Installed\n  SQL registry: Applied successfully on 26-APR-21 06.13.04.866116 PM\n\nCurrent state of release update SQL patches:\n  Binary registry:\n    19.21.0.0.0 Release_Update 230930151951: Installed\n  SQL registry:\n    Applied 19.10.0.0.0 Release_Update 210108185017 successfully on 26-APR-21 06.13.04.862299 PM\n\nAdding patches to installation queue and performing prereq checks...done\nInstallation queue:\n  No interim patches need to be rolled back\n  Patch 35643107 (Database Release Update : 19.21.0.0.231017 (35643107)):\n    Apply from 19.10.0.0.0 Release_Update 210108185017 to 19.21.0.0.0 Release_Update 230930151951\n  No interim patches need to be applied\n\nInstalling patches...\nPatch installation complete.  Total patches installed: 1\n\nValidating logfiles...done\nPatch 35643107 apply: SUCCESS\n \nSQL Patching tool complete on Fri Oct 20 10:05:07 2023\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion <\/h2>\n\n\n\n<p>The error message <code>ORA-20001: Latest xml inventory is not loaded into table<\/code> is pretty confusing. As Oracle use perl for <code>datapatch<\/code> is better to check that the LC_* localisations settings variables environnement are set correctly. <\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ORA-20001] How can LC_* localisation environment  variables can break Oracle datapatch<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[198,59],"tags":[3121,3122,3120],"type_dbi":[],"class_list":["post-28731","post","type-post","status-publish","format-standard","hentry","category-database-management","category-oracle","tag-19-21","tag-macbook-lc_","tag-ora-20001"],"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>How can LC_* localisation environment variables can break Oracle datapatch - 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\/how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How can LC_* localisation environment variables can break Oracle datapatch\" \/>\n<meta property=\"og:description\" content=\"[ORA-20001] How can LC_* localisation environment variables can break Oracle datapatch\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-20T09:44:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-01-24T09:42:33+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=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"How can LC_* localisation environment variables can break Oracle datapatch\",\"datePublished\":\"2023-10-20T09:44:27+00:00\",\"dateModified\":\"2025-01-24T09:42:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch\/\"},\"wordCount\":122,\"commentCount\":0,\"keywords\":[\"19.21\",\"MacBook LC_\",\"ORA-20001\"],\"articleSection\":[\"Database management\",\"Oracle\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch\/\",\"name\":\"How can LC_* localisation environment variables can break Oracle datapatch - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2023-10-20T09:44:27+00:00\",\"dateModified\":\"2025-01-24T09:42:33+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How can LC_* localisation environment variables can break Oracle datapatch\"}]},{\"@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":"How can LC_* localisation environment variables can break Oracle datapatch - 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\/how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch\/","og_locale":"en_US","og_type":"article","og_title":"How can LC_* localisation environment variables can break Oracle datapatch","og_description":"[ORA-20001] How can LC_* localisation environment variables can break Oracle datapatch","og_url":"https:\/\/www.dbi-services.com\/blog\/how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch\/","og_site_name":"dbi Blog","article_published_time":"2023-10-20T09:44:27+00:00","article_modified_time":"2025-01-24T09:42:33+00:00","author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"How can LC_* localisation environment variables can break Oracle datapatch","datePublished":"2023-10-20T09:44:27+00:00","dateModified":"2025-01-24T09:42:33+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch\/"},"wordCount":122,"commentCount":0,"keywords":["19.21","MacBook LC_","ORA-20001"],"articleSection":["Database management","Oracle"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch\/","url":"https:\/\/www.dbi-services.com\/blog\/how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch\/","name":"How can LC_* localisation environment variables can break Oracle datapatch - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2023-10-20T09:44:27+00:00","dateModified":"2025-01-24T09:42:33+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/how-can-lc_-localisation-environment-variables-can-break-oracle-datapatch\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How can LC_* localisation environment variables can break Oracle datapatch"}]},{"@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\/28731","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=28731"}],"version-history":[{"count":7,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/28731\/revisions"}],"predecessor-version":[{"id":36870,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/28731\/revisions\/36870"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=28731"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=28731"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=28731"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=28731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}