{"id":6420,"date":"2015-12-04T07:44:26","date_gmt":"2015-12-04T06:44:26","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/how-to-read-xml-database-alert-log\/"},"modified":"2015-12-04T07:44:26","modified_gmt":"2015-12-04T06:44:26","slug":"how-to-read-xml-database-alert-log","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/how-to-read-xml-database-alert-log\/","title":{"rendered":"How to read XML database alert log?"},"content":{"rendered":"<p>Since Oracle 11g, Oracle maintains two copies of the database&#8217;s alertlog in ADR: a flat text file in the sub-directory trace and an XML like in the folder alert.\u00a0I had a case recently at a customer where the log.xml was moved to another place and compressed for archiving reason. As the regular text file was not containing old data, the goal was to exploit the archived XML -like file.<\/p>\n<p>When the file is still located in its normal location, it&#8217;s very easy to read it using the command &#8220;show alert&#8221; in ADRCI.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">oracle@vmtestol6:\/home\/oracle\/ [DB121] adrci\nADRCI: Release 12.1.0.2.0 - Production on Thu Dec 3 16:20:31 2015\nCopyright (c) 1982, 2014, Oracle and\/or its affiliates.  All rights reserved.\n\nADR base = \"\/u00\/app\/oracle\"\nadrci&gt; show homes\nADR Homes: \ndiag\/rdbms\/db121_site1\/DB121\ndiag\/tnslsnr\/vmtestol6\/listener\nadrci&gt; set home diag\/rdbms\/db121_site1\/DB121\nadrci&gt; show alert\n\nADR Home = \/u00\/app\/oracle\/diag\/rdbms\/db121_site1\/DB121:\n*************************************************************\nOutput the results to file: \/tmp\/alert_3268_13985_DB121_1.ado<\/pre>\n<p>So ADRCI is able to parse all the &lt;msg&gt; tag and convert it into something readable, there is no need to find a parser.<\/p>\n<p>To avoid loosing information by replacing the current file, it&#8217;s not possible to put back the file into its original location.<br \/>\nThe trick is to create a temporary diagnostic directory and use ADRCI to view the alertlog.<br \/>\nThere is no need to use the same DB name but it&#8217;s important to re-create a diagnostic folder hierarchy otherwise you&#8217;ll get an error when trying to set the ADR base.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">oracle@vmtestol6:\/tmp\/ [DB121] adrci\nADRCI: Release 12.1.0.2.0 - Production on Thu Dec 3 22:21:52 2015\nCopyright (c) 1982, 2014, Oracle and\/or its affiliates.  All rights reserved.\n\nADR base = \"\/u00\/app\/oracle\"\nadrci&gt; set base \/tmp\nDIA-48447: The input path [\/tmp] does not contain any ADR homes<\/pre>\n<p>Let&#8217;s create the hierarchy expected by ADRCI:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">oracle@vmtestol6:\/tmp\/ [DB121] ls -l log_20151203.zip\n-rw-r--r--. 1 oracle oinstall 162357  3 d\u00e9c.  16:28 log_20151203.zip\noracle@vmtestol6:\/tmp\/ [DB121] mkdir -p diag\/rdbms\/db1\/db1\/alert\noracle@vmtestol6:\/tmp\/ [DB121] unzip log_20151203.zip -d diag\/rdbms\/db1\/db1\/alert\nArchive:  log_20151203.zip\n  inflating: diag\/rdbms\/db1\/db1\/alert\/log.xml  \noracle@vmtestol6:\/tmp\/ [DB121] adrci\nADRCI: Release 12.1.0.2.0 - Production on Thu Dec 3 17:04:27 2015\nCopyright (c) 1982, 2014, Oracle and\/or its affiliates.  All rights reserved.\n\nADR base = \"\/tmp\"\nadrci&gt; show alert\n...\n2015-12-02 16:00:26.469000 +01:00\nInstance shutdown complete\n:w alert_DB121.log\n\"alert_DB121.log\" [New] 7676L, 321717C written<\/pre>\n<p>Then it&#8217;s easy to save the file back to a flat text format! ADRCI also allows to run some commands to look for error and so on&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since Oracle 11g, Oracle maintains two copies of the database&#8217;s alertlog in ADR: a flat text file in the sub-directory trace and an XML like in the folder alert.\u00a0I had a case recently at a customer where the log.xml was moved to another place and compressed for archiving reason. As the regular text file was [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229],"tags":[280,23,96],"type_dbi":[],"class_list":["post-6420","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring","tag-database","tag-dba","tag-oracle"],"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 to read XML database alert log? - 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-to-read-xml-database-alert-log\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to read XML database alert log?\" \/>\n<meta property=\"og:description\" content=\"Since Oracle 11g, Oracle maintains two copies of the database&#8217;s alertlog in ADR: a flat text file in the sub-directory trace and an XML like in the folder alert.\u00a0I had a case recently at a customer where the log.xml was moved to another place and compressed for archiving reason. As the regular text file was [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/how-to-read-xml-database-alert-log\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2015-12-04T06:44:26+00:00\" \/>\n<meta name=\"author\" content=\"Nicolas Jardot\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nicolas Jardot\" \/>\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\/how-to-read-xml-database-alert-log\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-to-read-xml-database-alert-log\/\"},\"author\":{\"name\":\"Nicolas Jardot\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0aa30f52275a132e9cc2c387708f84ed\"},\"headline\":\"How to read XML database alert log?\",\"datePublished\":\"2015-12-04T06:44:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-to-read-xml-database-alert-log\/\"},\"wordCount\":236,\"commentCount\":0,\"keywords\":[\"database\",\"DBA\",\"Oracle\"],\"articleSection\":[\"Database Administration &amp; Monitoring\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/how-to-read-xml-database-alert-log\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-to-read-xml-database-alert-log\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/how-to-read-xml-database-alert-log\/\",\"name\":\"How to read XML database alert log? - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2015-12-04T06:44:26+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0aa30f52275a132e9cc2c387708f84ed\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-to-read-xml-database-alert-log\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/how-to-read-xml-database-alert-log\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-to-read-xml-database-alert-log\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to read XML database alert log?\"}]},{\"@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\/0aa30f52275a132e9cc2c387708f84ed\",\"name\":\"Nicolas Jardot\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/112c023c253239221e61a24d59db49d57b354e10da6e7c074cfff50e1b5a6dd8?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/112c023c253239221e61a24d59db49d57b354e10da6e7c074cfff50e1b5a6dd8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/112c023c253239221e61a24d59db49d57b354e10da6e7c074cfff50e1b5a6dd8?s=96&d=mm&r=g\",\"caption\":\"Nicolas Jardot\"},\"description\":\"Nicolas Jardot is a senior consultant with more than nine years of experience in Oracle database infrastructure management and optimization. In addition to standard operations, he is specialized in the performance optimization and tuning of Oracle databases. He also has a strong knowledge of SQL language and has developed several PL\/SQL packages to simplify the administration of database applications. He also maintains the DMK_SQL package of dbi services\u2019 Database Management Kit. Nicolas is Oracle Certified Professional 11g\/12c and Oracle Certified Expert Performance Management and Tuning 12c and holds speeches around Oracle technologies in various conferences including Oracle OpenWorld and UKOUG. Over time, Nicolas has become increasingly interested in Cloud and automation technologies. He has been working for over two years on building and maintaining applications in AWS and operates a CI\/CD pipeline to provision and configure the infrastructure. Nicolas is also certified AWS Solution Architect Professional. Prior to dbi services, Nicolas Jardot was C++ developer on an application virtualization solution, which gave him a solid experience in virtualization and centralization of applications. Nicolas Jardot holds an Engineer\u2019s Degree in Computer Science from the University of Technology of Belfort-Montb\u00e9liard (F). His branch-related experience covers Pharma, Public Sector, Health, Real Estate, Automotive, etc.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/nicolas-jardot-762b9535\/\"],\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/nicolas-jardot\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to read XML database alert log? - 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-to-read-xml-database-alert-log\/","og_locale":"en_US","og_type":"article","og_title":"How to read XML database alert log?","og_description":"Since Oracle 11g, Oracle maintains two copies of the database&#8217;s alertlog in ADR: a flat text file in the sub-directory trace and an XML like in the folder alert.\u00a0I had a case recently at a customer where the log.xml was moved to another place and compressed for archiving reason. As the regular text file was [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/how-to-read-xml-database-alert-log\/","og_site_name":"dbi Blog","article_published_time":"2015-12-04T06:44:26+00:00","author":"Nicolas Jardot","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Nicolas Jardot","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/how-to-read-xml-database-alert-log\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/how-to-read-xml-database-alert-log\/"},"author":{"name":"Nicolas Jardot","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0aa30f52275a132e9cc2c387708f84ed"},"headline":"How to read XML database alert log?","datePublished":"2015-12-04T06:44:26+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/how-to-read-xml-database-alert-log\/"},"wordCount":236,"commentCount":0,"keywords":["database","DBA","Oracle"],"articleSection":["Database Administration &amp; Monitoring"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/how-to-read-xml-database-alert-log\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/how-to-read-xml-database-alert-log\/","url":"https:\/\/www.dbi-services.com\/blog\/how-to-read-xml-database-alert-log\/","name":"How to read XML database alert log? - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2015-12-04T06:44:26+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0aa30f52275a132e9cc2c387708f84ed"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/how-to-read-xml-database-alert-log\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/how-to-read-xml-database-alert-log\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/how-to-read-xml-database-alert-log\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to read XML database alert log?"}]},{"@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\/0aa30f52275a132e9cc2c387708f84ed","name":"Nicolas Jardot","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/112c023c253239221e61a24d59db49d57b354e10da6e7c074cfff50e1b5a6dd8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/112c023c253239221e61a24d59db49d57b354e10da6e7c074cfff50e1b5a6dd8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/112c023c253239221e61a24d59db49d57b354e10da6e7c074cfff50e1b5a6dd8?s=96&d=mm&r=g","caption":"Nicolas Jardot"},"description":"Nicolas Jardot is a senior consultant with more than nine years of experience in Oracle database infrastructure management and optimization. In addition to standard operations, he is specialized in the performance optimization and tuning of Oracle databases. He also has a strong knowledge of SQL language and has developed several PL\/SQL packages to simplify the administration of database applications. He also maintains the DMK_SQL package of dbi services\u2019 Database Management Kit. Nicolas is Oracle Certified Professional 11g\/12c and Oracle Certified Expert Performance Management and Tuning 12c and holds speeches around Oracle technologies in various conferences including Oracle OpenWorld and UKOUG. Over time, Nicolas has become increasingly interested in Cloud and automation technologies. He has been working for over two years on building and maintaining applications in AWS and operates a CI\/CD pipeline to provision and configure the infrastructure. Nicolas is also certified AWS Solution Architect Professional. Prior to dbi services, Nicolas Jardot was C++ developer on an application virtualization solution, which gave him a solid experience in virtualization and centralization of applications. Nicolas Jardot holds an Engineer\u2019s Degree in Computer Science from the University of Technology of Belfort-Montb\u00e9liard (F). His branch-related experience covers Pharma, Public Sector, Health, Real Estate, Automotive, etc.","sameAs":["https:\/\/www.linkedin.com\/in\/nicolas-jardot-762b9535\/"],"url":"https:\/\/www.dbi-services.com\/blog\/author\/nicolas-jardot\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/6420","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\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=6420"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/6420\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=6420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=6420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=6420"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=6420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}