<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-1375587508974804970</atom:id><lastBuildDate>Sun, 29 Nov 2026 13:26:00 +0000</lastBuildDate><category>Core DBA</category><category>Must Read</category><category>PostgreSQL</category><category>Tuning</category><category>Frequently Asked</category><category>RMAN</category><category>Interview Questions</category><category>DataGuard</category><category>ASM</category><category>Datapump</category><category>UNIX</category><category>RAC</category><category>26ai</category><category>MySQL</category><category>Goldengate</category><category>Patching</category><category>19c</category><category>23ai</category><category>AI</category><category>Auditing</category><category>Exam Prep</category><category>Logminer</category><category>MongoDB</category><category>Tricks</category><category>Upgradation</category><title>Learn DBA : A Life Long Learning Experience</title><description>Sharing knowledge is the ultimate key to gaining knowledge.. &lt;br&gt;&#xa; &lt;br&gt;&#xa;&#xa;The only two things that stay with you for life &#xa;are you &amp;amp; your knowledge !&#xa; &lt;br&gt; &lt;br&gt;&#xa;&lt;br&gt; &lt;br&gt; &#xa;Live while you can! &lt;br&gt; &#xa;                                    Teach &amp;amp; inspire while you could &amp;amp; &lt;br&gt; &#xa;                                                                  Smile while you have the teeth.. 😉&#xa;&#xa;&lt;br&gt;&#xa;&lt;br&gt;&#xa;</description><link>https://oracle-dba-help.blogspot.com/</link><managingEditor>noreply@blogger.com (Nikhil Kotak)</managingEditor><generator>Blogger</generator><openSearch:totalResults>420</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-5856772829884793474</guid><pubDate>Sun, 29 Nov 2026 13:26:00 +0000</pubDate><atom:updated>2026-11-29T21:26:00.217+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">RAC</category><title>Oracle RAC Startup Sequence: From Boot to Service Ready</title><description>&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;After a RAC server reboot, seeing the operating system back online does not mean the database is ready for application traffic. Oracle Clusterware still has to rebuild the node&#39;s cluster membership, access shared storage, start and monitor resources, bring database instances online, register services, and restore client connectivity.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A sequence such as &lt;code style=&quot;font-family: courier;&quot;&gt;OS → OHASD → CSSD → CRSD → ASM → Listener → Database → Services&lt;/code&gt; is useful for remembering the major components, but it should not be treated as a rigid startup script. RAC startup is better understood as a dependency-driven recovery process where Clusterware determines which resources can start, which must wait, and which can progress in parallel.&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Why This Matters During a RAC Startup Problem&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This distinction becomes important when a server is available but the RAC database does not return automatically. If we immediately focus on the database alert log or repeatedly run &lt;code style=&quot;font-family: courier;&quot;&gt;srvctl start database&lt;/code&gt;, we may be troubleshooting several layers above the actual failure.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For example, the database will not start successfully if the node has not established cluster membership, the required ASM disk groups are unavailable, OCR cannot be accessed, or an underlying Clusterware resource remains unhealthy.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The better production approach is simple: identify the first dependency layer that did not recover, then troubleshoot upward from there.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;A RAC Startup Model&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle describes Clusterware using a lower stack anchored by Oracle High Availability Services and an upper resource-management stack anchored by Cluster Ready Services. From a DBA troubleshooting perspective, the following flow is more useful than memorizing an exact daemon startup order.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjLJdV0xImfqwxojj5dS1KxZZdGKrK4U-5yhkGyx0pCHB5m3neqPAQvlH05Cv6qkS2LKH_iird9U91_OnvhSL6kQMHiw_LTl03ru4uZEC613U-WhSk6Mo32FTeOPFCbZCpCSaO74Wsb-D-uLHZCg51nmGnmVzFg38cxcDNDVCfj7b3-6TIxuXTGg_VfVDM&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;838&quot; data-original-width=&quot;1500&quot; height=&quot;493&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjLJdV0xImfqwxojj5dS1KxZZdGKrK4U-5yhkGyx0pCHB5m3neqPAQvlH05Cv6qkS2LKH_iird9U91_OnvhSL6kQMHiw_LTl03ru4uZEC613U-WhSk6Mo32FTeOPFCbZCpCSaO74Wsb-D-uLHZCg51nmGnmVzFg38cxcDNDVCfj7b3-6TIxuXTGg_VfVDM=w881-h493&quot; width=&quot;881&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The diagram is intentionally a troubleshooting model rather than an exact process timeline. Some components have hard dependencies, some have weak dependencies, and several resources may be started concurrently by Clusterware.&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Add Blogger image here: Oracle RAC Startup Dependency Flow - landscape orientation--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;1. OHASD: The Local Clusterware Starting Point&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Once the operating system reaches the required initialization stage, Oracle High Availability Services Daemon, or &lt;code style=&quot;font-family: courier;&quot;&gt;OHASD&lt;/code&gt;, provides the foundation for the local Clusterware stack.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;One important component at this stage is the Oracle Local Registry, or &lt;code style=&quot;font-family: courier;&quot;&gt;OLR&lt;/code&gt;. OLR is maintained locally on each cluster node and contains information required during the early Clusterware bootstrap.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This is different from OCR. OCR contains cluster-wide resource configuration, while OLR provides node-local Clusterware information required before the complete cluster stack is available.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;If OHASD itself is unhealthy after reboot, there is little value in beginning with the database alert log. The database is only a higher-level Clusterware resource at this point.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;2. CSS: Can the Node Safely Join the Cluster?&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Cluster Synchronization Services, represented by &lt;code style=&quot;font-family: courier;&quot;&gt;OCSSD&lt;/code&gt;, establishes and maintains cluster membership. Before higher-level RAC resources can operate normally, the node must have a consistent view of the cluster and participate safely in membership decisions.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Voting files are fundamental at this layer. Problems involving voting disk accessibility, private interconnect communication, shared storage visibility, node membership, or fencing can prevent CSS from becoming healthy.&lt;/p&gt;

&lt;ul&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Voting file accessibility&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Private interconnect communication&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Shared storage visibility&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Node membership problems&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Eviction or fencing conditions&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;If CSS cannot establish healthy cluster membership, expecting CRSD, RAC instances, or database services to become available is premature.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;3. ASM Is Not Simply &quot;After CRSD&quot;&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;One RAC startup explanation I would avoid is the simplified sequence &lt;code style=&quot;font-family: courier;&quot;&gt;CSSD → CRSD → ASM&lt;/code&gt;. It gives the impression that ASM always waits until CRSD is completely available, which is not a good representation of Clusterware bootstrap.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle Clusterware agents controlled through the lower stack can participate in bringing ASM online while the cluster stack itself is being established. This becomes particularly important when OCR or voting files reside inside ASM disk groups.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;From a DBA perspective, the key point is that Clusterware and ASM can have interdependent bootstrap requirements. ASM should therefore be considered part of the infrastructure required to make shared cluster configuration and database storage available, rather than merely another database resource started near the end.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For the RAC database itself, the disk groups containing control files, data files, redo logs, SPFILE, and other required files obviously have to be mounted before instance startup can progress successfully.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;4. CRSD and OCR: Cluster Resource Management&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Once the upper Clusterware stack becomes available, &lt;code style=&quot;font-family: courier;&quot;&gt;CRSD&lt;/code&gt; becomes the central resource-management process. It uses cluster configuration stored in OCR to manage resources toward their configured target states.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This includes activities such as:&lt;/p&gt;

&lt;ul&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Starting and stopping resources&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Monitoring resource health&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Restarting resources after failures&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Relocating resources between nodes&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Evaluating resource dependencies&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The most important word here is &lt;strong&gt;dependency&lt;/strong&gt;. Oracle Clusterware resources can have hard, weak, pull-up, and other dependency relationships. Clusterware therefore does not simply execute a fixed list of resources one at a time.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;5. Network Resources, VIPs and Listeners&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Once resource management is available, Clusterware can bring network-related resources toward their configured state. Depending on the environment, this includes the public network, node VIPs, SCAN VIPs, SCAN listeners, and local listeners.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A SCAN listener depends on its corresponding SCAN VIP because the listener has to bind to a usable network address. Client connections reaching a SCAN listener can then be redirected toward an appropriate local listener for an instance offering the requested service.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Does the listener always have to finish starting before the database?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Not necessarily. The listener relationship is another reason not to describe RAC startup as one strict sequence. Oracle database resources can have weak start dependencies involving listener resources. Clusterware attempts to bring the related listener infrastructure online, but this should not be interpreted as a universal rule that every listener must be completely online before instance startup begins.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;6. RAC Instances Start, But That Is Not the End&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;After the required infrastructure, membership, storage, and resource dependencies are satisfied, Clusterware can start RAC instances according to the database configuration.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;At this point, one of the most common operational mistakes is to see the database open and declare recovery complete.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;An instance can be running while the application still cannot connect because:&lt;/p&gt;

&lt;ul&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A required database service is still offline.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The PDB associated with the service is not open.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Dynamic service registration has not completed.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A local or SCAN listener is unavailable.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;SCAN, VIP, DNS, or network connectivity is failing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For an application-facing RAC system, &lt;code style=&quot;font-family: courier;&quot;&gt;OPEN&lt;/code&gt; is therefore only one milestone. The useful end state is that the cluster is healthy, required storage is available, RAC instances are open, services are running, listeners know about those services, and a real client connection succeeds.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Practical DBA Scenario: Node Rebooted but RAC Did Not Return&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Assume one RAC server has been rebooted after maintenance. Linux is reachable and SSH works, but monitoring reports that the database service has not recovered.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Instead of immediately starting the database manually, I would first establish which layer is unhealthy. A small set of status commands is usually enough to locate the problem area before moving into logs and traces.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #8be9fd; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;# Clusterware status across all nodes&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;crsctl check cluster -all
crsctl status resource -t

&lt;/span&gt;&lt;span style=&quot;color: #8be9fd; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;# Voting infrastructure and OCR&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;crsctl query css votedisk
ocrcheck

&lt;/span&gt;&lt;span style=&quot;color: #8be9fd; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;# ASM&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;srvctl status asm

&lt;/span&gt;&lt;span style=&quot;color: #8be9fd; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;# SCAN infrastructure&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;srvctl status scan
srvctl status scan_listener

&lt;/span&gt;&lt;span style=&quot;color: #8be9fd; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;# RAC database and services&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;srvctl status database -db DB_UNIQUE_NAME
srvctl status service -db DB_UNIQUE_NAME&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The order in which these results are interpreted matters more than running a long list of commands.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Where Should You Investigate First?&lt;/h2&gt;

&lt;table style=&quot;border-collapse: collapse; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; width: 100%;&quot;&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;th style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px; text-align: left;&quot;&gt;Observation&lt;/th&gt;
      &lt;th style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px; text-align: left;&quot;&gt;First Layer to Investigate&lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;OHASD cannot be contacted&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;Local Clusterware bootstrap and OLR&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;CSS is not online&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;Voting files, interconnect, membership and lower stack&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;CSS is healthy but CRS is unavailable&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;CRSD, OCR and supporting storage&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;ASM or required disk groups are unavailable&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;ASM and shared-storage layer&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;Database resource remains offline&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;Database resource dependencies and database alert log&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;Instance is open but service is offline&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;Service configuration, placement and PDB state&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;Service is online but clients cannot connect&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;SCAN, VIP, listeners, registration, DNS and network&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Common RAC Startup Troubleshooting Mistakes&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Repeatedly Starting the Database&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Running &lt;code style=&quot;font-family: courier;&quot;&gt;srvctl start database&lt;/code&gt; repeatedly will not repair a failed lower-level dependency. If CSS, ASM, OCR, or another required Clusterware resource is unhealthy, fix that layer first.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Starting With the Database Alert Log&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The database alert log becomes useful once Clusterware has actually attempted to start the instance. If the failure occurred during Clusterware bootstrap, cluster membership, or ASM initialization, the relevant evidence will be lower in the stack.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Assuming ASM Always Starts After CRSD&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;That model can cause confusion, particularly where OCR or voting infrastructure resides in ASM. Think in terms of storage and Clusterware bootstrap dependencies rather than a simple sequential process list.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Checking Only Instance Status&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;An open RAC instance is not proof that application availability has been restored. Services, PDB state, listener registration, SCAN connectivity, and an actual application-style connection still need validation.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Production DBA Lessons&lt;/h2&gt;

&lt;ul&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;strong&gt;OHASD is the local foundation.&lt;/strong&gt; If the lower Clusterware stack is unavailable, do not jump directly to the database layer.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;strong&gt;CSS determines whether the node can participate safely in the cluster.&lt;/strong&gt; Voting and interconnect issues therefore deserve early attention.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;strong&gt;ASM can participate in Clusterware bootstrap.&lt;/strong&gt; Do not assume it is simply started after CRSD.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;strong&gt;CRSD manages resources based on dependencies.&lt;/strong&gt; RAC startup is not a fixed shell-script-style sequence.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;strong&gt;SCAN, VIPs and listeners have their own resource relationships.&lt;/strong&gt; Connectivity issues do not always indicate a database problem.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;strong&gt;Database open is not equal to application ready.&lt;/strong&gt; Services and end-to-end connectivity are the final validation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;A Simple Sequence to Remember&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For day-to-day operations, I prefer remembering the RAC recovery path like this:&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;strong&gt;Clusterware → Membership → Storage → Resources → Database → Services → Clients&lt;/strong&gt;&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This captures the operational dependency layers without suggesting that every internal daemon and resource starts sequentially.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;FAQs&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;What starts first in Oracle RAC after a server reboot?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle High Availability Services provides the foundation for the local Clusterware stack. From there, Clusterware establishes the infrastructure required for cluster membership and higher-level resource management.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Does ASM always start after CRSD?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;No. Treating ASM as something that always starts only after CRSD is an oversimplification. ASM can participate in Clusterware bootstrap, particularly when OCR or voting infrastructure is stored in ASM.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Does a listener have to be online before a RAC instance can start?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Not as a universal strict requirement. Clusterware dependency definitions determine the relationship between resources, and listener dependencies can be weaker than a simple mandatory sequential startup rule.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Why is my RAC database open but the application still cannot connect?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Check the application service, PDB state, listener registration, SCAN listeners, node VIPs, DNS resolution, and network connectivity. An open instance alone does not guarantee that the complete application connection path is healthy.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;What should I check first after a RAC node reboot?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Start with Clusterware health and work upward. Commands such as &lt;code style=&quot;font-family: courier;&quot;&gt;crsctl check cluster -all&lt;/code&gt; and &lt;code style=&quot;font-family: courier;&quot;&gt;crsctl status resource -t&lt;/code&gt; quickly show whether the failure is at the cluster, storage, network, database, or service layer.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle RAC startup is best understood as dependency recovery rather than simply a list of processes starting one after another.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;After a reboot, Clusterware first has to restore enough local and shared infrastructure for the node to participate safely in the cluster. Shared storage and cluster configuration must be available, higher-level resources must reach their expected states, and only then do database instances and services become genuinely useful to applications.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;When something does not recover, do not ask only, &lt;em&gt;&quot;Why did my RAC database not start?&quot;&lt;/em&gt; Find the first dependency layer that stopped progressing. If CSS is unhealthy, remain at cluster membership. If ASM is unavailable, remain at storage. If the database is open but the service is missing, troubleshoot the service and connectivity layer.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;In production, the fastest RAC troubleshooting normally comes from finding the &lt;strong&gt;first unhealthy dependency&lt;/strong&gt;, not from repeatedly restarting the final resource that happened to remain offline.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;References&lt;/h2&gt;

&lt;ul&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;a href=&quot;https://docs.oracle.com/en/database/oracle/oracle-database/19/cwadd/introduction-to-oracle-clusterware.html&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;Oracle Database 19c - Introduction to Oracle Clusterware&lt;/a&gt;&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;a href=&quot;https://docs.oracle.com/en/database/oracle/oracle-database/19/cwadd/managing-oracle-cluster-registry-and-voting-files.html&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;Oracle Database 19c - Managing OCR and Voting Files&lt;/a&gt;&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;a href=&quot;https://docs.oracle.com/en/database/oracle/oracle-database/19/racad/administering-database-instances-and-cluster-databases.html&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;Oracle RAC Administration and Deployment Guide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;!--SEO Search Description: Understand Oracle RAC startup from OHASD and CSS to ASM, listeners, database instances, services and troubleshooting.--&gt;

&lt;!--Source draft: :contentReference[oaicite:0]{index=0}--&gt;
</description><link>https://oracle-dba-help.blogspot.com/2026/11/oracle-rac-startup-sequence-from-boot.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEjLJdV0xImfqwxojj5dS1KxZZdGKrK4U-5yhkGyx0pCHB5m3neqPAQvlH05Cv6qkS2LKH_iird9U91_OnvhSL6kQMHiw_LTl03ru4uZEC613U-WhSk6Mo32FTeOPFCbZCpCSaO74Wsb-D-uLHZCg51nmGnmVzFg38cxcDNDVCfj7b3-6TIxuXTGg_VfVDM=s72-w881-h493-c" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-108887025619518584</guid><pubDate>Sun, 29 Nov 2026 09:00:00 +0000</pubDate><atom:updated>2026-11-29T17:00:00.222+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Core DBA</category><title>When ORA-04036 Is Not Caused by Application SQL: Tracing PGA Growth to the Optimizer Statistics Advisor</title><description>&lt;!--Blogger post title: ORA-04036: When Stats Advisor Exhausts PGA--&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The alert appeared during a maintenance window: &lt;code style=&quot;font-family: courier;&quot;&gt;ORA-04036: PGA memory used by the instance exceeds PGA_AGGREGATE_LIMIT&lt;/code&gt;. Application activity was low, no large reporting batch was running, and the usual PGA consumers such as parallel queries, hash joins, sorts, and PL/SQL collections did not explain the increase.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;One Oracle process was still growing. Its module pointed to &lt;code style=&quot;font-family: courier;&quot;&gt;DBMS_SCHEDULER&lt;/code&gt;, and the action belonged to Oracle&#39;s automatic optimizer statistics framework. The incident trace later placed the failing allocation inside the Optimizer Statistics Advisor, around the &lt;code style=&quot;font-family: courier;&quot;&gt;AvoidOutOfRange&lt;/code&gt; rule.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This is where a routine ORA-04036 investigation can go in the wrong direction. Increasing the PGA limit may stop the immediate alert, but it can also give a runaway internal task more room to consume memory. The safer approach is to identify the process, separate SQL workarea usage from private memory, correlate the event with automatic maintenance, and preserve the trace before changing anything.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Why This Matters in Production&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A quiet application workload does not mean the database is quiet. Maintenance windows often bring statistics collection, advisors, backups, segment work, and application housekeeping together. A system that has plenty of headroom during business hours can come under pressure when these activities overlap.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;There is another complication. Oracle automatic tasks can execute through job queue processes. Most SYS and background processes are protected from the normal &lt;code style=&quot;font-family: courier;&quot;&gt;PGA_AGGREGATE_LIMIT&lt;/code&gt; enforcement actions, but job queue processes are an explicit exception. An Oracle-maintained activity can therefore have its call or session terminated when it becomes a major untunable PGA consumer.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The error tells us that Oracle enforced the memory boundary. It does not tell us why the memory grew.&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Add ORA-04036 PGA target-versus-limit diagram here--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;PGA Target and PGA Limit Are Not the Same&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;PGA_AGGREGATE_TARGET&lt;/code&gt; guides automatic workarea sizing for operations such as sorts, hash joins, and bitmap processing. It is a target, not a guarantee that total PGA will remain below the configured value.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;PGA_AGGREGATE_LIMIT&lt;/code&gt; is the instance-level guardrail. When the limit is crossed, Oracle first terminates calls from sessions using the most untunable PGA. If the instance remains above the limit, Oracle can terminate those sessions. Parallel query processes are treated as one unit for this enforcement.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This distinction changes the troubleshooting path. If SQL workareas account for most of the memory, SQL tuning, parallelism, and concurrency are likely relevant. If workarea usage is modest while one process has a large and growing private allocation, the investigation must move toward PL/SQL, Java, internal metadata structures, or an Oracle maintenance task.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Start With Process Attribution&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Do not begin by changing a parameter. Capture the parameter values, the percentage of the limit already consumed, the largest Oracle processes, and active SQL workareas. On RAC, use the global views so that a consumer on another instance is not missed.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; inst_id, name, display_value
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   gv$parameter
&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt;  name &lt;span style=&quot;color: #ff79c6;&quot;&gt;IN&lt;/span&gt; (&#39;pga_aggregate_target&#39;, &#39;pga_aggregate_limit&#39;)
&lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; inst_id, name;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;WITH&lt;/span&gt; pga &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; ( &lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; inst_id, &lt;span style=&quot;color: #8be9fd;&quot;&gt;MAX&lt;/span&gt;(&lt;span style=&quot;color: #ff79c6;&quot;&gt;CASE WHEN&lt;/span&gt; name = &#39;total PGA allocated&#39; &lt;span style=&quot;color: #ff79c6;&quot;&gt;THEN&lt;/span&gt; value &lt;span style=&quot;color: #ff79c6;&quot;&gt;END&lt;/span&gt;) allocated, &lt;span style=&quot;color: #8be9fd;&quot;&gt;MAX&lt;/span&gt;(&lt;span style=&quot;color: #ff79c6;&quot;&gt;CASE WHEN&lt;/span&gt; name = &#39;total PGA inuse&#39; &lt;span style=&quot;color: #ff79c6;&quot;&gt;THEN&lt;/span&gt; value &lt;span style=&quot;color: #ff79c6;&quot;&gt;END&lt;/span&gt;) inuse, &lt;span style=&quot;color: #8be9fd;&quot;&gt;MAX&lt;/span&gt;(&lt;span style=&quot;color: #ff79c6;&quot;&gt;CASE WHEN&lt;/span&gt; name = &#39;maximum PGA allocated&#39; &lt;span style=&quot;color: #ff79c6;&quot;&gt;THEN&lt;/span&gt; value &lt;span style=&quot;color: #ff79c6;&quot;&gt;END&lt;/span&gt;) max_allocated, &lt;span style=&quot;color: #8be9fd;&quot;&gt;MAX&lt;/span&gt;(&lt;span style=&quot;color: #ff79c6;&quot;&gt;CASE WHEN&lt;/span&gt; name = &#39;total PGA used for auto workareas&#39; &lt;span style=&quot;color: #ff79c6;&quot;&gt;THEN&lt;/span&gt; value &lt;span style=&quot;color: #ff79c6;&quot;&gt;END&lt;/span&gt;) auto_workarea &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   gv$pgastat &lt;span style=&quot;color: #ff79c6;&quot;&gt;GROUP BY&lt;/span&gt; inst_id
+),
+lim &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; (

* &lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; inst_id, &lt;span style=&quot;color: #8be9fd;&quot;&gt;TO_NUMBER&lt;/span&gt;(value) limit_bytes
* &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   gv$parameter
* &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt;  name = &#39;pga_aggregate_limit&#39;
  +)
  +&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; p.inst_id,

    &lt;span style=&quot;color: #8be9fd;&quot;&gt;ROUND&lt;/span&gt;(p.allocated / 1024 / 1024) allocated_mb,
    &lt;span style=&quot;color: #8be9fd;&quot;&gt;ROUND&lt;/span&gt;(p.inuse / 1024 / 1024) inuse_mb,
    &lt;span style=&quot;color: #8be9fd;&quot;&gt;ROUND&lt;/span&gt;(p.max_allocated / 1024 / 1024) max_allocated_mb,
    &lt;span style=&quot;color: #8be9fd;&quot;&gt;ROUND&lt;/span&gt;(p.auto_workarea / 1024 / 1024) auto_workarea_mb,
    &lt;span style=&quot;color: #8be9fd;&quot;&gt;ROUND&lt;/span&gt;(l.limit_bytes / 1024 / 1024) limit_mb,
    &lt;span style=&quot;color: #8be9fd;&quot;&gt;ROUND&lt;/span&gt;(100 * p.allocated / &lt;span style=&quot;color: #8be9fd;&quot;&gt;NULLIF&lt;/span&gt;(l.limit_bytes, 0), 1) limit_used_pct


&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   pga p
&lt;span style=&quot;color: #ff79c6;&quot;&gt;JOIN&lt;/span&gt;   lim l &lt;span style=&quot;color: #ff79c6;&quot;&gt;ON&lt;/span&gt; l.inst_id = p.inst_id
&lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; p.inst_id;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; *
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; (

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; p.inst_id, p.spid, s.sid, s.serial#,
      &lt;span style=&quot;color: #8be9fd;&quot;&gt;NVL&lt;/span&gt;(s.username, &#39;(background)&#39;) username,
      s.program, s.module, s.action, s.sql_id,
      &lt;span style=&quot;color: #8be9fd;&quot;&gt;ROUND&lt;/span&gt;(p.pga_used_mem / 1024 / 1024) used_mb,
      &lt;span style=&quot;color: #8be9fd;&quot;&gt;ROUND&lt;/span&gt;(p.pga_alloc_mem / 1024 / 1024) alloc_mb,
      &lt;span style=&quot;color: #8be9fd;&quot;&gt;ROUND&lt;/span&gt;(p.pga_freeable_mem / 1024 / 1024) freeable_mb,
      &lt;span style=&quot;color: #8be9fd;&quot;&gt;ROUND&lt;/span&gt;(p.pga_max_mem / 1024 / 1024) max_mb
 &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   gv$process p
 &lt;span style=&quot;color: #ff79c6;&quot;&gt;LEFT JOIN&lt;/span&gt; gv$session s
      &lt;span style=&quot;color: #ff79c6;&quot;&gt;ON&lt;/span&gt; s.inst_id = p.inst_id
     &lt;span style=&quot;color: #ff79c6;&quot;&gt;AND&lt;/span&gt; s.paddr = p.addr
 &lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; p.pga_alloc_mem &lt;span style=&quot;color: #ff79c6;&quot;&gt;DESC&lt;/span&gt;
  &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; ROWNUM &amp;lt;= 20;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; inst_id, sid, sql_id, operation_type,

    &lt;span style=&quot;color: #8be9fd;&quot;&gt;ROUND&lt;/span&gt;(actual_mem_used / 1024 / 1024) actual_mb,
    &lt;span style=&quot;color: #8be9fd;&quot;&gt;ROUND&lt;/span&gt;(max_mem_used / 1024 / 1024) max_mb,
    &lt;span style=&quot;color: #8be9fd;&quot;&gt;ROUND&lt;/span&gt;(tempseg_size / 1024 / 1024) temp_mb,
    number_passes
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   gv$sql_workarea_active
&lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; actual_mem_used &lt;span style=&quot;color: #ff79c6;&quot;&gt;DESC&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;
+&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A single snapshot is not enough. Record the same values again after one or two minutes. The growth rate often tells more than the current allocation. A large but stable process may be less urgent than a scheduler slave adding hundreds of megabytes during each sample.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A useful clue is the relationship between total PGA and auto-workarea memory. If &lt;code style=&quot;font-family: courier;&quot;&gt;total PGA allocated&lt;/code&gt; is high but &lt;code style=&quot;font-family: courier;&quot;&gt;total PGA used for auto workareas&lt;/code&gt; remains low, do not spend the first hour tuning sorts that are not responsible for the pressure.&lt;/p&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;When the Statistics Advisor Becomes the Suspect&lt;/h2&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The Optimizer Statistics Advisor does not gather a fresh set of statistics. It reviews statistics collection practices and the quality of existing statistics, then stores findings and recommendations. Oracle runs the predefined &lt;code style=&quot;font-family: courier;&quot;&gt;AUTO_STATS_ADVISOR_TASK&lt;/code&gt; once per day in a maintenance window as part of the automatic optimizer statistics collection client.&lt;/p&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This distinction matters when choosing a workaround. Disabling the complete &lt;code style=&quot;font-family: courier;&quot;&gt;auto optimizer stats collection&lt;/code&gt; client also interrupts normal automatic statistics gathering. That can solve tonight&#39;s memory problem and create next week&#39;s plan-stability problem.&lt;/p&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Build a timeline using the running scheduler jobs, automatic statistics executions, advisor executions, and finding volume:&lt;/p&gt;&lt;br /&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
+&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; client_name, status
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   dba_autotask_client
&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt;  client_name = &#39;auto optimizer stats collection&#39;;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; owner, job_name, session_id, running_instance, elapsed_time
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   dba_scheduler_running_jobs
&lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; elapsed_time &lt;span style=&quot;color: #ff79c6;&quot;&gt;DESC&lt;/span&gt;;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; opid, origin, status, start_time, end_time,
    completed, failed, timed_out, in_progress

&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   dba_auto_stat_executions
&lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; start_time &lt;span style=&quot;color: #ff79c6;&quot;&gt;DESC&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FETCH FIRST&lt;/span&gt; 30 &lt;span style=&quot;color: #ff79c6;&quot;&gt;ROWS ONLY&lt;/span&gt;;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; task_name, execution_name, status,

    execution_start, execution_end, error_message


&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   dba_advisor_executions
&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt;  task_name = &#39;AUTO_STATS_ADVISOR_TASK&#39;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; execution_start &lt;span style=&quot;color: #ff79c6;&quot;&gt;DESC&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FETCH FIRST&lt;/span&gt; 30 &lt;span style=&quot;color: #ff79c6;&quot;&gt;ROWS ONLY&lt;/span&gt;;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; execution_name, type, &lt;span style=&quot;color: #8be9fd;&quot;&gt;COUNT&lt;/span&gt;(*) finding_count
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   dba_advisor_findings
&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt;  task_name = &#39;AUTO_STATS_ADVISOR_TASK&#39;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;GROUP BY&lt;/span&gt; execution_name, type
&lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; finding_count &lt;span style=&quot;color: #ff79c6;&quot;&gt;DESC&lt;/span&gt;;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; DBMS_STATS.REPORT_ADVISOR_TASK(
      &#39;AUTO_STATS_ADVISOR_TASK&#39;,
      &lt;span style=&quot;color: #8be9fd;&quot;&gt;NULL&lt;/span&gt;,

      &#39;TEXT&#39;,
      &#39;ALL&#39;,
      &#39;ALL&#39;
    ) report

&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; dual;&lt;/span&gt;&lt;/pre&gt;
+&lt;/div&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;View availability and columns vary across releases. Test the script on the database version you support. A scheduler action alone is only circumstantial evidence. A matching advisor execution, rising process PGA, and a trace from the same interval create a much stronger case.&lt;/p&gt;&lt;br /&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Read the Trace Without Overclaiming&lt;/h2&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The alert log tells you that the memory boundary was crossed. The process trace shows what Oracle was doing near the failing allocation. Locate the trace directory and default trace file first:&lt;/p&gt;&lt;br /&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
+&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; name, value
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   v$diag_info
&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt;  name &lt;span style=&quot;color: #ff79c6;&quot;&gt;IN&lt;/span&gt; (&#39;Diag Trace&#39;, &#39;Default Trace File&#39;);

-- Run from the relevant trace directory on the database host
grep -nE &#39;ORA-04036|ORA$AT_OS_OPT|qosadv|Just allocated&#39; *.trc&lt;/span&gt;&lt;/pre&gt;
+&lt;/div&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;In the production case behind this article, the trace recorded a 33,554,432-byte allocation, exactly 32 MB, immediately before Oracle prepared for a PGA limit error. The short stack included functions associated with generating an &lt;code style=&quot;font-family: courier;&quot;&gt;AvoidOutOfRange&lt;/code&gt; finding and creating an internal advisor object.&lt;/p&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;That is strong evidence for this incident, but it should not be turned into a universal rule. One captured 32 MB allocation does not prove that every heap extension was 32 MB. The conclusion becomes stronger only when repeated process samples or multiple trace entries show the same staircase pattern.&lt;/p&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The &lt;code style=&quot;font-family: courier;&quot;&gt;qosadv*&lt;/code&gt; function names are undocumented implementation details and can change between Release Updates. Use them to support an Oracle Service Request, not as a stable interface or a shortcut to a final diagnosis.&lt;/p&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Why AvoidOutOfRange Can Become Expensive&lt;/h2&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Column statistics store low and high values that help the optimizer estimate selectivity. After a bulk load or continuous insertion into a growing key, new values may sit outside the recorded range. For example, the stored high value may be &lt;code style=&quot;font-family: courier;&quot;&gt;500000&lt;/code&gt; while newly inserted rows already contain values above &lt;code style=&quot;font-family: courier;&quot;&gt;700000&lt;/code&gt;.&lt;/p&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The &lt;code style=&quot;font-family: courier;&quot;&gt;AvoidOutOfRange&lt;/code&gt; rule checks statistics practices that can leave the optimizer exposed to this estimation problem. The rule is useful. The risk is the amount of metadata it may need to evaluate in a large database.&lt;/p&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The following conditions deserve review, but none of them should be declared the cause until evidence confirms it:&lt;/p&gt;&lt;ul&gt;&lt;br /&gt;&lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Large numbers of tables, partitions, and subpartitions.&lt;/li&gt;&lt;br /&gt;&lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Heavy DML or bulk loads after the last statistics collection.&lt;/li&gt;&lt;br /&gt;&lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Many objects with stale or missing statistics.&lt;/li&gt;&lt;br /&gt;&lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A large volume of advisor findings or retained advisor history.&lt;/li&gt;&lt;br /&gt;&lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A release-specific defect fixed by a later RU or one-off patch.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Gathering statistics more frequently across the entire database is not automatically the answer. It can increase CPU, I/O, maintenance duration, and cursor invalidation. Concentrate on volatile schemas, range-growing columns, and partition strategies that have been tested against the actual workload.&lt;/p&gt;&lt;br /&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Containment and Long-Term Remediation&lt;/h2&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Containment should be narrow, reversible, and based on a confirmed consumer. If the Statistics Advisor task is currently executing, preserve the evidence and cancel that execution before disabling a broader automatic maintenance client.&lt;/p&gt;&lt;br /&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
+&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;-- Use only after confirming that AUTO_STATS_ADVISOR_TASK is executing
&lt;span style=&quot;color: #ff79c6;&quot;&gt;EXEC&lt;/span&gt; DBMS_STATS.CANCEL_ADVISOR_TASK(&#39;AUTO_STATS_ADVISOR_TASK&#39;);

+-- Confirm the exact rule name on this database release
&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; rule_id, name, rule_type, description
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   v$stats_advisor_rules
&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt;  &lt;span style=&quot;color: #8be9fd;&quot;&gt;UPPER&lt;/span&gt;(name) = &#39;AVOIDOUTOFRANGE&#39;;

+-- Targeted workaround where supported and approved
&lt;span style=&quot;color: #ff79c6;&quot;&gt;VARIABLE&lt;/span&gt; cfg &lt;span style=&quot;color: #8be9fd;&quot;&gt;CLOB&lt;/span&gt;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;BEGIN&lt;/span&gt;

:cfg := DBMS_STATS.CONFIGURE_ADVISOR_RULE_FILTER(

         task_name          =&amp;gt; &#39;AUTO_STATS_ADVISOR_TASK&#39;,

         stats_adv_opr_type =&amp;gt; &#39;EXECUTE&#39;,

         rule_name          =&amp;gt; &#39;AvoidOutOfRange&#39;,

         action             =&amp;gt; &#39;SHOW&#39;);


&lt;span style=&quot;color: #ff79c6;&quot;&gt;END&lt;/span&gt;;
/
&lt;span style=&quot;color: #ff79c6;&quot;&gt;PRINT&lt;/span&gt; cfg

&lt;span style=&quot;color: #ff79c6;&quot;&gt;BEGIN&lt;/span&gt;
cfg := DBMS_STATS.CONFIGURE_ADVISOR_RULE_FILTER(
         task_name          =&amp;gt; &#39;AUTO_STATS_ADVISOR_TASK&#39;,
         stats_adv_opr_type =&amp;gt; &#39;EXECUTE&#39;,
         rule_name          =&amp;gt; &#39;AvoidOutOfRange&#39;,
         action             =&amp;gt; &#39;DISABLE&#39;);

&lt;span style=&quot;color: #ff79c6;&quot;&gt;END&lt;/span&gt;;
/
&lt;span style=&quot;color: #ff79c6;&quot;&gt;PRINT&lt;/span&gt; cfg

+-- Re-enable after patch validation by repeating the call with action =&amp;gt; &#39;ENABLE&#39;.&lt;/span&gt;&lt;/pre&gt;
+&lt;/div&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;These operations require the appropriate privileges and must be validated on the same database release and RU. Changes to the predefined SYS-owned task should follow change control and, for a suspected product defect, Oracle Support guidance.&lt;/p&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;If targeted control is unavailable, Oracle documents &lt;code style=&quot;font-family: courier;&quot;&gt;DBMS_AUTO_TASK_ADMIN.DISABLE&lt;/code&gt; for the complete automatic statistics client. Treat that as a broad emergency workaround. Define how statistics will be maintained while it is disabled and set a firm date for re-enabling it.&lt;/p&gt;&lt;br /&gt;&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;A sensible production sequence&lt;/h3&gt;&lt;ol&gt;&lt;br /&gt;&lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Preserve the alert log, process trace, PGA samples, advisor history, and exact RU details.&lt;/li&gt;&lt;br /&gt;&lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Cancel only the confirmed running advisor execution.&lt;/li&gt;&lt;br /&gt;&lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Use a rule-level or window-specific workaround where the release supports it.&lt;/li&gt;&lt;br /&gt;&lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Check for a matching bug and patch recommendation through an Oracle SR.&lt;/li&gt;&lt;br /&gt;&lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Test the fix under a representative maintenance workload.&lt;/li&gt;&lt;br /&gt;&lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Remove the workaround, restore normal automation, and monitor several maintenance windows.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Raising &lt;code style=&quot;font-family: courier;&quot;&gt;PGA_AGGREGATE_LIMIT&lt;/code&gt; may buy time only when the host has verified memory headroom. It is not a repair for unbounded private memory growth. A larger limit can move the failure from an Oracle error to swap pressure or an operating-system kill.&lt;/p&gt;&lt;br /&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Oracle and PostgreSQL Handle This Differently&lt;/h2&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;PostgreSQL does not have an exact equivalent of Oracle&#39;s instance-wide &lt;code style=&quot;font-family: courier;&quot;&gt;PGA_AGGREGATE_LIMIT&lt;/code&gt;. Settings such as &lt;code style=&quot;font-family: courier;&quot;&gt;work_mem&lt;/code&gt;, &lt;code style=&quot;font-family: courier;&quot;&gt;maintenance_work_mem&lt;/code&gt;, and &lt;code style=&quot;font-family: courier;&quot;&gt;autovacuum_work_mem&lt;/code&gt; control important memory areas, but &lt;code style=&quot;font-family: courier;&quot;&gt;work_mem&lt;/code&gt; can apply to each plan operation and each parallel worker. Total memory can therefore be much larger than the parameter value suggests.&lt;/p&gt;&lt;br /&gt;&lt;table style=&quot;border-collapse: collapse; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal; width: 100%;&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Area&lt;/th&gt;&lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Oracle&lt;/th&gt;&lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;PostgreSQL&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Private execution memory&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;PGA per Oracle process&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Backend process memory&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Common tuning control&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;PGA_AGGREGATE_TARGET&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;work_mem&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Database-wide hard ceiling&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;PGA_AGGREGATE_LIMIT&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;No exact built-in equivalent&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Parallelism risk&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Parallel query is treated as a unit during limit enforcement&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;work_mem&lt;/code&gt; can apply to the leader and each worker&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Internal maintenance&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Scheduler and job queue tasks&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Autovacuum and maintenance workers&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Final protection&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Oracle can terminate calls or sessions&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;OS, cgroup, container limit, or OOM killer may intervene&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The shared lesson is that one memory parameter never describes the complete workload. SQL plan nodes, parallel workers, session concurrency, and maintenance activity must be sized together.&lt;/p&gt;&lt;br /&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Mini Case Study: A Quiet-Window PGA Spike&lt;/h2&gt;&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Problem&lt;/h3&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Aggregate PGA increased quickly during a weekend maintenance window even though business throughput was low. ORA-04036 appeared in the alert log, and the largest process belonged to a scheduler slave running an Oracle automatic statistics action.&lt;/p&gt;&lt;br /&gt;&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Investigation&lt;/h3&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Active SQL workareas did not explain the process allocation. Repeated snapshots showed staircase-like private memory growth. The Statistics Advisor execution overlapped the alert, while the trace placed a 32 MB allocation in a &lt;code style=&quot;font-family: courier;&quot;&gt;qosadv*&lt;/code&gt; path associated with &lt;code style=&quot;font-family: courier;&quot;&gt;AvoidOutOfRange&lt;/code&gt; finding generation.&lt;/p&gt;&lt;br /&gt;&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Root cause and fix&lt;/h3&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The evidence supported excessive untunable PGA allocation while the Optimizer Statistics Advisor created internal finding objects. The running execution was canceled to stabilize the instance. Normal statistics gathering was retained, while a narrowly scoped rule workaround was used only after release-specific validation. The permanent path was to obtain Oracle&#39;s RU or one-off patch recommendation, test it, remove the workaround, and observe later maintenance windows.&lt;/p&gt;&lt;br /&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Lessons From the Field&lt;/h2&gt;&lt;ul&gt;&lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Treat ORA-04036 as the enforcement event, not the root-cause statement.&lt;/li&gt;&lt;br /&gt;&lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Capture process growth over time. One high-memory snapshot does not show whether the process is stable or still expanding.&lt;/li&gt;&lt;br /&gt;&lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Store instance ID, SPID, SID, serial number, module, action, SQL ID, allocation, and maximum allocation in the same monitoring record.&lt;/li&gt;&lt;br /&gt;&lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Monitor each RAC instance independently instead of averaging memory across the cluster.&lt;/li&gt;&lt;br /&gt;&lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Check maintenance overlap. Statistics, advisors, backups, and application batches can compete even when user traffic is low.&lt;/li&gt;&lt;br /&gt;&lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Preserve the trace before restarting the instance, purging advisor data, or terminating sessions.&lt;/li&gt;&lt;br /&gt;&lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Do not permanently solve internal PGA growth by repeatedly raising the limit.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Frequently Asked Questions&lt;/h2&gt;&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Does ORA-04036 always mean the PGA limit is too low?&lt;/h3&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;No. The limit may be undersized for legitimate concurrency, but it may also be correctly stopping a runaway SQL statement, PL/SQL allocation, parallel workload, or internal task. Identify the consumer before resizing.&lt;/p&gt;&lt;br /&gt;&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Can an Oracle automatic statistics task be terminated by the limit?&lt;/h3&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Yes. Job queue processes are not covered by the same enforcement exemption as most SYS and background processes. An automatic task running through a job queue process can be affected.&lt;/p&gt;&lt;br /&gt;&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Should I disable automatic optimizer statistics collection?&lt;/h3&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Only as a short, approved emergency measure when narrower containment is unavailable. It disables more than the Statistics Advisor and can leave objects with stale statistics.&lt;/p&gt;&lt;br /&gt;&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Does a 32 MB allocation prove an Oracle memory leak?&lt;/h3&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;No. It proves that one 32 MB allocation was captured at that point. Repeated growth with the same stack and a matching advisor timeline strengthens the diagnosis, but Oracle Support should confirm the defect and patch.&lt;/p&gt;&lt;br /&gt;&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Will increasing PGA_AGGREGATE_TARGET prevent ORA-04036?&lt;/h3&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Not necessarily. The target mainly guides tunable workareas. Untunable private allocations can continue growing, and hard enforcement still occurs at &lt;code style=&quot;font-family: courier;&quot;&gt;PGA_AGGREGATE_LIMIT&lt;/code&gt;.&lt;/p&gt;&lt;br /&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Conclusion&lt;/h2&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;ORA-04036 often receives a quick response: increase the limit and move on. That may restore service, but it does not answer the question that matters - which process consumed the untunable memory, and what was it doing?&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;When the consumer is the automatic Optimizer Statistics Advisor, the normal SQL-tuning workflow is incomplete. A reliable diagnosis connects four layers: instance PGA pressure, process-level growth, scheduler and advisor history, and the allocation stack in the trace. The &lt;code style=&quot;font-family: courier;&quot;&gt;AvoidOutOfRange&lt;/code&gt; and &lt;code style=&quot;font-family: courier;&quot;&gt;qosadv*&lt;/code&gt; evidence is meaningful when those layers agree. It should not be presented as the explanation for every ORA-04036.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Containment requires the same discipline. Cancel the confirmed execution before disabling the complete statistics client. Prefer a tested and reversible rule-level workaround where supported. Keep normal statistics collection working wherever possible, then use the evidence to check the RU level, open an Oracle SR, and test the recommended patch under realistic maintenance load.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Before the next maintenance window, review the monitoring. Capture the top PGA processes, their growth delta, module and action, workarea usage, and automatic task history for every RAC instance. The next ORA-04036 should start an evidence-led investigation, not another round of parameter guessing.&lt;/p&gt;&lt;br /&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;References&lt;/h2&gt;&lt;ul&gt;&lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;a href=&quot;https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/PGA_AGGREGATE_LIMIT.html&quot; target=&quot;_blank&quot;&gt;Oracle Database Reference: PGA_AGGREGATE_LIMIT&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;a href=&quot;https://docs.oracle.com/en/database/oracle/oracle-database/21/tgsql/optimizer-statistics-advisor.html&quot; target=&quot;_blank&quot;&gt;Oracle Database SQL Tuning Guide: Optimizer Statistics Advisor&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;a href=&quot;https://docs.oracle.com/en/database/oracle/oracle-database/19/tgsql/gathering-optimizer-statistics.html&quot; target=&quot;_blank&quot;&gt;Oracle Database SQL Tuning Guide: Gathering Optimizer Statistics&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/runtime-config-resource.html&quot; target=&quot;_blank&quot;&gt;PostgreSQL Documentation: Resource Consumption&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;a href=&quot;https://www.linkedin.com/pulse/ora-04036-deep-dive-when-auto-optimizer-statistics-advisor-pandey-xxjic/&quot; target=&quot;_blank&quot;&gt;Source production case by Aman Pandey&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Have you encountered ORA-04036 from an Oracle maintenance task rather than application SQL? Share the database release and the evidence that helped you isolate the consumer.&lt;/p&gt;</description><link>https://oracle-dba-help.blogspot.com/2026/07/blog-post.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-4927958058406200605</guid><pubDate>Sat, 28 Nov 2026 09:44:00 +0000</pubDate><atom:updated>2026-11-28T17:44:00.119+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">DataGuard</category><category domain="http://www.blogger.com/atom/ns#">Tuning</category><title>Why the Same SQL Can Be Slower on an Active Data Guard Standby Than on Primary</title><description>&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&amp;nbsp;A common complaint in Oracle environments is:&lt;/span&gt;&lt;/p&gt;
&lt;blockquote data-end=&quot;550&quot; data-start=&quot;416&quot;&gt;
&lt;p data-end=&quot;550&quot; data-start=&quot;418&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;i&gt;“This SQL runs fast on primary, but the same SQL is slow on standby. Nothing changed in the query, so why is standby taking longer?”&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-end=&quot;718&quot; data-start=&quot;552&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The first reaction is usually predictable. People start checking indexes, optimizer plans, stale statistics, CPU usage, I/O, or resource limits on the standby server.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;800&quot; data-start=&quot;720&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Those checks are valid. But with Active Data Guard, they are not the full story.&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;
&lt;p data-end=&quot;1122&quot; data-start=&quot;802&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Oracle is very clear about this behaviour: a query response time, throughput, or report elapsed time on a standby database is not guaranteed to match the primary. This is not a vague disclaimer. It comes from the way Active Data Guard maintains read consistency while redo apply is continuously running in the background.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;1413&quot; data-start=&quot;1124&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;A standby database is not just a passive copy opened for reads. It is constantly applying redo received from the primary. At the same time, user sessions are querying blocks that may be changing because of redo apply. Oracle has to protect read consistency, and that protection has a cost.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;1451&quot; data-start=&quot;1415&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Sometimes the SQL is perfectly fine.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;1495&quot; data-start=&quot;1453&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;1495&quot; data-start=&quot;1453&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The delay is not because the query is bad.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;1625&quot; data-start=&quot;1497&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The delay is because the standby has not yet applied the redo needed to present a consistent version of the data for that query.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;1697&quot; data-start=&quot;1627&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;That is where waits like &lt;code data-end=&quot;1679&quot; data-start=&quot;1652&quot;&gt;standby query scn advance&lt;/code&gt; become important.&lt;/span&gt;&lt;/p&gt;

&lt;h2 data-end=&quot;1759&quot; data-section-id=&quot;sfy2o2&quot; data-start=&quot;1704&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 data-end=&quot;1759&quot; data-section-id=&quot;sfy2o2&quot; data-start=&quot;1704&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;Primary and Standby Do Not Read Data in the Same Way&lt;/span&gt;&lt;/h2&gt;
&lt;p data-end=&quot;1973&quot; data-start=&quot;1761&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;On a primary database, a query builds its consistent read using local undo and buffer cache structures. The database has immediate access to the undo required to reconstruct the block version as of the query SCN.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;2029&quot; data-start=&quot;1975&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;On an Active Data Guard standby, things are different.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;2254&quot; data-start=&quot;2031&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The standby is opened read-only, but redo apply is still moving the database forward. When a query starts, it needs a consistent view of the data as of a particular SCN. That SCN must be safe from the standby’s perspective.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;2346&quot; data-start=&quot;2256&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The standby may receive redo quickly, but receiving redo is not the same as applying redo.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;2386&quot; data-start=&quot;2348&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;This difference matters in production.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;2425&quot; data-start=&quot;2388&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;A primary may already be at SCN 4512.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;2477&quot; data-start=&quot;2427&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The standby may have received redo up to SCN 4512.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;2531&quot; data-start=&quot;2479&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;But redo apply may only have applied up to SCN 4500.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;2718&quot; data-start=&quot;2533&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;If your query needs a consistent view around SCN 4510, the standby cannot simply pretend that data is available. It must wait until redo apply advances enough to safely serve the query.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;2743&quot; data-start=&quot;2720&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;That wait can be small.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;2871&quot; data-start=&quot;2745&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;It can also become visible when the workload is heavy, redo generation is high, or the query touches recently modified blocks.&lt;/span&gt;&lt;/p&gt;
&lt;h2 data-end=&quot;2926&quot; data-section-id=&quot;1vxi47h&quot; data-start=&quot;2878&quot;&gt;&lt;span role=&quot;text&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 data-end=&quot;2926&quot; data-section-id=&quot;1vxi47h&quot; data-start=&quot;2878&quot;&gt;&lt;span role=&quot;text&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;What &lt;code data-end=&quot;2913&quot; data-start=&quot;2886&quot;&gt;standby query scn advance&lt;/code&gt; Really Means&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p data-end=&quot;3087&quot; data-start=&quot;2928&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The wait event &lt;code data-end=&quot;2970&quot; data-start=&quot;2943&quot;&gt;standby query scn advance&lt;/code&gt; usually means the query is waiting for the standby apply process to advance to an SCN required for read consistency.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;3105&quot; data-start=&quot;3089&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;In simple words:&lt;/span&gt;&lt;/p&gt;
&lt;blockquote data-end=&quot;3186&quot; data-start=&quot;3107&quot;&gt;
&lt;p data-end=&quot;3186&quot; data-start=&quot;3109&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;“The query wants to read data at an SCN that redo apply has not reached yet.”&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-end=&quot;3314&quot; data-start=&quot;3188&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;This is not automatically a problem. A few milliseconds of this wait can be completely normal on an Active Data Guard standby.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;3410&quot; data-start=&quot;3316&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;But when the wait becomes frequent or large, it can make short queries look unexpectedly slow.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;3543&quot; data-start=&quot;3412&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;This is why a query that runs in milliseconds on primary may suddenly take seconds on standby, especially if it touches hot blocks.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;3553&quot; data-start=&quot;3545&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Example:&lt;/span&gt;&lt;/p&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; event,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;       total_waits,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;       time_waited_micro&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;   v$system_event&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;  event &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;LIKE&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #bd93f9;&quot;&gt;&#39;standby%&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;3676&quot; data-start=&quot;3555&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;3695&quot; data-start=&quot;3678&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;At session level:&lt;/span&gt;&lt;/p&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; sid,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;       event,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;       seconds_in_wait&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;   v$session&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;  event &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #bd93f9;&quot;&gt;&#39;standby query scn advance&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;3817&quot; data-start=&quot;3697&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;3888&quot; data-start=&quot;3819&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;This is one of the first things I would check before blaming the SQL.&lt;/span&gt;&lt;/p&gt;
&lt;h2 data-end=&quot;3934&quot; data-section-id=&quot;i6jn87&quot; data-start=&quot;3895&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 data-end=&quot;3934&quot; data-section-id=&quot;i6jn87&quot; data-start=&quot;3895&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;Why Undo Makes This More Interesting&lt;/span&gt;&lt;/h2&gt;
&lt;p data-end=&quot;4086&quot; data-start=&quot;3936&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The behaviour becomes more noticeable when the query reads a block that contains changes from a transaction that was not committed as of the query SCN.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;4171&quot; data-start=&quot;4088&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Oracle must roll back that block logically using undo to produce a consistent read.&lt;/span&gt;&lt;/p&gt;
&lt;blockquote style=&quot;border-color: currentcolor; border-image: initial; border-style: none; border-width: medium; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;p data-end=&quot;4216&quot; data-start=&quot;4173&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;On primary, that undo is locally available.&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;4311&quot; data-start=&quot;4218&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;On standby, the undo information also arrives through redo and must be applied by redo apply.&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p data-end=&quot;4398&quot; data-start=&quot;4313&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;So the query may need undo, but the redo containing that undo may not yet be applied.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;That is where the query waits.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;4643&quot; data-start=&quot;4432&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;This is why small lookup queries can sometimes behave badly on standby. They may look harmless, but if they hit blocks that are being frequently modified on primary, they become dependent on redo apply progress.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;4745&quot; data-start=&quot;4645&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;This often surprises application teams because the SQL plan may be identical on primary and standby.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;4759&quot; data-start=&quot;4747&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;Same SQL ID.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;Same execution plan.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;Similar buffer gets.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;4837&quot; data-start=&quot;4805&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;But very different elapsed time.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;4931&quot; data-start=&quot;4839&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The difference is not always in the optimizer. Sometimes it is in the consistency mechanics.&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;4931&quot; data-start=&quot;4839&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 data-end=&quot;4987&quot; data-section-id=&quot;1abcvwz&quot; data-start=&quot;4938&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;Where This Shows Up in Real Production Systems&lt;/span&gt;&lt;/h2&gt;
&lt;p data-end=&quot;5106&quot; data-start=&quot;4989&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;This problem is more visible in systems where standby is used for near-real-time reporting or operational dashboards.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;5125&quot; data-start=&quot;5108&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Typical examples:&lt;/span&gt;&lt;/p&gt;
&lt;ul data-end=&quot;5436&quot; data-start=&quot;5127&quot;&gt;
&lt;li data-end=&quot;5169&quot; data-section-id=&quot;835lgj&quot; data-start=&quot;5127&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
queries reading recently inserted orders
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;5218&quot; data-section-id=&quot;1yg9hy8&quot; data-start=&quot;5170&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
dashboards checking current transaction status
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;5253&quot; data-section-id=&quot;1mfwbwf&quot; data-start=&quot;5219&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
reports hitting audit/log tables
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;5294&quot; data-section-id=&quot;14p7021&quot; data-start=&quot;5254&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
applications reading queue-like tables
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;5331&quot; data-section-id=&quot;vv500b&quot; data-start=&quot;5295&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
lookups on frequently updated rows
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;5371&quot; data-section-id=&quot;1ogu7iw&quot; data-start=&quot;5332&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
RAC systems with high redo generation
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;5436&quot; data-section-id=&quot;1fih93c&quot; data-start=&quot;5372&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
systems with storage latency on standby redo logs or datafiles
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-end=&quot;5471&quot; data-start=&quot;5438&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The most dangerous assumption is:&lt;/span&gt;&lt;/p&gt;
&lt;blockquote data-end=&quot;5567&quot; data-start=&quot;5473&quot;&gt;
&lt;p data-end=&quot;5567&quot; data-start=&quot;5475&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;“The standby is open read-only, so reporting workload should not affect anything important.”&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-end=&quot;5597&quot; data-start=&quot;5569&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;That is only partially true.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;5842&quot; data-start=&quot;5599&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Reporting does not modify data, but it still competes for CPU, I/O, buffer cache, and sometimes indirectly impacts redo apply performance. If standby hardware is smaller than primary, or storage is slower, the gap becomes visible very quickly.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;5961&quot; data-start=&quot;5844&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;This is also why “we offloaded reporting to standby” sometimes becomes “why is standby lag increasing every morning?”&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;6013&quot; data-start=&quot;5963&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The reporting workload did move away from primary.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;6117&quot; data-start=&quot;6015&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;But it landed on the same system that is responsible for keeping disaster recovery close to real time.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;6163&quot; data-start=&quot;6119&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;That trade-off should be understood clearly.&lt;/span&gt;&lt;/p&gt;
&lt;h2 data-end=&quot;6198&quot; data-section-id=&quot;10adhnn&quot; data-start=&quot;6170&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 data-end=&quot;6198&quot; data-section-id=&quot;10adhnn&quot; data-start=&quot;6170&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;How I Would Diagnose This&lt;/span&gt;&lt;/h2&gt;
&lt;p data-end=&quot;6234&quot; data-start=&quot;6200&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;Do not start by rewriting the SQL.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;Start by proving where the elapsed time is going.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 data-end=&quot;6343&quot; data-section-id=&quot;1n37sm7&quot; data-start=&quot;6287&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;1. Check whether standby-specific waits are involved&lt;/span&gt;&lt;/h3&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; event,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;       total_waits,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;       time_waited_micro&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;   v$system_event&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;  event &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;LIKE&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #bd93f9;&quot;&gt;&#39;standby%&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;6466&quot; data-start=&quot;6345&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;For currently waiting sessions:&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; sid,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;color: #8be9fd; font-style: italic;&quot;&gt;serial&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;       username,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;       sql_id,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;       event,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;       seconds_in_wait&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;   v$session&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;  event &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;LIKE&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #bd93f9;&quot;&gt;&#39;standby%&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;6655&quot; data-start=&quot;6501&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;6806&quot; data-start=&quot;6657&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;If the query is spending time on &lt;code data-end=&quot;6717&quot; data-start=&quot;6690&quot;&gt;standby query scn advance&lt;/code&gt;, that is already a strong indication that redo apply and query consistency are involved.&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;6806&quot; data-start=&quot;6657&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 data-end=&quot;6844&quot; data-section-id=&quot;1oy1t62&quot; data-start=&quot;6808&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;2. Check transport and apply lag&lt;/span&gt;&lt;/h3&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; name,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;       value,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;       unit&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;   v$dataguard_stats&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;  name &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;IN&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color: #bd93f9;&quot;&gt;&#39;transport lag&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #bd93f9;&quot;&gt;&#39;apply lag&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;6967&quot; data-start=&quot;6846&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;7083&quot; data-start=&quot;6969&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Do not ignore small lag values. For some workloads, even a few seconds can be enough to hurt “fresh data” queries.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;7141&quot; data-start=&quot;7085&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;A standby used for yesterday’s reports can tolerate lag.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;A standby used for just-committed transactional lookups often cannot.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 data-end=&quot;7252&quot; data-section-id=&quot;mp8bnb&quot; data-start=&quot;7214&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 data-end=&quot;7252&quot; data-section-id=&quot;mp8bnb&quot; data-start=&quot;7214&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;3. Check managed recovery behavior&lt;/span&gt;&lt;/h3&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; process,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;       status,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;       thread&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;       sequence&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;       block&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;#&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;   v$managed_standby;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;7369&quot; data-start=&quot;7254&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Look for MRP behaviour, sequence movement, and whether apply is progressing steadily.&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;7495&quot; data-start=&quot;7457&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;You can also review recovery progress:&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;7544&quot; data-start=&quot;7497&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;blockquote style=&quot;border-color: currentcolor; border-image: initial; border-style: none; border-width: medium; border: none; margin: 0px 0px 0px 40px; padding: 0px;&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;7544&quot; data-start=&quot;7497&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot; style=&quot;text-align: left;&quot;&gt;&lt;code&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;&lt;span class=&quot;ͼg&quot;&gt;SELECT&lt;/span&gt; &lt;span class=&quot;ͼg&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;ͼg&quot;&gt;FROM&lt;/span&gt;   v$recovery_progress;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;7544&quot; data-start=&quot;7497&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;7696&quot; data-start=&quot;7546&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The point is not just to see whether recovery is running. The point is to understand whether apply can keep up with the redo rate produced by primary.&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;7696&quot; data-start=&quot;7546&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 data-end=&quot;7739&quot; data-section-id=&quot;111pdrt&quot; data-start=&quot;7698&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;4. Compare SQL elapsed time and waits&lt;/span&gt;&lt;/h3&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; sql_id,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;       executions,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;       elapsed_time,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;       cpu_time,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;       buffer_gets,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;       disk_reads&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;   v$sql&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;BY&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; elapsed_time &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;DESC&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;7902&quot; data-start=&quot;7741&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;&lt;br /&gt;If elapsed time is high but CPU and I/O do not justify it, check the wait profile. That is where many standby performance investigations become clearer.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;h2 data-end=&quot;8091&quot; data-section-id=&quot;1urmqpg&quot; data-start=&quot;8063&quot;&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Source Sans Pro; font-size: large;&quot;&gt;What Can Be Done About It&lt;/span&gt;&lt;/h2&gt;
&lt;p data-end=&quot;8175&quot; data-start=&quot;8093&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;There is no single magic parameter that makes standby behave exactly like primary.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;You tune this from multiple angles.&lt;/span&gt;&lt;/p&gt;
&lt;h3 data-end=&quot;8245&quot; data-section-id=&quot;1nziew0&quot; data-start=&quot;8214&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Improve redo apply capacity&lt;/span&gt;&lt;/h3&gt;
&lt;p data-end=&quot;8366&quot; data-start=&quot;8247&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Make sure standby redo logs, archive destinations, and datafiles are on storage that can sustain the primary redo rate.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;8428&quot; data-start=&quot;8368&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;If apply is underpowered, every fresh-read workload suffers.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;8466&quot; data-start=&quot;8430&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;In some cases, parallel apply helps:&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;8538&quot; data-start=&quot;8468&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;blockquote style=&quot;border: none; margin: 0 0 0 40px; padding: 0px;&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;8538&quot; data-start=&quot;8468&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot; style=&quot;text-align: left;&quot;&gt;&lt;code&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;&lt;span class=&quot;ͼg&quot;&gt;ALTER&lt;/span&gt; DATABASE RECOVER MANAGED STANDBY DATABASE PARALLEL &lt;span class=&quot;ͼj&quot;&gt;8&lt;/span&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;8538&quot; data-start=&quot;8468&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;8753&quot; data-start=&quot;8540&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The correct degree depends on CPU, I/O, RAC layout, redo volume, and workload pattern. Do not blindly increase it and assume things will improve. Watch apply rate, CPU saturation, and I/O latency after the change.&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;8753&quot; data-start=&quot;8540&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 data-end=&quot;8779&quot; data-section-id=&quot;r0g9r6&quot; data-start=&quot;8755&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Separate query types&lt;/span&gt;&lt;/h3&gt;
&lt;p data-end=&quot;8816&quot; data-start=&quot;8781&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;Not every query belongs on standby.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;Historical reports are usually good candidates.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;Fresh transactional lookups are risky.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;8951&quot; data-start=&quot;8907&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Operational dashboards need careful testing.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;8968&quot; data-start=&quot;8953&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;A good rule is:&lt;/span&gt;&lt;/p&gt;
&lt;blockquote data-end=&quot;9076&quot; data-start=&quot;8970&quot;&gt;
&lt;p data-end=&quot;9076&quot; data-start=&quot;8972&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;If the query needs the latest committed data with very low latency, standby may not be the right target.&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-end=&quot;9164&quot; data-start=&quot;9078&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;This is especially true for application logic that expects primary-like response time.&lt;/span&gt;&lt;/p&gt;
&lt;h3 data-end=&quot;9212&quot; data-section-id=&quot;1e01ja0&quot; data-start=&quot;9166&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 data-end=&quot;9212&quot; data-section-id=&quot;1e01ja0&quot; data-start=&quot;9166&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Avoid sending hot-block queries to standby&lt;/span&gt;&lt;/h3&gt;
&lt;p data-end=&quot;9278&quot; data-start=&quot;9214&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Some objects are naturally bad candidates for standby reporting:&lt;/span&gt;&lt;/p&gt;
&lt;ul data-end=&quot;9463&quot; data-start=&quot;9280&quot;&gt;
&lt;li data-end=&quot;9294&quot; data-section-id=&quot;1lgvdf8&quot; data-start=&quot;9280&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
queue tables
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;9309&quot; data-section-id=&quot;8e9g14&quot; data-start=&quot;9295&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
audit tables
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;9333&quot; data-section-id=&quot;112wo8o&quot; data-start=&quot;9310&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
current status tables
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;9370&quot; data-section-id=&quot;10n9e7&quot; data-start=&quot;9334&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
rapidly updated transaction tables
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;9417&quot; data-section-id=&quot;1i81kcq&quot; data-start=&quot;9371&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
tables with monotonically increasing indexes
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;9463&quot; data-section-id=&quot;1ass1my&quot; data-start=&quot;9418&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
small lookup tables updated very frequently
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-end=&quot;9541&quot; data-start=&quot;9465&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Queries hitting these objects are more likely to run into consistency waits.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;9696&quot; data-start=&quot;9543&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Possible design options include partitioning, changing access patterns, moving reporting to less volatile data, or routing those queries back to primary.&lt;/span&gt;&lt;/p&gt;
&lt;h3 data-end=&quot;9758&quot; data-section-id=&quot;z1jog3&quot; data-start=&quot;9698&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Monitor standby as a production workload, not only as DR&lt;/span&gt;&lt;/h3&gt;
&lt;p data-end=&quot;9827&quot; data-start=&quot;9760&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Many teams monitor Data Guard only for apply lag and transport lag.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;9889&quot; data-start=&quot;9829&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;That is not enough when standby is actively serving queries.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;9914&quot; data-start=&quot;9891&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;You also need to watch:&lt;/span&gt;&lt;/p&gt;
&lt;ul data-end=&quot;10149&quot; data-start=&quot;9916&quot;&gt;
&lt;li data-end=&quot;9937&quot; data-section-id=&quot;19921t7&quot; data-start=&quot;9916&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
standby wait events
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;9958&quot; data-section-id=&quot;yyim73&quot; data-start=&quot;9938&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
MRP apply behavior
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;9982&quot; data-section-id=&quot;fvmah6&quot; data-start=&quot;9959&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
redo apply throughput
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;10004&quot; data-section-id=&quot;1b5zh5q&quot; data-start=&quot;9983&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
standby I/O latency
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;10041&quot; data-section-id=&quot;gyyrsp&quot; data-start=&quot;10005&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
CPU usage during reporting windows
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;10062&quot; data-section-id=&quot;13ljtln&quot; data-start=&quot;10042&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
top SQL on standby
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;10088&quot; data-section-id=&quot;n7koqf&quot; data-start=&quot;10063&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
reporting job schedules
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;10110&quot; data-section-id=&quot;17belkt&quot; data-start=&quot;10089&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
archive log buildup
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;10149&quot; data-section-id=&quot;5qxcrs&quot; data-start=&quot;10111&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
RAC node imbalance if standby is RAC
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-end=&quot;10212&quot; data-start=&quot;10151&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;A standby used for reporting is not just a DR system anymore.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;10272&quot; data-start=&quot;10214&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;It is a production read platform with DR responsibilities.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;10315&quot; data-start=&quot;10274&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;That combination needs proper monitoring.&lt;/span&gt;&lt;/p&gt;
&lt;h2 data-end=&quot;10351&quot; data-section-id=&quot;2yg0nx&quot; data-start=&quot;10322&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 data-end=&quot;10351&quot; data-section-id=&quot;2yg0nx&quot; data-start=&quot;10322&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;The Practical DBA Takeaway&lt;/span&gt;&lt;/h2&gt;
&lt;p data-end=&quot;10512&quot; data-start=&quot;10353&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Active Data Guard gives you a powerful way to offload read workload from primary. But it does not guarantee that every SQL will behave the same way on standby.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;10725&quot; data-start=&quot;10514&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The standby has to serve read-consistent data while redo apply is moving the database forward. When a query needs an SCN that apply has not reached, or when it needs undo that has not yet been applied, it waits.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;10785&quot; data-start=&quot;10727&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;That is where &lt;code data-end=&quot;10768&quot; data-start=&quot;10741&quot;&gt;standby query scn advance&lt;/code&gt; becomes visible.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;10879&quot; data-start=&quot;10787&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;So when someone says, “This query is slow only on standby,” do not immediately tune the SQL.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;10891&quot; data-start=&quot;10881&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;First ask:&lt;/span&gt;&lt;/p&gt;
&lt;ul data-end=&quot;11093&quot; data-start=&quot;10893&quot;&gt;
&lt;li data-end=&quot;10939&quot; data-section-id=&quot;10zq9zr&quot; data-start=&quot;10893&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
Is the query touching recently changed data?
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;10963&quot; data-section-id=&quot;x0gqns&quot; data-start=&quot;10940&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
Is apply lag present?
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;10991&quot; data-section-id=&quot;1328mkb&quot; data-start=&quot;10964&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
Is redo apply keeping up?
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;11045&quot; data-section-id=&quot;j7fm0i&quot; data-start=&quot;10992&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
Is the query waiting on standby consistency events?
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;11093&quot; data-section-id=&quot;t8qyp1&quot; data-start=&quot;11046&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
Is this workload suitable for standby at all?
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-end=&quot;11210&quot; data-start=&quot;11095&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Active Data Guard is excellent for stable reporting, historical reads, and offloading carefully selected workloads.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;11296&quot; data-start=&quot;11212&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;It is not always the right place for fresh, latency-sensitive transactional queries.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;11356&quot; data-start=&quot;11298&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The real DBA skill is not just enabling read-only standby.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;11511&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;11358&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;It is knowing which workload belongs there, which workload does not, and where the hidden cost of read consistency will appear under production pressure.&lt;/span&gt;&lt;/p&gt;</description><link>https://oracle-dba-help.blogspot.com/2026/11/why-same-sql-can-be-slower-on-active.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-7536975097924948263</guid><pubDate>Wed, 11 Nov 2026 12:17:00 +0000</pubDate><atom:updated>2026-11-12T00:10:02.572+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">19c</category><category domain="http://www.blogger.com/atom/ns#">Must Read</category><category domain="http://www.blogger.com/atom/ns#">Patching</category><title>OPatch -optimize: Dependency-Aware Conflict Handling</title><description>&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&amp;nbsp; &amp;nbsp;A patch conflict is rarely limited to two patch IDs. In a long-lived Oracle Home, an installed one-off may be the base for an overlay, and another patch may depend on that overlay. Replacing the first patch can therefore create a chain of rollback dependencies that OPatch must process in the correct order.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The &lt;code style=&quot;font-family: courier;&quot;&gt;-optimize&lt;/code&gt; option is designed for this situation. When a supported OPatch version detects that an incoming patch conflicts with an installed patch, it can calculate the dependency-aware sequence, roll back the conflicting patch and its installed dependents recursively, and then continue with the incoming patch.&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;That automation is useful, but it changes more than the patch that originally appeared in the conflict report. The DBA still needs to confirm which fixes were removed, whether replacement overlays are required, and whether the final Oracle Home contains the intended patch level.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Why Ordinary Conflict Handling Can Become Complicated&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Consider an example Oracle Home with the following patch relationships:&lt;/p&gt;

&lt;ul&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Patch &lt;strong&gt;A&lt;/strong&gt; is already installed.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Overlay patch &lt;strong&gt;B&lt;/strong&gt; depends on patch A.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Incoming patch &lt;strong&gt;C&lt;/strong&gt; conflicts with patch A.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Patch A cannot simply be removed while patch B still depends on it. A manual approach requires the DBA to identify the dependency chain, roll back B before A, apply C, and then determine whether a version of B exists for the new patch level. Missing one relationship can leave the patch session blocked or, worse, remove a fix without it being noticed during validation.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;What OPatch -optimize Actually Does&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;With &lt;code style=&quot;font-family: courier;&quot;&gt;opatch apply -optimize&lt;/code&gt;, OPatch evaluates the installed patch relationships instead of treating the first conflict as an isolated event. Where the option is supported and applicable, OPatch can:&lt;/p&gt;

&lt;ul&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Identify the installed patch or patches that conflict with the incoming patch.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Discover installed patches that depend on those conflicting patches.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Roll back the dependent patches recursively in a valid order.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Roll back the original conflicting patches.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Continue with the application of the incoming patch.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;strong&gt;The option resolves the patching sequence; it does not create a merge patch.&lt;/strong&gt; If a dependent one-off is rolled back and its fix is not included in the incoming patch, that fix may no longer be present in the Oracle Home. A replacement overlay or merge may still need to be obtained from Oracle Support.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Confirm That Your OPatch Build Supports It&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;OPatch capabilities belong to the OPatch utility installed in the Oracle Home, not simply to the database release. Two Oracle 19c homes can carry different OPatch builds. Before including &lt;code style=&quot;font-family: courier;&quot;&gt;-optimize&lt;/code&gt; in a runbook or automation workflow, verify the exact utility that will execute the patch.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;export ORACLE_HOME=/u01/app/oracle/product/19c/dbhome_1
export PATH=&quot;$ORACLE_HOME/OPatch:$PATH&quot;

opatch version
opatch apply -help | grep -i optimize
opatch lsinventory -detail &amp;gt; /path/to/evidence/lsinventory.before.txt&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;If the installed help does not list &lt;code style=&quot;font-family: courier;&quot;&gt;-optimize&lt;/code&gt;, do not assume that the syntax is accepted. Check the minimum OPatch version in the patch README and update OPatch using the release- and platform-appropriate Patch 6880880 package where required.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Analyze the Patch Graph Before Applying&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Automation should not make the rollback set a surprise. First run the detailed conflict prerequisite check against the incoming patch. Once the conflicting patch IDs are known, check whether other installed patches depend on them.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;# Check the incoming patch against the current Oracle Home
opatch prereq CheckConflictAgainstOHWithDetail \
  -ph /path/to/PATCH_ID

# Run this for each installed patch identified as a rollback candidate
opatch prereq CheckPatchRollbackDependents \
  -id CONFLICTING_PATCH_ID&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The first command reports conflicts and supersets between the incoming patch and the current Oracle Home. The second checks whether rolling back an installed candidate affects dependent patches. Save both outputs with the change evidence. They provide the basis for deciding whether &lt;code style=&quot;font-family: courier;&quot;&gt;-optimize&lt;/code&gt; is appropriate or whether Oracle Support should supply a merge or replacement overlay first.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Applying the Patch&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;After completing the normal patch README prerequisites, stopping the required services, confirming backups or a recoverable Oracle Home, and testing the sequence in a representative environment, the apply operation is straightforward:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;cd /path/to/PATCH_ID
opatch apply -optimize&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Do not combine &lt;code style=&quot;font-family: courier;&quot;&gt;-optimize&lt;/code&gt; with &lt;code style=&quot;font-family: courier;&quot;&gt;-force&lt;/code&gt; or &lt;code style=&quot;font-family: courier;&quot;&gt;-force_conflict&lt;/code&gt;; these modes are mutually exclusive. Also, do not replace a patch README instruction to use &lt;code style=&quot;font-family: courier;&quot;&gt;opatchauto&lt;/code&gt; with this command. Grid Infrastructure system patches and other orchestrated patch bundles may require OPatchAuto because service control, rolling behavior, and multiple Oracle Homes must be coordinated.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;A Special Case: Singleton Against Composite&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A notable boundary condition occurs when the incoming patch is a singleton and its conflict is with a patch contained inside an installed composite patch. OPatch may skip the incoming singleton instead of dismantling the composite patch.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This is why the final console line is not enough. Review the OPatch log for skipped or inactive patches and compare the post-patch inventory with the approved patch plan. A successful OPatch session does not prove that every requested patch was installed.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;-optimize vs&amp;nbsp; -force&amp;nbsp; Option&lt;/h2&gt;

&lt;div style=&quot;overflow-x: auto;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; width: 100%;&quot;&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px; text-align: left;&quot;&gt;Option&lt;/th&gt;
      &lt;th style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px; text-align: left;&quot;&gt;Primary behavior&lt;/th&gt;
      &lt;th style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px; text-align: left;&quot;&gt;DBA concern&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;-optimize&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;Processes conflicting patches together with their installed dependents recursively.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;Confirm that fixes removed with dependent patches are retained or replaced.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;-force&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;Removes conflicting installed patches so the incoming patch can be applied.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;It is not a substitute for understanding dependency and fix coverage.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;-force_conflict&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;Overrides conflict behavior for a silent apply and removes conflicting patches.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;Oracle documents it as meaningful with &lt;code style=&quot;font-family: courier;&quot;&gt;-silent&lt;/code&gt;; it cannot be combined with &lt;code style=&quot;font-family: courier;&quot;&gt;-optimize&lt;/code&gt;.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Post-Patch Validation Is the Real Completion Point&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Validation must answer two separate questions: did the incoming patch install, and did the Oracle Home lose any required fix while OPatch resolved the dependency chain? Capture the new inventory and compare it with the approved before-state.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;opatch lsinventory -detail &amp;gt; /path/to/evidence/lsinventory.after.txt
opatch lspatches

# Run only when required by the patch README, after starting the databases
$ORACLE_HOME/OPatch/datapatch -verbose

# Database-side SQL patch verification
sqlplus / as sysdba

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; patch_id,
       patch_type,
       action,
       status,
       action_time
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; dba_registry_sqlpatch
&lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; action_time;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Follow the patch README for &lt;code style=&quot;font-family: courier;&quot;&gt;datapatch&lt;/code&gt; requirements and PDB state. Then verify component status, database and listener startup, RAC or Data Guard health where applicable, application smoke tests, and the specific defect or behavior that justified each one-off patch. Inventory consistency is necessary, but service validation proves that the maintenance achieved its operational objective.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;When an Out-of-Place Home Is the Better Decision&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The more one-offs, overlays, and historical rollbacks an Oracle Home contains, the harder it becomes to reason about in-place mutation. Oracle recommends out-of-place patching for current database maintenance because a prepared and tested target home gives a cleaner fallback and avoids modifying the only working home during the maintenance window.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Use &lt;code style=&quot;font-family: courier;&quot;&gt;-optimize&lt;/code&gt; when an in-place patch must resolve a known dependency chain and the resulting fix set has been reviewed. For a complicated or poorly understood patch history, building and validating a new Oracle Home may reduce operational risk more effectively than automating a large recursive rollback.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Quick Takeaways&lt;/h2&gt;

&lt;ul&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;-optimize&lt;/code&gt; makes conflict handling aware of installed patch dependencies.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Dependent patches can be rolled back recursively before the original conflicting patch.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A rolled-back dependent fix is not automatically replaced unless the incoming patch includes it or a compatible overlay is applied.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The option cannot be combined with &lt;code style=&quot;font-family: courier;&quot;&gt;-force&lt;/code&gt; or &lt;code style=&quot;font-family: courier;&quot;&gt;-force_conflict&lt;/code&gt;.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Verify support using &lt;code style=&quot;font-family: courier;&quot;&gt;opatch apply -help&lt;/code&gt; from the exact Oracle Home.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Treat skipped patches, final inventory, SQL patch status, and application behavior as separate validation checks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The value of &lt;code style=&quot;font-family: courier;&quot;&gt;opatch apply -optimize&lt;/code&gt; is not that it makes patch conflicts harmless. Its value is that it understands the dependency chain that can make a manual rollback sequence difficult and error-prone. By recursively removing installed dependents before their conflicting base patches, OPatch can prepare the Oracle Home for the incoming patch with less manual sequencing.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The DBA still owns the outcome. Record the pre-patch inventory, examine the conflict and rollback-dependency checks, confirm which fixes will disappear, and obtain replacement overlays where necessary. After the apply, validate both the binary and SQL inventories and test the services that rely on the removed fixes. If the Oracle Home has accumulated a complex patch history, use the conflict analysis as a signal to consider an out-of-place, gold-image-based maintenance approach instead.&lt;/p&gt;

&lt;br /&gt;&lt;br /&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Official References&amp;nbsp;&lt;/h2&gt;

&lt;ul&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;a href=&quot;https://docs.oracle.com/cd/E73210_01/OPTCH/GUID-B4E408A8-C217-4BE1-B193-15F58D5B5355.htm&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;Oracle OPatch Syntax and Commands&lt;/a&gt;&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;a href=&quot;https://docs.oracle.com/en/database/oracle/oracle-database/26/dbptc/index.html&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;Oracle AI Database Patch Maintenance Guidelines&lt;/a&gt;&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;a href=&quot;https://support.oracle.com/rs?id=1321267.1&amp;amp;type=doc&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;Database Patch Conflict Resolution (My Oracle Support Doc ID 1321267.1)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwKBTUS_X_YDIYmUyP2nnbgay2cn-O_Ngz_1CFW_xC8aLYXXT0P4T7uD71nydm8z-mqbyCJGpN1qjRb14ARVWQa3DOTWWB9PPmS0denueiAWhB9vJlwzjnoN62PwTDqFqGWxWaXmyq9ONYZLg9ZegI5p-g-iR4snB_UY1qviaCqeziUbgbTjXrgc06P1E/s1800/opatch-optimize-dependency-resolution.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1000&quot; data-original-width=&quot;1800&quot; height=&quot;560&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwKBTUS_X_YDIYmUyP2nnbgay2cn-O_Ngz_1CFW_xC8aLYXXT0P4T7uD71nydm8z-mqbyCJGpN1qjRb14ARVWQa3DOTWWB9PPmS0denueiAWhB9vJlwzjnoN62PwTDqFqGWxWaXmyq9ONYZLg9ZegI5p-g-iR4snB_UY1qviaCqeziUbgbTjXrgc06P1E/w1006-h560/opatch-optimize-dependency-resolution.png&quot; width=&quot;1006&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
</description><link>https://oracle-dba-help.blogspot.com/2026/08/opatch-optimize-dependency-aware.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwKBTUS_X_YDIYmUyP2nnbgay2cn-O_Ngz_1CFW_xC8aLYXXT0P4T7uD71nydm8z-mqbyCJGpN1qjRb14ARVWQa3DOTWWB9PPmS0denueiAWhB9vJlwzjnoN62PwTDqFqGWxWaXmyq9ONYZLg9ZegI5p-g-iR4snB_UY1qviaCqeziUbgbTjXrgc06P1E/s72-w1006-h560-c/opatch-optimize-dependency-resolution.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-521801090531378317</guid><pubDate>Sat, 31 Oct 2026 02:59:00 +0000</pubDate><atom:updated>2026-10-31T10:59:00.113+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">PostgreSQL</category><title>PostgreSQL MVCC in Production: Beyond Nonblocking Reads</title><description>&lt;h1 style=&quot;color: #263238; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: xx-large;&quot;&gt;&lt;span style=&quot;font-size: large; font-weight: normal;&quot;&gt;&amp;nbsp; An update-heavy PostgreSQL table can remain available while quietly becoming more expensive to operate. Transactions continue to commit, application response times initially look acceptable, and no major lock queue is visible. Meanwhile, the table grows, index scans perform more heap fetches, autovacuum runs repeatedly, and storage consumption refuses to settle.&lt;/span&gt;&lt;/h1&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The underlying issue is often not a single slow query. It is the lifecycle of row versions created by Multi-Version Concurrency Control, commonly known as MVCC.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;MVCC is the reason PostgreSQL can provide consistent reads while other sessions modify the same tables. It is also the reason PostgreSQL needs vacuuming, transaction-age monitoring and careful handling of long-running snapshots. Understanding only the concurrency benefit gives an incomplete operational picture. A production DBA also needs to understand where old versions remain, when they can be removed, and what prevents that cleanup.&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-size: x-large;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;Why MVCC Matters in Production&lt;/span&gt;&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Without MVCC, a reporting query reading a table might need to wait while another transaction updates it. PostgreSQL takes a different approach. Each statement reads from a transactionally consistent snapshot and sees only the row versions that are valid for that snapshot.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This allows normal reads and writes to proceed concurrently. It does not mean PostgreSQL is lock-free. Two sessions updating the same row can still block each other, explicit row locks still matter, and DDL may request locks that conflict with application traffic.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;MVCC therefore provides two operational outcomes:&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;Better concurrency because readers normally do not wait for writers.&lt;/li&gt;
  &lt;li&gt;Additional maintenance because obsolete row versions must eventually be cleaned.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;What an UPDATE Really Does&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A PostgreSQL row should not be viewed as one physical object that is continuously overwritten. On a normal heap table, an &lt;code style=&quot;font-family: courier;&quot;&gt;UPDATE&lt;/code&gt; creates a successor tuple containing the new values. The older version remains available while an active snapshot may still need it.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;PostgreSQL stores transaction visibility information in system columns:&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;xmin&lt;/code&gt; identifies the transaction that created the tuple version.&lt;/li&gt;
  &lt;li&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;xmax&lt;/code&gt; contains transaction information related to deletion, supersession or row locking.&lt;/li&gt;
  &lt;li&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;ctid&lt;/code&gt; identifies the physical location of that particular tuple version.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;These columns are useful for controlled troubleshooting, but they are not application keys. An update can change &lt;code style=&quot;font-family: courier;&quot;&gt;ctid&lt;/code&gt;, transaction IDs eventually wrap, and a nonzero &lt;code style=&quot;font-family: courier;&quot;&gt;xmax&lt;/code&gt; does not automatically mean that a visible tuple is dead.&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Add PostgreSQL row-version lifecycle image here--&gt;
&lt;/div&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;A Two-Session MVCC Test&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The following test demonstrates the behaviour more clearly than a definition. Run the marked sections from two separate PostgreSQL sessions.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #6272a4;&quot;&gt;-- Initial setup&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;CREATE TABLE&lt;/span&gt; mvcc_account_demo
(
    account_id &lt;span style=&quot;color: #8be9fd;&quot;&gt;bigint&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;PRIMARY KEY&lt;/span&gt;,
    balance    &lt;span style=&quot;color: #8be9fd;&quot;&gt;numeric&lt;/span&gt;(12,2) &lt;span style=&quot;color: #ff79c6;&quot;&gt;NOT NULL&lt;/span&gt;
);

&lt;span style=&quot;color: #ff79c6;&quot;&gt;INSERT INTO&lt;/span&gt; mvcc_account_demo &lt;span style=&quot;color: #ff79c6;&quot;&gt;VALUES&lt;/span&gt; (1001, 1000.00);

&lt;span style=&quot;color: #6272a4;&quot;&gt;-- Session A&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;BEGIN&lt;/span&gt;;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;UPDATE&lt;/span&gt; mvcc_account_demo &lt;span style=&quot;color: #ff79c6;&quot;&gt;SET&lt;/span&gt; balance = 900.00 &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; account_id = 1001;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; ctid, xmin, xmax, account_id, balance &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; mvcc_account_demo &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; account_id = 1001;

&lt;span style=&quot;color: #6272a4;&quot;&gt;-- Session B, before Session A commits&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; ctid, xmin, xmax, account_id, balance &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; mvcc_account_demo &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; account_id = 1001;

&lt;span style=&quot;color: #6272a4;&quot;&gt;-- Session A&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;COMMIT&lt;/span&gt;;

&lt;span style=&quot;color: #6272a4;&quot;&gt;-- Session B, run as a new statement&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; ctid, xmin, xmax, account_id, balance &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; mvcc_account_demo &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; account_id = 1001;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Session A sees its uncommitted balance of 900.00. Before the commit, Session B continues to see the previously committed value of 1000.00 without waiting. After Session A commits, a new statement in Session B sees 900.00.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The same logical account row temporarily has more than one physical version, but each session sees the version permitted by its snapshot.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMUE-ugX_gsUH7NUpETDQOZqrkyQM5X_qPM-T0xZ2Qzcr3fhLBOe2II8EV-mw9Ff2jaShz_S-v7ZFarPbWxTHuQmmhDnnxqdJYpCsLUHdFiHkV20ugeciiVIwdyP5PTqKtDXAGZtiP-cFaWiwBzeHS6bQbw_7bKiDGR1HYtMRR-6fK-8K8tGXMusqLPqM/s1800/postgresql-row-version-lifecycle.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1000&quot; data-original-width=&quot;1800&quot; height=&quot;499&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMUE-ugX_gsUH7NUpETDQOZqrkyQM5X_qPM-T0xZ2Qzcr3fhLBOe2II8EV-mw9Ff2jaShz_S-v7ZFarPbWxTHuQmmhDnnxqdJYpCsLUHdFiHkV20ugeciiVIwdyP5PTqKtDXAGZtiP-cFaWiwBzeHS6bQbw_7bKiDGR1HYtMRR-6fK-8K8tGXMusqLPqM/w897-h499/postgresql-row-version-lifecycle.png&quot; width=&quot;897&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Isolation Level Changes the Snapshot&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Read Committed&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;READ COMMITTED&lt;/code&gt; is PostgreSQL&#39;s default isolation level. Each statement receives a new snapshot. Two queries inside the same transaction can therefore return different committed results if another session commits between them.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This behavior is suitable for most short OLTP transactions. It can be unsuitable for a report that runs several queries and expects all totals to represent the same point in time.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Repeatable Read&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;REPEATABLE READ&lt;/code&gt; retains a stable transaction snapshot after it is established. It is useful for multi-query reports, but keeping that snapshot open for hours can prevent vacuum from removing older row versions.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;An updating repeatable-read transaction may fail with &lt;code style=&quot;font-family: courier;&quot;&gt;could not serialize access due to concurrent update&lt;/code&gt;. The application must roll back and retry the complete transaction.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Serializable&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;SERIALIZABLE&lt;/code&gt; adds protection against transaction combinations that could produce a result inconsistent with serial execution. It is useful when a business rule spans several rows and cannot be enforced through one atomic statement or constraint.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Applications using this level must handle SQLSTATE &lt;code style=&quot;font-family: courier;&quot;&gt;40001&lt;/code&gt; and retry the entire transaction. Increasing the isolation level without implementing retry logic is an incomplete design.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Where Blocking Still Happens&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;MVCC separates normal reads from writes, but it cannot allow incompatible changes to proceed without coordination. Blocking remains possible when:&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;Two transactions update or delete the same row.&lt;/li&gt;
  &lt;li&gt;A query uses &lt;code style=&quot;font-family: courier;&quot;&gt;SELECT FOR UPDATE&lt;/code&gt; or &lt;code style=&quot;font-family: courier;&quot;&gt;SELECT FOR SHARE&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;A unique or foreign-key check encounters an uncommitted conflicting change.&lt;/li&gt;
  &lt;li&gt;Transactions acquire rows or objects in different orders and deadlock.&lt;/li&gt;
  &lt;li&gt;DDL requests a table lock that conflicts with active sessions.&lt;/li&gt;
  &lt;li&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;TRUNCATE&lt;/code&gt; or &lt;code style=&quot;font-family: courier;&quot;&gt;VACUUM FULL&lt;/code&gt; requires an &lt;code style=&quot;font-family: courier;&quot;&gt;ACCESS EXCLUSIVE&lt;/code&gt; lock.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;In a payment transfer, MVCC alone does not validate the business rule. The application still needs atomic debit logic, deterministic locking, rollback handling and protection against submitting the same transfer twice.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Vacuum Is the Other Half of MVCC&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;An old tuple becomes dead only after PostgreSQL determines that no relevant snapshot can see it. The storage occupied by that tuple must then be made reusable.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Standard &lt;code style=&quot;font-family: courier;&quot;&gt;VACUUM&lt;/code&gt; performs several jobs:&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;Makes obsolete tuple space available for reuse.&lt;/li&gt;
  &lt;li&gt;Cleans dead index entries when required.&lt;/li&gt;
  &lt;li&gt;Updates the visibility map, which can improve index-only scans.&lt;/li&gt;
  &lt;li&gt;Freezes old tuple metadata to prevent transaction ID wraparound.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A regular vacuum normally does not shrink the table file. It creates reusable space inside the relation. &lt;code style=&quot;font-family: courier;&quot;&gt;VACUUM FULL&lt;/code&gt; rewrites and compacts the table, but it requires additional working space and an exclusive lock. It should not become routine maintenance for a table whose autovacuum settings are ineffective.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Autovacuum activity also produces I/O and WAL. The aim is not to make vacuum invisible. The aim is to run it frequently enough that cleanup remains manageable and predictable.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Add dead tuples and autovacuum flow image here--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;A Practical MVCC Health Check&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The following grouped checks cover dead tuples, old transaction horizons, active vacuum work and lock blockers. Visibility into other users&#39; full session details may require the &lt;code style=&quot;font-family: courier;&quot;&gt;pg_read_all_stats&lt;/code&gt; role or equivalent privileges.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #6272a4;&quot;&gt;-- Tables with high estimated dead-tuple volume&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt;
    schemaname,
    relname,
    n_live_tup,
    n_dead_tup,
    round(
        100.0 * n_dead_tup /
        greatest(n_live_tup + n_dead_tup, 1),
        2
    ) &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; estimated_dead_pct,
    last_autovacuum,
    autovacuum_count,
    n_tup_upd,
    n_tup_hot_upd
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; pg_stat_user_tables
&lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; n_dead_tup &lt;span style=&quot;color: #ff79c6;&quot;&gt;DESC&lt;/span&gt;;

&lt;span style=&quot;color: #6272a4;&quot;&gt;-- Long transactions and retained cleanup horizons&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt;
pid,
usename,
application_name,
client_addr,
state,
now() - xact_start &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; transaction_age,
backend_xid,
backend_xmin,
wait_event_type,
wait_event,
left(query, 150) &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; query &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; pg_stat_activity &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; xact_start &lt;span style=&quot;color: #ff79c6;&quot;&gt;IS NOT&lt;/span&gt; &lt;span style=&quot;color: #8be9fd;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; xact_start;

&lt;span style=&quot;color: #6272a4;&quot;&gt;-- Current vacuum progress&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt;
pid,
datname,
relid::regclass &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; table_name,
phase,
heap_blks_scanned,
heap_blks_total &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; pg_stat_progress_vacuum;

&lt;span style=&quot;color: #6272a4;&quot;&gt;-- Waiting sessions and their blocker PIDs&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt;
pid &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; waiting_pid,
pg_blocking_pids(pid) &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; blocking_pids,
wait_event_type,
wait_event,
left(query, 150) &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; waiting_query &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; pg_stat_activity &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; cardinality(pg_blocking_pids(pid)) &amp;gt; 0;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;n_dead_tup&lt;/code&gt; is an estimate, not an exact measurement of bloat. Use it for trending and candidate identification. A high value becomes more meaningful when combined with table growth, vacuum history, update volume and an old &lt;code style=&quot;font-family: courier;&quot;&gt;backend_xmin&lt;/code&gt;.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Common Production Failure Patterns&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Autovacuum Is Running but Cannot Clean&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Seeing an autovacuum worker does not prove that useful space is being reclaimed. An active query, transaction-wide snapshot, prepared transaction or replication slot may retain a cleanup horizon older than the tuples being examined.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Idle in Transaction Connections&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;An abandoned transaction can retain locks, an XID or a snapshot horizon. However, not every session marked &lt;code style=&quot;font-family: courier;&quot;&gt;idle in transaction&lt;/code&gt; is automatically blocking vacuum. Check &lt;code style=&quot;font-family: courier;&quot;&gt;backend_xid&lt;/code&gt;, &lt;code style=&quot;font-family: courier;&quot;&gt;backend_xmin&lt;/code&gt;, held locks and the isolation level before drawing that conclusion.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;High-Churn Tables Reach the Threshold Too Late&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A percentage-based autovacuum threshold can become too large for a table containing hundreds of millions of rows. By the time the threshold is reached, the table may already contain a significant volume of dead tuples. Such tables often need lower per-table scale factors rather than aggressive cluster-wide settings.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Standby Queries Conflict With Recovery&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A long report on a standby may require versions that WAL replay needs to remove. PostgreSQL can delay replay, cancel the standby query, or use &lt;code style=&quot;font-family: courier;&quot;&gt;hot_standby_feedback&lt;/code&gt; to preserve required versions on the primary.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Feedback can reduce query cancellations, but delayed cleanup may increase bloat on the primary. Replica lag, standby conflicts and primary table growth must be monitored together.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Tuning Update-Heavy Tables&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;PostgreSQL can perform a Heap-Only Tuple, or HOT, update when the modified columns do not require normal index changes and the successor tuple fits on the same heap page. HOT updates reduce index write amplification, but they do not eliminate dead tuples, WAL or vacuum work.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A lower fill factor may reserve page space for future versions. Autovacuum thresholds can also be adjusted for an individual high-churn table. The values below are starting examples and must be validated against the actual modification rate and I/O capacity.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #6272a4;&quot;&gt;-- Monitor the HOT update ratio&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt;
    schemaname,
    relname,
    n_tup_upd,
    n_tup_hot_upd,
    round(
        100.0 * n_tup_hot_upd /
        greatest(n_tup_upd, 1),
        2
    ) &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; hot_update_pct
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; pg_stat_user_tables
&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; n_tup_upd &amp;gt; 0
&lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; n_tup_upd &lt;span style=&quot;color: #ff79c6;&quot;&gt;DESC&lt;/span&gt;;

&lt;span style=&quot;color: #6272a4;&quot;&gt;-- Example settings for a large update-heavy table&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER TABLE&lt;/span&gt; bank.accounts &lt;span style=&quot;color: #ff79c6;&quot;&gt;SET&lt;/span&gt;
(
fillfactor = 85,
autovacuum_vacuum_scale_factor = 0.02,
autovacuum_vacuum_threshold = 5000,
autovacuum_analyze_scale_factor = 0.02,
autovacuum_analyze_threshold = 5000
);

&lt;span style=&quot;color: #6272a4;&quot;&gt;-- Manual maintenance when measurements justify it&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;VACUUM&lt;/span&gt; (VERBOSE, ANALYZE) bank.accounts;

&lt;span style=&quot;color: #6272a4;&quot;&gt;-- Protect an application role from abandoned transactions&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER ROLE&lt;/span&gt; application_user &lt;span style=&quot;color: #ff79c6;&quot;&gt;SET&lt;/span&gt; idle_in_transaction_session_timeout = &lt;span style=&quot;color: #f1fa8c;&quot;&gt;&#39;5min&#39;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Changing &lt;code style=&quot;font-family: courier;&quot;&gt;fillfactor&lt;/code&gt; does not immediately reorganize existing pages. Role-level timeout changes apply to new sessions. Test both changes with the application before applying them to production.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Oracle and PostgreSQL Use Different MVCC Machinery&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle and PostgreSQL both provide multiversion read consistency, but the old versions are managed differently. This distinction is particularly useful for Oracle DBAs moving into PostgreSQL operations.&lt;/p&gt;

&lt;table style=&quot;border-collapse: collapse; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal; width: 100%;&quot;&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Area&lt;/th&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;PostgreSQL&lt;/th&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Oracle&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Update handling&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Creates a successor tuple version in the heap.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Modifies the data block and records information in undo.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Consistent read&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Selects the tuple version visible to the transaction snapshot.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Uses undo to reconstruct an earlier block image when required.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Cleanup concern&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Dead tuples, vacuum effectiveness and table or index bloat.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Undo retention, undo pressure and reusable undo space.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Long-query risk&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Delayed cleanup and relation growth. Standby queries may be cancelled by recovery conflicts.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;ORA-01555 when required undo is no longer available.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Background maintenance&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Autovacuum, analyze and tuple freezing.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Automatic undo management.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Same-row changes&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Writers can block other writers.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Writers can block other writers.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;An Oracle DBA investigating consistent-read trouble naturally checks undo retention. In PostgreSQL, the first checks are usually old snapshots, transaction horizons, dead tuples, vacuum history and replication slots.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjykmf-Qy5o_q97sTSUJQgM9cPosLCutm-f-UQT1HKtE7mttbpk2fHY2YSiaE96Ef7Zi6J4h67J6eJbCQctubnqXNgwkoy0dFrGU3awYj_wz6UIGIVlve9LTTHUsmqVaH8zPlQcUqeyRXHPQI8Ddb04tXe99FMc_pETHZ34WnzCXj6M5Fy4guj0j5R-ees/s1800/oracle-vs-postgresql-mvcc.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1000&quot; data-original-width=&quot;1800&quot; height=&quot;495&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjykmf-Qy5o_q97sTSUJQgM9cPosLCutm-f-UQT1HKtE7mttbpk2fHY2YSiaE96Ef7Zi6J4h67J6eJbCQctubnqXNgwkoy0dFrGU3awYj_wz6UIGIVlve9LTTHUsmqVaH8zPlQcUqeyRXHPQI8Ddb04tXe99FMc_pETHZ34WnzCXj6M5Fy4guj0j5R-ees/w888-h495/oracle-vs-postgresql-mvcc.png&quot; width=&quot;888&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Mini Case Study: Vacuum Was Running but Bloat Continued&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A payment-status table received continuous updates. Autovacuum workers were visible, but the table and its indexes continued growing. Query latency also increased as the workload progressed.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Root Cause :&amp;nbsp;&lt;span style=&quot;font-weight: normal;&quot;&gt;A reporting connection had retained an old repeatable-read snapshot. Autovacuum could scan the table, but it could not remove versions still visible to that transaction. The table&#39;s default scale factor also allowed a large number of obsolete tuples to accumulate before each vacuum started.&lt;/span&gt;&lt;/h3&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Resolution :&amp;nbsp;&lt;span style=&quot;font-weight: normal;&quot;&gt;After confirming that the report was abandoned, the old session was ended through the normal production process. A standard vacuum and analyze were run, table-level autovacuum thresholds were reduced, and the reporting role received an appropriate transaction timeout.&lt;/span&gt;&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The table file did not immediately shrink, which was expected. The reclaimed space became reusable, dead-tuple growth slowed, and relation size eventually stabilized. The important finding was that an active autovacuum worker is not proof that cleanup can advance.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Lessons&amp;nbsp;&lt;/h2&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;Monitor transaction age together with &lt;code style=&quot;font-family: courier;&quot;&gt;backend_xmin&lt;/code&gt;. Age alone does not prove that a session is holding back vacuum.&lt;/li&gt;
  &lt;li&gt;Do not disable autovacuum because it creates I/O. Determine why it cannot keep up and tune the affected tables.&lt;/li&gt;
  &lt;li&gt;Use &lt;code style=&quot;font-family: courier;&quot;&gt;VACUUM FULL&lt;/code&gt; only after considering its lock, duration and additional disk requirements.&lt;/li&gt;
  &lt;li&gt;Review high-churn tables separately. Cluster defaults are rarely ideal for every relation.&lt;/li&gt;
  &lt;li&gt;Track HOT update ratios after adding indexes to frequently modified columns.&lt;/li&gt;
  &lt;li&gt;Set transaction policies for reporting applications rather than allowing unlimited snapshots.&lt;/li&gt;
  &lt;li&gt;On replicas, monitor recovery conflicts, replay lag and primary bloat as one operational trade-off.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Frequently Asked Questions&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Why are dead tuples still high after autovacuum?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Vacuum may be blocked by an old snapshot horizon, or it may not have completed enough cleanup. Check &lt;code style=&quot;font-family: courier;&quot;&gt;backend_xmin&lt;/code&gt;, prepared transactions, replication slots, autovacuum logs and &lt;code style=&quot;font-family: courier;&quot;&gt;pg_stat_progress_vacuum&lt;/code&gt;.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Does regular VACUUM reduce the physical table size?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Usually not. It makes internal space reusable. Returning substantial space to the operating system requires a rewrite operation, which must be planned for its locking and storage impact.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Can MVCC prevent deadlocks?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;No. Transactions can deadlock when they acquire rows or objects in different orders. Keep transactions short and use a consistent access order.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Should reporting transactions always use Repeatable Read?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Only when several statements genuinely need the same snapshot. Long repeatable-read transactions can retain old versions and increase cleanup pressure.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Should I lower the autovacuum scale factor for every table?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;No. Lower values start vacuum earlier but also consume more worker time and I/O. Apply table-level settings where modification volume and cleanup trends justify them.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;MVCC is often explained as the feature that stops readers from blocking writers. That description is correct, but it leaves out the part DBAs spend most of their time managing.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Every update begins a lifecycle. PostgreSQL creates a new tuple version, transaction snapshots decide which version each session can see, and vacuum eventually reclaims versions that are no longer required. When cleanup falls behind, the symptoms may appear as table growth, index overhead, replica conflicts, excessive WAL or deteriorating query performance rather than an obvious lock wait.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;There is no single MVCC tuning parameter. Healthy operation depends on short transactions, effective autovacuum settings, controlled reporting snapshots, suitable table design and correct application retry logic.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Start with the tables receiving the most updates. Compare total updates with HOT updates, review dead-tuple trends, identify old transaction horizons, and verify that vacuum is making progress rather than simply appearing in the process list. MVCC provides excellent concurrency, but its cleanup path deserves the same attention as its read consistency.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Further Reading&lt;/h2&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/mvcc-intro.html&quot;&gt;PostgreSQL MVCC Introduction&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/transaction-iso.html&quot;&gt;PostgreSQL Transaction Isolation&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/routine-vacuuming.html&quot;&gt;PostgreSQL Routine Vacuuming&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/storage-hot.html&quot;&gt;PostgreSQL Heap-Only Tuples&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;!--SEO search description: PostgreSQL MVCC explained through row versions, vacuum, blocking, bloat, isolation levels and practical DBA monitoring.--&gt;
</description><link>https://oracle-dba-help.blogspot.com/2026/10/postgresql-mvcc-in-production-beyond.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMUE-ugX_gsUH7NUpETDQOZqrkyQM5X_qPM-T0xZ2Qzcr3fhLBOe2II8EV-mw9Ff2jaShz_S-v7ZFarPbWxTHuQmmhDnnxqdJYpCsLUHdFiHkV20ugeciiVIwdyP5PTqKtDXAGZtiP-cFaWiwBzeHS6bQbw_7bKiDGR1HYtMRR-6fK-8K8tGXMusqLPqM/s72-w897-h499-c/postgresql-row-version-lifecycle.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-2053637378045490051</guid><pubDate>Sat, 24 Oct 2026 09:38:00 +0000</pubDate><atom:updated>2026-10-24T17:38:00.121+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">RAC</category><category domain="http://www.blogger.com/atom/ns#">Tuning</category><title>High log file sync in Oracle RAC: When Redo Storage Is Not the Real Problem</title><description>&lt;!--Source basis: :contentReference[oaicite:0]{index=0}--&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp; When commit response time suddenly becomes poor, seeing &lt;/span&gt;&lt;code style=&quot;font-family: courier; font-weight: normal;&quot;&gt;log file sync&lt;/code&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt; near the top of an AWR report naturally sends a DBA toward redo I/O, ASM, and the underlying storage path.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;That is the right place to start, but not always the right place to stop.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A foreground session waiting on &lt;code style=&quot;font-family: courier;&quot;&gt;log file sync&lt;/code&gt; is waiting for its commit to complete. The physical redo write is only one part of that path. If LGWR cannot get CPU quickly enough, the application can experience slow commits even while redo writes themselves remain fast.&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The RAC case below is a good example of why Oracle wait events, operating-system scheduling, commit volume, and service placement need to be looked at together rather than independently.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;The production symptom&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The workload was running on a two-node Oracle Database 19c RAC cluster. During a busy period, the payment application started showing transaction response times roughly three to five seconds higher than normal.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;There was no RAC instance eviction, ASM was not reporting a storage problem, and synchronous Data Guard transport latency had not increased. The initial evidence looked like this:&lt;/p&gt;

&lt;table style=&quot;border-collapse: collapse; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; width: 100%;&quot;&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;th style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px; text-align: left;&quot;&gt;Observation&lt;/th&gt;
      &lt;th style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px; text-align: left;&quot;&gt;Finding&lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;log file sync&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;38 ms average; 62% of DB time&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;log file parallel write&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;1.4 ms average&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;Commits/sec&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;Increased from 12K to 25K&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;ASM write latency&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;Below 2 ms&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;Node 1 CPU&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;18%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;Node 2 CPU&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;95%; run queue 18–25 on 8 vCPUs&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;Service placement&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;Payment service runs only on node 2&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;Data Guard transport&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(204, 204, 204); padding: 8px;&quot;&gt;No increase in synchronous transport waits&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The tempting conclusion was that redo storage was slow because &lt;code style=&quot;font-family: courier;&quot;&gt;log file sync&lt;/code&gt; was dominating database time.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;But 1.4 ms for &lt;code style=&quot;font-family: courier;&quot;&gt;log file parallel write&lt;/code&gt; and sub-2 ms ASM latency did not fit that theory. The bigger clue was elsewhere: node 2 was almost fully consumed while node 1 had plenty of CPU available.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;The part of log file sync that is easy to miss&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A commit is not simply a foreground session issuing a disk write. There is coordination between the foreground process and LGWR.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A simplified commit path looks like this:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;Foreground session issues COMMIT
        |
        | (posts LGWR)&lt;br /&gt;&lt;/span&gt;&lt;pre style=&quot;line-height: 16.25px; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #eeeeee;&quot;&gt;↓&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;LGWR gets scheduled
        |
        | (processes the commit request)&lt;br /&gt;&lt;/span&gt;&lt;pre style=&quot;line-height: 16.25px; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;↓&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;LGWR writes redo
        |
        | (redo write completes)&lt;br /&gt;&lt;/span&gt;&lt;pre style=&quot;line-height: 16.25px; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;↓&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;LGWR posts completion
        &lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;↓&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;
Foreground session continues&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The foreground session measures the overall delay as &lt;code style=&quot;font-family: courier;&quot;&gt;log file sync&lt;/code&gt;. That can include the time needed to notify LGWR, LGWR scheduling delay, batching or queueing, the actual redo write, and the completion notification back to the foreground session.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;log file parallel write&lt;/code&gt; is different. It is associated with the redo write operation seen by LGWR and is therefore a useful indicator when checking whether redo I/O itself is slow.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The two events are related, but they are not two copies of the same timer.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;So when foreground commits are taking around 38 ms while LGWR redo writes are around 1.4 ms, there is roughly 36 ms of additional time that needs explaining. That difference does not automatically prove CPU starvation, but it is enough to stop treating storage as the only suspect.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;In RAC, compare the instances before chasing database-wide averages&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;One of the first things I would do on RAC is separate the evidence by instance.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A database-wide average can easily hide an overloaded node. If instance 1 is healthy while instance 2 is struggling, looking only at cluster-level numbers makes the situation appear less severe than it really is.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;SET LINES 220
COL event FORMAT A30

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; inst_id,
event,
total_waits,
ROUND(time_waited_micro / 1000000, 2) AS total_wait_s,
ROUND(time_waited_micro / NULLIF(total_waits, 0) / 1000, 2) AS avg_wait_ms &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   gv$system_event &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt;  event IN (&#39;log file sync&#39;, &#39;log file parallel write&#39;)
ORDER BY inst_id, event;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; inst_id,
event,
wait_time_milli,
wait_count &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   gv$event_histogram &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt;  event IN (&#39;log file sync&#39;, &#39;log file parallel write&#39;)
ORDER BY inst_id, event, wait_time_milli;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;There is one important point with &lt;code style=&quot;font-family: courier;&quot;&gt;GV$SYSTEM_EVENT&lt;/code&gt;: these values are cumulative since instance startup. For a short incident, the lifetime average can be misleading.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Take two snapshots around the problem period and work with the delta. If AWR usage is licensed in your environment, the corresponding AWR interval can also provide the incident-specific view.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;I also like the event histogram here because averages can hide the tail. Two systems can both show an average commit latency of 10 ms while having very different distributions. One may consistently commit around 10 ms; another may have mostly fast commits mixed with a smaller number taking hundreds of milliseconds.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;The commit rate change was another important clue&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A high number of commits per second is not automatically a problem. Some payment, messaging, and event-driven applications naturally work with many small transactions.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;What matters is whether the workload changed.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;In this case the commit rate had moved from roughly 12,000 to 25,000 commits per second. That is large enough to ask what changed on the application side and whether the amount of redo increased at the same rate.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The following counters can be sampled twice, for example 60 seconds apart:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; inst_id,
       name,
       value
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   gv$sysstat
&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt;  name IN (&#39;user commits&#39;,
                &#39;user rollbacks&#39;,
                &#39;redo size&#39;,
                &#39;redo writes&#39;)
ORDER BY inst_id, name;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Take the difference between the two samples and divide by the collection interval. That gives a much more useful short-term rate than looking at the raw cumulative counters.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;I would also calculate redo bytes per commit. If commit frequency doubles while redo volume does not increase proportionally, the application may simply be creating many more small transactions.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;That is capable of putting significant pressure on the commit path without saturating the redo device.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;A common application pattern worth checking&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;One pattern worth discussing with the application team is a commit inside a tight processing loop:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;-- Expensive when each row does not need to be
-- an independent durable transaction

FOR r IN source_rows LOOP &lt;span style=&quot;color: #ff79c6;&quot;&gt;UPDATE&lt;/span&gt; payment_stage &lt;span style=&quot;color: #ff79c6;&quot;&gt;SET&lt;/span&gt;    processed_flag = &#39;Y&#39; &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt;  payment_id = r.payment_id;

COMMIT;
END LOOP;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The DBA should not blindly remove commits from application code. Transaction boundaries are part of application correctness and recovery behavior.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The useful DBA contribution is to show that commit frequency changed, quantify the database impact, and let the application owners determine whether every durability boundary is really required.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Find the service or module generating the pressure&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The next question is not just, “Which SQL is expensive?”&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Commit-heavy workloads are often made up of thousands of individually cheap calls. Looking only for a single SQL statement with high elapsed time may therefore miss the real pattern.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;If ASH is available and your environment is appropriately licensed, grouping activity by instance, service, module, action, SQL ID, and wait event gives a much better picture.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; ash.inst_id,
       NVL(svc.name, TO_CHAR(ash.service_hash)) AS service_name,
       NVL(ash.module, &#39;UNKNOWN&#39;) AS module,
       NVL(ash.action, &#39;UNKNOWN&#39;) AS action,
       ash.sql_id,
       ash.event,
       COUNT(*) AS samples
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   gv$active_session_history ash
       LEFT JOIN gv$active_services svc
         ON svc.inst_id = ash.inst_id
        AND svc.name_hash = ash.service_hash
&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt;  ash.sample_time &amp;gt;= SYSTIMESTAMP - INTERVAL &#39;15&#39; MINUTE
AND    (ash.event = &#39;log file sync&#39;
        OR ash.session_state = &#39;ON CPU&#39;)
GROUP BY ash.inst_id,
         NVL(svc.name, TO_CHAR(ash.service_hash)),
         NVL(ash.module, &#39;UNKNOWN&#39;),
         NVL(ash.action, &#39;UNKNOWN&#39;),
         ash.sql_id,
         ash.event
ORDER BY samples DESC
FETCH FIRST 30 ROWS ONLY;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;ASH is sampled activity, so I would not use it as a transaction counter. What it does very well is show where database activity accumulated during the incident.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Here the active samples were concentrated around the payment workload on instance 2. That lined up with the service configuration and the operating-system data.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;If Diagnostic Pack usage is not licensed, the same investigation can still be built from repeated samples of views such as &lt;code style=&quot;font-family: courier;&quot;&gt;GV$SESSION&lt;/code&gt;, &lt;code style=&quot;font-family: courier;&quot;&gt;GV$SYSTEM_EVENT&lt;/code&gt;, and &lt;code style=&quot;font-family: courier;&quot;&gt;GV$SYSSTAT&lt;/code&gt;, together with application monitoring and OS statistics.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;The operating system completed the picture&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;At this stage the Oracle evidence told us that the missing time was probably not in the physical redo write. The OS evidence was needed to understand where it was going.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Node 2 was around 95% CPU utilization. More importantly, the run queue was between 18 and 25 on a machine with only 8 vCPUs.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;That tells a different story from “the redo disk is slow.” There were simply more runnable processes than the CPUs could schedule promptly.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Identify LGWR first&lt;/h3&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;SET LINES 180
COL program FORMAT A45

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; inst_id,
spid,
program &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   gv$process &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt;  program LIKE &#39;%LGWR%&#39;
ORDER BY inst_id, spid;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Once the LGWR operating-system PID is known, correlate it with node-level scheduling data from the same incident window.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;# CPU utilisation, runnable processes and blocked processes
vmstat 1 60
sar -q 1 60

# Per-CPU utilisation, including iowait and steal

mpstat -P ALL 1 60

# Replace &lt;lgwr_pid&gt; with the SPID found in GV$PROCESS

pidstat -u -w -p &lt;lgwr_pid&gt; 1 60

# Check process/thread state and CPU placement

ps -eLo pid,tid,psr,pcpu,stat,comm,args | grep -E &#39;ora_lgwr|PID&#39;&lt;/lgwr_pid&gt;&lt;/lgwr_pid&gt;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The important correlation was that redo I/O remained fast while node 2 repeatedly showed CPU pressure and a long runnable queue. LGWR was not spending most of the missing time waiting for the redo device. It was competing with other runnable work for CPU.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;On a virtual machine, I would extend the same check to CPU steal time, VM throttling, host oversubscription, and any cgroup or container CPU limits. A database process can appear CPU-starved inside the guest even when the root cause is outside Oracle.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Why I would still check Data Guard&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Synchronous Data Guard transport can also sit directly in the commit path. If remote acknowledgement becomes slower, foreground commit latency may increase even when the local redo device is healthy.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For that reason, I would still compare synchronous redo transport waits, network behavior, standby health, and any recent protection-mode changes.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;In this case those waits had not increased. That helped rule out the standby and WAN path and kept the investigation focused on the local RAC node.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;The service placement made the imbalance worse&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This was not only a CPU problem. It was also a workload placement problem.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Node 1 was using around 18% CPU while node 2 was close to saturation, yet the payment service was running only on instance 2.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;That meant the most commit-sensitive workload in the cluster was concentrated on the node with the least CPU headroom.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;During an incident, relocating the service may therefore be a practical recovery option if the other node genuinely has capacity and the application is designed to tolerate the move.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;srvctl status service -db PAYDB -service PAY_SVC -verbose
srvctl config service -db PAYDB -service PAY_SVC

# Evaluate the relocation before executing it

srvctl relocate service -db PAYDB -service PAY_SVC 
-oldinst PAYDB2 -newinst PAYDB1 -eval -verbose

# Execute after application, capacity and change checks

srvctl relocate service -db PAYDB -service PAY_SVC 
-oldinst PAYDB2 -newinst PAYDB1 -drain_timeout 60 -verbose&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;I would not treat service relocation as a casual command to run whenever CPU becomes high. Check the target instance capacity, connection-pool behavior, drain requirements, and Application Continuity configuration where applicable.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Also remember that &lt;code style=&quot;font-family: courier;&quot;&gt;srvctl relocate service&lt;/code&gt; is a runtime relocation. If the preferred and available instance design is wrong, that policy still needs to be corrected separately.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;What I would do during the incident&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The immediate objective is to bring commit latency back under control. Application redesign can come later.&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;Reduce or pause the newly increased commit-heavy workload if operationally possible.&lt;/li&gt;
  &lt;li&gt;Identify other CPU consumers on node 2 and remove avoidable contention.&lt;/li&gt;
  &lt;li&gt;Restore CPU capacity if the VM or host is constrained.&lt;/li&gt;
  &lt;li&gt;Consider moving the affected RAC service to node 1 after validating capacity and service behavior.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The important point is that none of these actions requires pretending the redo disks are slow when the evidence says otherwise.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Two shortcuts I would avoid&lt;/h2&gt;

&lt;blockquote style=&quot;border-color: currentcolor; border-image: none; border-style: none; border-width: medium; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;A. Changing commit durability to hide the wait&lt;/h3&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Using something such as &lt;code style=&quot;font-family: courier;&quot;&gt;COMMIT_WRITE=NOWAIT&lt;/code&gt; may reduce the foreground waiting time, but it changes commit durability behavior.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;That is not the same as fixing CPU starvation or excessive commit pressure. Making the response faster by changing the durability guarantee can introduce a much more serious problem than the original latency issue.&lt;/p&gt;&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;B. Immediately changing LGWR CPU priority or affinity&lt;/h3&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;I would also avoid jumping directly into LGWR priority or CPU-affinity tuning without understanding the host design and vendor guidance.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Those changes may only shift CPU pressure to another process and can make the next incident more difficult to understand.&lt;/p&gt;&lt;/blockquote&gt;











&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;What needs to be fixed after the incident&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Once the immediate pressure is removed, I would separate the permanent work into workload, placement, and monitoring.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;1. Review why the commit frequency increased&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The application team should understand why transaction frequency moved from roughly 12K to 25K commits per second and whether all those transaction boundaries are required.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The objective is not to make every transaction artificially large. It is to avoid unnecessary commit points that provide no business or recovery benefit.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;2. Revisit RAC service placement&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A critical service sitting entirely on a heavily loaded instance while another RAC node remains mostly idle deserves review.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Preferred instances, available instances, connection pools, failover policy, and actual runtime capacity all need to agree with each other.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Also remember that database workload is not the only consumer of CPU. Backup processes, security agents, monitoring software, host scans, and unrelated application jobs can all reduce the CPU available to Oracle background processes.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;3. Monitor the complete commit path&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For a commit-sensitive RAC workload, I would want the operational dashboard to correlate at least:&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;log file sync&lt;/code&gt; latency and histogram distribution&lt;/li&gt;
  &lt;li&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;log file parallel write&lt;/code&gt; latency&lt;/li&gt;
  &lt;li&gt;commits per second&lt;/li&gt;
  &lt;li&gt;redo bytes per second and redo bytes per commit&lt;/li&gt;
  &lt;li&gt;CPU utilization and run queue by RAC node&lt;/li&gt;
  &lt;li&gt;CPU steal time or throttling on virtual infrastructure&lt;/li&gt;
  &lt;li&gt;RAC service placement and session distribution&lt;/li&gt;
  &lt;li&gt;synchronous Data Guard transport latency where applicable&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Any one of these metrics viewed on its own can send the investigation in the wrong direction. Their relationship is what explains the commit path.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Takeaway&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A high &lt;code style=&quot;font-family: courier;&quot;&gt;log file sync&lt;/code&gt; wait tells us that foreground sessions are spending too much time completing commits. It does not tell us, by itself, that the redo storage is slow.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;If &lt;code style=&quot;font-family: courier;&quot;&gt;log file parallel write&lt;/code&gt; remains low and ASM write latency is healthy, look at the rest of the path. Compare RAC instances, measure the change in commit volume, identify which service is producing the activity, and check whether LGWR can actually get CPU when it needs it.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;In this case the important combination was simple once the evidence was put together: commit volume had sharply increased, the payment service was concentrated on instance 2, and that node was already close to CPU saturation with a long run queue.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Redo writes were completing quickly. The delay was in getting the work scheduled quickly enough around them.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;That distinction prevents a lot of wasted tuning effort. Faster disks would not have solved this incident. Looking across Oracle waits, RAC topology, workload behavior, and OS scheduling did.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Oracle references&lt;/h2&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/V-EVENT_HISTOGRAM.html&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;Oracle Database 19c Reference: V$EVENT_HISTOGRAM&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/V-ACTIVE_SESSION_HISTORY.html&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;Oracle Database 19c Reference: V$ACTIVE_SESSION_HISTORY&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.oracle.com/en/database/oracle/oracle-database/19/racad/server-control-utility-reference.html&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;Oracle Database 19c: Server Control Utility Reference&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description><link>https://oracle-dba-help.blogspot.com/2026/10/high-log-file-sync-in-oracle-rac-when.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-7466946378309629627</guid><pubDate>Tue, 20 Oct 2026 11:15:00 +0000</pubDate><atom:updated>2026-10-20T19:15:00.126+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Core DBA</category><category domain="http://www.blogger.com/atom/ns#">Must Read</category><title>ORA-12514: Diagnose the Service, Not the Listener</title><description>&lt;h2 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&amp;nbsp; A database maintenance window had just ended. The instance was open, the listener process was running, and TNSPING returned successfully. Yet the application connection pool continued to report ORA-12514. The first suggestion on the incident bridge was predictable: restart the listener. That would have changed the system before anyone had established what was actually wrong.&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;ORA-12514 is not a generic network failure. It tells us something specific: the client reached an Oracle listener, but that listener could not map the requested service name to a registered database service. The gap may be in the client connection string, dynamic registration, PDB state, Clusterware service configuration, or database role after a Data Guard transition. Each cause requires a different response.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This guide treats ORA-12514 as a service-routing problem. We will trace the client descriptor, compare it with the listener registry and database service state, determine when &lt;code style=&quot;font-family: courier;&quot;&gt;ALTER SYSTEM REGISTER&lt;/code&gt; is useful, and examine the multitenant, RAC, and Data Guard cases that simple listener checklists often miss.&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Image idea: Client Application -&gt; TNS Alias or JDBC URL -&gt; Oracle Listener -&gt; Service Registry -&gt; Database Service -&gt; Instance or PDB. Mark the network path to the listener as successful and place a red stop between Service Registry and Database Service labelled Requested service not found - ORA-12514.--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;What ORA-12514 Actually Proves&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The listener receives a client request containing a service name and searches its service registry for a handler capable of accepting the connection. If the requested service is absent, the listener returns ORA-12514.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The error therefore confirms two useful facts:&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;The client successfully reached an Oracle listener.&lt;/li&gt;
  &lt;li&gt;That listener did not recognize the requested service.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This distinction immediately narrows the investigation. The following error comparison is useful during an outage:&lt;/p&gt;

&lt;table style=&quot;border-collapse: collapse; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal; width: 100%;&quot;&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Error&lt;/th&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;What It Normally Indicates&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;ORA-12154&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;The client could not resolve the supplied connect identifier.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;ORA-12541&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;No listener was reachable at the resolved network address.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;ORA-12514&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;The listener was reached, but the requested service was unknown.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;ORA-12505&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;The requested SID was not known to the listener.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;ORA-12516 or ORA-12520&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;The service was known, but no suitable handler was available.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;ORA-01017&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;The request reached the database, but authentication failed.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Restarting the listener for every ORA-12514 can briefly interrupt new connections while leaving the actual problem untouched. It may also remove useful runtime evidence before the diagnosis is complete.&lt;/p&gt;

&lt;blockquote style=&quot;border: none; margin: 0 0 0 40px; padding: 0px;&quot;&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh_CErGx_1hGCnu7matbD4m3Fd0FmXSsmWtGk6o9gghfV9n1TTQeNGJ_hz9fTVaz1hVztjMkNmWLjLQpCiNY2DFy7BmQtKOyb3dBa-E6YkAXDNMUACArDJp7umYheDlUIpJc0ipRmepSvuJnaI0AKVz2SH3DhIbHUEbRAMPhCZ4u9ahdFmEBEmzWS05v-Y&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;950&quot; data-original-width=&quot;1800&quot; height=&quot;467&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh_CErGx_1hGCnu7matbD4m3Fd0FmXSsmWtGk6o9gghfV9n1TTQeNGJ_hz9fTVaz1hVztjMkNmWLjLQpCiNY2DFy7BmQtKOyb3dBa-E6YkAXDNMUACArDJp7umYheDlUIpJc0ipRmepSvuJnaI0AKVz2SH3DhIbHUEbRAMPhCZ4u9ahdFmEBEmzWS05v-Y=w884-h467&quot; width=&quot;884&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/h2&gt;&lt;/blockquote&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;Start With the Client&#39;s Actual Connect Descriptor&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Do not begin with &lt;code style=&quot;font-family: courier;&quot;&gt;listener.ora&lt;/code&gt;. Begin with the connection information used by the failing client.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Applications frequently use a different Oracle Home, &lt;code style=&quot;font-family: courier;&quot;&gt;TNS_ADMIN&lt;/code&gt; location, DNS record, SCAN address, JDBC URL, or connection-pool configuration from the DBA workstation. A successful manual connection using another alias does not prove that the application configuration is correct.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Where possible, run the following checks from the affected application host:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;which sqlplus
sqlplus -V
echo &quot;$TNS_ADMIN&quot;

tnsping PAY_RW

sqlplus -L app_probe@&#39;//db-vip.example.com:1521/pay_rw.example.com&#39;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;tnsping&lt;/code&gt; displays the resolved address and the network configuration files used by the client. It confirms listener reachability, but it does not prove that the database is running or that the requested service can accept a login. An actual SQL*Plus connection is still required.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For a JDBC Thin client, a service-based URL normally looks like this:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;jdbc:oracle:thin:@//db-vip.example.com:1521/pay_rw.example.com&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Common application-side causes include:&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;A PDB service was renamed during migration, but the old JDBC URL remains deployed.&lt;/li&gt;
  &lt;li&gt;One connection pool uses a SID-style URL while another uses a service name.&lt;/li&gt;
  &lt;li&gt;A stale &lt;code style=&quot;font-family: courier;&quot;&gt;tnsnames.ora&lt;/code&gt; file is packaged inside an application container.&lt;/li&gt;
  &lt;li&gt;DNS directs the application to a listener different from the one checked by the DBA.&lt;/li&gt;
  &lt;li&gt;A load-balanced descriptor contains one outdated address.&lt;/li&gt;
  &lt;li&gt;Multiple Oracle Homes read different network configuration directories.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Before changing anything, record the host, port, protocol, and requested service used by the failed connection.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Compare Three Sources of Truth&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A reliable ORA-12514 investigation compares three different views:&lt;/p&gt;

&lt;ol style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;What the client requests.&lt;/li&gt;
  &lt;li&gt;What the listener has registered.&lt;/li&gt;
  &lt;li&gt;What the database or Clusterware is currently offering.&lt;/li&gt;
&lt;/ol&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Image idea: Triangle with Client Connect Descriptor at the top, Listener Registry - lsnrctl services at the bottom left, and Database State - DBA_SERVICES and V$ACTIVE_SERVICES at the bottom right. Place the requested service name in the centre.--&gt;
&lt;/div&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Check the Exact Listener&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Run the commands against the listener handling the failed endpoint:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;lsnrctl status LISTENER
lsnrctl services LISTENER&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;lsnrctl status&lt;/code&gt; confirms endpoints and provides a service summary. &lt;code style=&quot;font-family: courier;&quot;&gt;lsnrctl services&lt;/code&gt; is usually more useful during diagnosis because it displays registered services, instances, and handlers.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Do not assume that the listener is named &lt;code style=&quot;font-family: courier;&quot;&gt;LISTENER&lt;/code&gt;. Verify the listener name, Oracle Home, host, and port. On RAC systems, distinguish between local listeners and SCAN listeners.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Check the Database and Service State&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Connect locally as SYSDBA and compare defined services with services that are active in the instance:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SET&lt;/span&gt; LINESIZE 220
&lt;span style=&quot;color: #ff79c6;&quot;&gt;SET&lt;/span&gt; PAGESIZE 100

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; instance_name,
status,
database_status &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   v$instance;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; name,
db_unique_name,
database_role,
open_mode &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   v$database;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; name,
network_name,
pdb &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   dba_services &lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; name;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; name,
network_name,
pdb &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   v$active_services &lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; name;

&lt;span style=&quot;color: #6272a4;&quot;&gt;-- Run in a multitenant database&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; name,
open_mode,
restricted &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   v$pdbs &lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; con_id;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;DBA_SERVICES&lt;/code&gt; shows service definitions, while &lt;code style=&quot;font-family: courier;&quot;&gt;V$ACTIVE_SERVICES&lt;/code&gt; shows services currently active in the instance. The difference between these views is often where the diagnosis becomes clear.&lt;/p&gt;

&lt;table style=&quot;border-collapse: collapse; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal; width: 100%;&quot;&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Observation&lt;/th&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Likely Investigation Path&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Service missing from &lt;code style=&quot;font-family: courier;&quot;&gt;DBA_SERVICES&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Wrong client service name or a missing service definition.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Present in &lt;code style=&quot;font-family: courier;&quot;&gt;DBA_SERVICES&lt;/code&gt;, but absent from &lt;code style=&quot;font-family: courier;&quot;&gt;V$ACTIVE_SERVICES&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Service stopped, PDB closed, or Clusterware policy not satisfied.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Active in the database, but absent from &lt;code style=&quot;font-family: courier;&quot;&gt;lsnrctl services&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;LREG registration problem or incorrect listener target.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Registered with another listener only&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Wrong host, port, VIP, SCAN address, or listener configuration.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Registered correctly, but the application still fails&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;The application resolves another descriptor or retains stale pool configuration.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Available on only one RAC node&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Service placement, preferred-instance policy, or remote registration issue.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;How Dynamic Service Registration Works&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Modern Oracle releases use the Listener Registration process, LREG, to publish database services. Older explanations often attribute registration to PMON, but LREG is the relevant background process in current releases.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;By default, LREG attempts to register with a local listener on TCP port 1521. &lt;code style=&quot;font-family: courier;&quot;&gt;LOCAL_LISTENER&lt;/code&gt; identifies non-default local endpoints, while &lt;code style=&quot;font-family: courier;&quot;&gt;REMOTE_LISTENER&lt;/code&gt; is commonly used for remote endpoints such as RAC SCAN listeners. Dynamic registration normally does not require a static database entry in &lt;code style=&quot;font-family: courier;&quot;&gt;listener.ora&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Image idea: Database Instance -&gt; LREG -&gt; Local Listener -&gt; Client Connections. Add a branch from LREG to Remote or SCAN Listener. Label the paths LOCAL_LISTENER and REMOTE_LISTENER. Add the warning: Registration does not create or start a service.--&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Check the current registration-related parameters:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SHOW PARAMETER&lt;/span&gt; local_listener
&lt;span style=&quot;color: #ff79c6;&quot;&gt;SHOW PARAMETER&lt;/span&gt; remote_listener
&lt;span style=&quot;color: #ff79c6;&quot;&gt;SHOW PARAMETER&lt;/span&gt; service_names

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; name,
value &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   v$parameter &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt;  name &lt;span style=&quot;color: #ff79c6;&quot;&gt;IN&lt;/span&gt; (&#39;local_listener&#39;,
&#39;remote_listener&#39;,
&#39;service_names&#39;);&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;If a single-instance database uses a listener on a non-default port, an explicit local listener address may be required:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER SYSTEM SET&lt;/span&gt; local_listener =
  &#39;(ADDRESS=(PROTOCOL=TCP)
            (HOST=db-vip.example.com)
            (PORT=1522))&#39;
  &lt;span style=&quot;color: #ff79c6;&quot;&gt;SCOPE&lt;/span&gt;=BOTH;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER SYSTEM REGISTER&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Confirm the result afterward with &lt;code style=&quot;font-family: courier;&quot;&gt;lsnrctl services&lt;/code&gt;. Do not copy this parameter change blindly into RAC. Clusterware normally manages local listener and SCAN-related configuration, and manual changes can conflict with the cluster configuration.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;What ALTER SYSTEM REGISTER Does Not Do&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;ALTER SYSTEM REGISTER&lt;/code&gt; asks LREG to publish the database&#39;s currently active services immediately. It does not:&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;Create a missing service.&lt;/li&gt;
  &lt;li&gt;Start a stopped service.&lt;/li&gt;
  &lt;li&gt;Open a PDB.&lt;/li&gt;
  &lt;li&gt;Correct the client&#39;s service name.&lt;/li&gt;
  &lt;li&gt;Change a Data Guard service role.&lt;/li&gt;
  &lt;li&gt;Override a disabled Clusterware resource.&lt;/li&gt;
  &lt;li&gt;Repair an unreachable listener address.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;If the service is absent from &lt;code style=&quot;font-family: courier;&quot;&gt;V$ACTIVE_SERVICES&lt;/code&gt;, repeatedly forcing registration will not solve the underlying problem.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Starting with Oracle Database 19c, customer use of the &lt;code style=&quot;font-family: courier;&quot;&gt;SERVICE_NAMES&lt;/code&gt; initialization parameter is deprecated. Application services should be managed through tools such as SRVCTL, GDSCTL, or &lt;code style=&quot;font-family: courier;&quot;&gt;DBMS_SERVICE&lt;/code&gt;. In high-availability environments, &lt;code style=&quot;font-family: courier;&quot;&gt;SERVICE_NAMES&lt;/code&gt; should not be treated as the service-management mechanism.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;SERVICE_NAME, SID, and Database Name Are Different&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Many ORA-12514 incidents begin with the assumption that the database name, instance SID, and application service must be identical. They represent different layers of the database architecture.&lt;/p&gt;

&lt;table style=&quot;border-collapse: collapse; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal; width: 100%;&quot;&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Name&lt;/th&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Purpose&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;SERVICE_NAME&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Logical workload endpoint used by clients.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;SID&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Identifier for one Oracle database instance.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;DB_NAME&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Database identity recorded in the control file.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;DB_UNIQUE_NAME&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Unique database identity used in configurations such as Data Guard.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;PDB name&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Name of a pluggable container, which is not necessarily the preferred application service.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A service can run across several RAC instances, relocate during maintenance, or start only when a Data Guard database has a particular role. A SID cannot provide that abstraction.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A good service name should describe workload intent. For example:&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;orders_rw.example.com&lt;/code&gt; for primary read-write traffic.&lt;/li&gt;
  &lt;li&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;orders_ro.example.com&lt;/code&gt; for reporting on an Active Data Guard standby.&lt;/li&gt;
  &lt;li&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;batch.example.com&lt;/code&gt; for scheduled processing with separate placement rules.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Using one generic service for every workload makes draining, placement, failover, load balancing, and maintenance considerably harder.&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Image idea: Split diagram. Left side shows Application Service routing to RAC Instance 1, RAC Instance 2, and the new primary after switchover. Right side shows SID routing to one database instance. Footer: Use services for application connectivity and HA.--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Multitenant Problems: The CDB Is Open but the PDB Is Not&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;One of the easiest ways to misdiagnose ORA-12514 is to check only &lt;code style=&quot;font-family: courier;&quot;&gt;V$DATABASE.OPEN_MODE&lt;/code&gt;. The CDB may be open while the target PDB remains mounted. A service associated with that PDB may therefore be unavailable even though the instance appears healthy.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For a routine single-instance environment, check the PDB and its active services:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SHOW PDBS&lt;/span&gt;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER PLUGGABLE DATABASE&lt;/span&gt; orders_pdb &lt;span style=&quot;color: #ff79c6;&quot;&gt;OPEN&lt;/span&gt;;

&lt;span style=&quot;color: #6272a4;&quot;&gt;-- Consider this for restart persistence in a suitable non-Data Guard design&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER PLUGGABLE DATABASE&lt;/span&gt; orders_pdb &lt;span style=&quot;color: #ff79c6;&quot;&gt;SAVE STATE&lt;/span&gt;;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; name,
network_name,
pdb &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;   v$active_services &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt;  pdb = &#39;ORDERS_PDB&#39;;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Saved PDB state is useful in straightforward deployments, but it should not replace role-aware service management in Data Guard. For high-availability applications, use a named application service associated with the correct PDB and database role.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Avoid relying on an automatically created PDB default service for an HA application. A separately managed application service provides proper control over placement, database role, failover behavior, and workload management.&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Image idea: Application -&gt; Listener -&gt; orders_rw.example.com -&gt; CDB -&gt; ORDERS_PDB. Show OPEN - Service active in green and MOUNTED - Service unavailable in red. Add note: CDB OPEN does not prove the target PDB is open.--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;RAC and Data Guard Require Clusterware-Level Checks&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;In RAC, Oracle Restart, and Data Guard environments, an active instance does not automatically mean that an application service should run there. Clusterware decides service placement based on configuration, management policy, preferred instances, PDB association, and database role.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Use the Grid Infrastructure version of SRVCTL and check both configuration and runtime state:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;srvctl status database -db PROD_A -verbose

srvctl config service -db PROD_A 
-service orders_rw -verbose

srvctl status service -db PROD_A 
-service orders_rw -verbose

srvctl status listener -listener LISTENER -verbose
srvctl status scan_listener -verbose&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The service configuration should answer the following questions:&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;Is the service enabled?&lt;/li&gt;
  &lt;li&gt;Is its management policy automatic?&lt;/li&gt;
  &lt;li&gt;Which PDB owns the service?&lt;/li&gt;
  &lt;li&gt;Which RAC instances or server pool can run it?&lt;/li&gt;
  &lt;li&gt;Is it configured for the &lt;code style=&quot;font-family: courier;&quot;&gt;PRIMARY&lt;/code&gt; role, &lt;code style=&quot;font-family: courier;&quot;&gt;PHYSICAL_STANDBY&lt;/code&gt; role, or both?&lt;/li&gt;
  &lt;li&gt;Is the service currently running?&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For Data Guard, verify the database role and broker configuration as well:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;dgmgrl /

DGMGRL&amp;gt; SHOW CONFIGURATION VERBOSE;
DGMGRL&amp;gt; SHOW DATABASE VERBOSE &#39;PROD_A&#39;;
DGMGRL&amp;gt; VALIDATE DATABASE VERBOSE &#39;PROD_A&#39;;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A read-write application service should normally be configured with the &lt;code style=&quot;font-family: courier;&quot;&gt;PRIMARY&lt;/code&gt; role on both Data Guard sites. A reporting service can be configured separately for the &lt;code style=&quot;font-family: courier;&quot;&gt;PHYSICAL_STANDBY&lt;/code&gt; role.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A role-related service correction might look like this:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;srvctl modify service -db PROD_B \
  -service orders_rw \
  -role PRIMARY \
  -policy AUTOMATIC \
  -pdb ORDERS_PDB

srvctl start service -db PROD_B -service orders_rw&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Service changes can affect placement and existing sessions. Confirm the syntax supported by the installed Grid Infrastructure release and apply the change through the normal production change process.&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Image idea: Two Data Guard sites. Site A shows Primary Database -&gt; orders_rw Service -&gt; Application. Site B shows Physical Standby -&gt; orders_ro Service -&gt; Reporting. Add a switchover arrow and show orders_rw moving to the new primary. Label services by PRIMARY and PHYSICAL_STANDBY roles.--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Performance and Monitoring Considerations&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;ORA-12514 itself is generally returned quickly and is not usually a database performance problem. The secondary effect can still be serious.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;An application pool may retry failed connections without sufficient delay. Hundreds of application processes then create a connection storm as soon as the service returns. Listener logs grow rapidly, monitoring floods the support channel, and the restored database receives a sudden authentication and session-creation spike.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Production monitoring should therefore go beyond checking whether the listener process is running:&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;Confirm that each required application service is registered.&lt;/li&gt;
  &lt;li&gt;Run a controlled synthetic login through the application endpoint.&lt;/li&gt;
  &lt;li&gt;Check service availability after database and listener restarts.&lt;/li&gt;
  &lt;li&gt;Validate every RAC or SCAN path used by the application.&lt;/li&gt;
  &lt;li&gt;Test application services after Data Guard switchovers, not only before them.&lt;/li&gt;
  &lt;li&gt;Alert when a required service remains absent beyond the expected registration interval.&lt;/li&gt;
  &lt;li&gt;Configure application retries with delay, backoff, and sensible limits.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;When an ORA-12514 message contains a &lt;code style=&quot;font-family: courier;&quot;&gt;CONNECTION_ID&lt;/code&gt;, preserve it. The identifier can help correlate the failed request with Oracle listener diagnostics. The &lt;code style=&quot;font-family: courier;&quot;&gt;lsnrctl status&lt;/code&gt; output also reports the active listener log location.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Oracle Versus PostgreSQL Connection Routing&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;PostgreSQL does not have an Oracle-style listener service registry. High-availability routing is normally provided through a proxy, virtual IP, DNS record, operator, or client connection string.&lt;/p&gt;

&lt;table style=&quot;border-collapse: collapse; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal; width: 100%;&quot;&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Oracle&lt;/th&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;PostgreSQL&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;The client requests a logical database service.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;The client specifies a host, port, and database.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;LREG registers services with listeners.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;The PostgreSQL server process accepts connections directly.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Services can map to PDBs, RAC instances, and database roles.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;External HA components normally route clients to the correct server role.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;An unknown service can return ORA-12514.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;A missing database normally returns a PostgreSQL &lt;code style=&quot;font-family: courier;&quot;&gt;FATAL&lt;/code&gt; error.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;tnsping&lt;/code&gt; checks listener reachability.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;pg_isready&lt;/code&gt; checks PostgreSQL server status.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;SQL*Plus validates an actual service login.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;psql&lt;/code&gt; validates an actual database login.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The testing principle is similar on both platforms. &lt;code style=&quot;font-family: courier;&quot;&gt;pg_isready&lt;/code&gt; can report server status without proving that a specific user can connect to a valid database. It should not replace an actual &lt;code style=&quot;font-family: courier;&quot;&gt;psql&lt;/code&gt; connection test.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;pg_isready -h pg-vip.example.com -p 5432

psql &quot;host=pg-vip.example.com port=5432 dbname=orders 
user=app_probe connect_timeout=5&quot;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For both platforms, an endpoint health check is weaker than a real application-path login test.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Quick Takeaways&lt;/h2&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;ORA-12514 normally proves that the client reached a listener.&lt;/li&gt;
  &lt;li&gt;Check the application&#39;s resolved service name, host, and port first.&lt;/li&gt;
  &lt;li&gt;TNSPING success does not prove that the database service is available.&lt;/li&gt;
  &lt;li&gt;Compare &lt;code style=&quot;font-family: courier;&quot;&gt;DBA_SERVICES&lt;/code&gt;, &lt;code style=&quot;font-family: courier;&quot;&gt;V$ACTIVE_SERVICES&lt;/code&gt;, and &lt;code style=&quot;font-family: courier;&quot;&gt;lsnrctl services&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;ALTER SYSTEM REGISTER&lt;/code&gt; publishes active services; it does not start them.&lt;/li&gt;
  &lt;li&gt;In RAC and Data Guard, use SRVCTL as the service-management source of truth.&lt;/li&gt;
  &lt;li&gt;Monitor actual application service logins, not only listener availability.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Lessons From the Field: DBA Takeaways&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;The Wrong Listener Is Checked Surprisingly Often&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Multi-home servers, custom ports, SCAN listeners, VIPs, and stale DNS records can make a healthy listener irrelevant to the failed application path. Always reproduce the connection from the same network path used by the application.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Restarts Can Hide Weak Service Design&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;If every incident is closed after restarting the listener or database, delayed registration, incorrect role policies, and closed PDBs remain in place for the next maintenance window.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Application Retries Need Control&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A missing service can become a connection storm when thousands of pool retries arrive after recovery. Retry intervals and backoff settings should be reviewed as part of the database service design.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Default Services Are Poor HA Contracts&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Define application services according to workload and database role instead of exposing the raw database or PDB identity directly.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Data Guard Testing Must Include Services&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A successful broker switchover does not prove that the application service started on the new primary. The runbook should include service checks and a real application connection test.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Mini Case Study: Service Missing After Switchover&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Problem&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;After a planned Data Guard switchover, the new primary opened successfully and the broker reported a healthy configuration. The SCAN endpoint was reachable, but the application received ORA-12514 for &lt;code style=&quot;font-family: courier;&quot;&gt;orders_rw&lt;/code&gt;.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Investigation&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;lsnrctl services&lt;/code&gt; confirmed that &lt;code style=&quot;font-family: courier;&quot;&gt;orders_rw&lt;/code&gt; was missing. Running &lt;code style=&quot;font-family: courier;&quot;&gt;ALTER SYSTEM REGISTER&lt;/code&gt; made no difference.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;DBA_SERVICES&lt;/code&gt; showed that the service existed, but it was absent from &lt;code style=&quot;font-family: courier;&quot;&gt;V$ACTIVE_SERVICES&lt;/code&gt;. The decisive check was:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;srvctl config service -db PROD_B \
  -service orders_rw -verbose&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The service on the second site had been configured with the &lt;code style=&quot;font-family: courier;&quot;&gt;PHYSICAL_STANDBY&lt;/code&gt; role during an earlier build. Clusterware therefore did exactly what its configuration required and did not start the service when that database became primary.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Root Cause&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The service definition was inconsistent between the two Data Guard sites. Database switchover had been tested, but application service relocation had not.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Fix&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The service was changed to the &lt;code style=&quot;font-family: courier;&quot;&gt;PRIMARY&lt;/code&gt; role, associated with the correct PDB, enabled with an automatic management policy, and started through SRVCTL. The service then appeared in the listener registry and the application connection succeeded.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The permanent remediation was to add service-role validation and an application login test to the switchover runbook.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Frequently Asked Questions&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;1. Why does TNSPING succeed while SQL*Plus returns ORA-12514?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;TNSPING proves that the resolved listener can be reached. It does not establish a database session or confirm that the requested service is registered. Check &lt;code style=&quot;font-family: courier;&quot;&gt;lsnrctl services&lt;/code&gt; and perform an actual SQL*Plus connection.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;2. Will Restarting the Listener Fix ORA-12514?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;It may appear to help when registration is temporarily delayed, but it is rarely the correct first action. Verify the service name, active database services, PDB state, and registration targets before restarting anything.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;3. When Should I Run ALTER SYSTEM REGISTER?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Use it when the required service is active in the database and the listener endpoint is correct, but the listener has not yet received the registration. It is particularly useful after starting or reconfiguring a listener.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;4. Why Can ORA-12514 Occur After a PDB Restart?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The CDB may be open while the target PDB remains mounted, or the PDB-associated application service may not have restarted. Check &lt;code style=&quot;font-family: courier;&quot;&gt;V$PDBS&lt;/code&gt;, &lt;code style=&quot;font-family: courier;&quot;&gt;V$ACTIVE_SERVICES&lt;/code&gt;, and the relevant SRVCTL service state.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;5. Can ORA-12514 Affect Performance?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The error itself is normally returned quickly. Poorly configured application retries can still cause connection storms, rapid listener-log growth, and a session-creation spike when the service becomes available again.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;ORA-12514 becomes easier to diagnose once it is treated as a failed service mapping rather than a vague Oracle Net problem. The client reached a listener. The DBA&#39;s task is to identify the service it requested, confirm whether that exact listener knows the service, and determine why the database or Clusterware is not offering it.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The most reliable workflow is consistent: capture the resolved connection descriptor, run &lt;code style=&quot;font-family: courier;&quot;&gt;lsnrctl services&lt;/code&gt; against the correct listener, compare &lt;code style=&quot;font-family: courier;&quot;&gt;DBA_SERVICES&lt;/code&gt; with &lt;code style=&quot;font-family: courier;&quot;&gt;V$ACTIVE_SERVICES&lt;/code&gt;, and verify the instance, PDB, and Data Guard role. &lt;code style=&quot;font-family: courier;&quot;&gt;ALTER SYSTEM REGISTER&lt;/code&gt; is useful when LREG has an active service to publish. It cannot create a service, open a PDB, correct a stale client alias, or override a Clusterware role policy.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Modern Oracle environments need disciplined service management. Use named application services, manage RAC and Oracle Restart services through SRVCTL, associate PDB services explicitly, and configure Data Guard services by role. Do not use the PDB default service as the foundation of a production failover design.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Review one critical application&#39;s connection path. Record its host or SCAN address, port, service, PDB, preferred placement, Data Guard role, and monitoring check. Then test it after a restart and during the next planned role transition. A service that works only during normal operations is not yet production-ready.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Official Oracle References&lt;/h2&gt;

&lt;ol style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.oracle.com/en/error-help/db/ora-12514/&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;Oracle Error Help: ORA-12514&lt;/a&gt; - Official explanation, causes, and recommended actions for an unknown or unregistered service.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.oracle.com/en/database/oracle/oracle-database/19/netag/configuring-and-administering-oracle-net-listener.html&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;Configuring and Administering Oracle Net Listener&lt;/a&gt; - Covers LREG, dynamic service registration, &lt;code style=&quot;font-family: courier;&quot;&gt;LOCAL_LISTENER&lt;/code&gt;, &lt;code style=&quot;font-family: courier;&quot;&gt;REMOTE_LISTENER&lt;/code&gt;, and listener administration.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.oracle.com/en/database/oracle/oracle-database/19/racad/server-control-utility-reference.html&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;Oracle Database 19c SRVCTL Reference&lt;/a&gt; - Reference for managing RAC, Oracle Restart, PDB, and role-based application services.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;span style=&quot;font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Have you encountered ORA-12514 after a PDB restart, RAC service relocation, or Data Guard switchover? Share the symptom and the check that exposed the real cause. Production patterns are often more useful than another listener restart checklist.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
</description><link>https://oracle-dba-help.blogspot.com/2026/10/ora-12514-diagnose-service-not-listener.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEh_CErGx_1hGCnu7matbD4m3Fd0FmXSsmWtGk6o9gghfV9n1TTQeNGJ_hz9fTVaz1hVztjMkNmWLjLQpCiNY2DFy7BmQtKOyb3dBa-E6YkAXDNMUACArDJp7umYheDlUIpJc0ipRmepSvuJnaI0AKVz2SH3DhIbHUEbRAMPhCZ4u9ahdFmEBEmzWS05v-Y=s72-w884-h467-c" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-4083240221917091627</guid><pubDate>Sat, 17 Oct 2026 03:23:00 +0000</pubDate><atom:updated>2026-10-17T11:23:00.118+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Must Read</category><title>Oracle DBA in 2030: What Will the Role Look Like?</title><description>&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A production database alert arrives at 2:00 a.m. The monitoring platform detects increased commit latency, correlates it with storage response time and suggests several corrective actions. That is useful automation. The difficult part begins when someone must decide whether to wait, change the workload, fail over the database or accept the risk of an emergency configuration change.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This is why I do not expect AI to eliminate the Oracle DBA role by 2030. It will, however, remove a significant amount of repetitive administration. The DBA who only performs standard checks manually may struggle. The DBA who understands Oracle internals, automates routine work and makes sound production decisions will remain valuable.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Oracle Automation Is Not New&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle databases have provided automated diagnostics and recommendations for years. AWR, ADDM, SQL Tuning Advisor, Automatic Workload Repository baselines and automatic memory management already reduce the amount of manual analysis required. AutoUpgrade, Fleet Patching and Provisioning, Enterprise Manager and cloud-managed database services continue the same direction.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;AI extends this capability by processing more operational data, identifying patterns and presenting possible causes more quickly. It may summarise an incident, compare execution plans, identify unusual workload behaviour or generate a first version of a remediation script.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The output still needs validation. Oracle recommendations are based on the information available to the tool. They may not include application release activity, business priorities, licensing restrictions, downstream dependencies or the recovery limitations of a particular environment.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;The Work Most Likely to Change&lt;/h2&gt;

&lt;table style=&quot;border-collapse: collapse; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal; width: 100%;&quot;&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Work Area&lt;/th&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Likely Direction&lt;/th&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;DBA Responsibility&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Health checks and routine reporting&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Largely automated&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Define thresholds, validate exceptions and improve coverage&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;SQL performance analysis&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;AI-assisted diagnosis and recommendations&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Assess workload-wide impact before implementation&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Backup and recovery validation&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Automated checks and anomaly detection&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Prove recoverability through restore and recovery testing&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Patching and provisioning&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Policy-driven orchestration&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Control compatibility, rollback and operational risk&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Outage and disaster recovery decisions&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;AI-supported but human-led&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Own the decision, coordination and business impact&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Where Production Experience Still Matters&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Consider a Data Guard environment where transport lag suddenly increases. An AI-assisted platform may identify network latency, an archive destination error or heavy redo generation as possible causes. That helps reduce investigation time, but the operational decision is more complicated.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A DBA must determine whether the standby is still suitable for failover, whether the defined RPO is at risk, whether the lag is temporary and whether the application can reconnect correctly after a role transition. The decision may also depend on broker configuration, standby redo logs, protection mode, Fast-Start Failover settings and the availability of application and infrastructure teams.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The same applies to SQL tuning. Creating an index may improve one expensive query while increasing DML latency, storage consumption and maintenance time. Accepting a SQL profile may stabilise a plan but can also hide an underlying statistics or data-distribution problem. AI can suggest an action; the DBA must evaluate its wider effect.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;The Oracle DBA Will Become a Platform Engineer&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;By 2030, managing databases one server at a time will be difficult to justify. Database estates are already moving towards standardised platforms, infrastructure as code, policy-based controls and self-service provisioning.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle expertise will remain the foundation, but it will need to be combined with broader engineering skills:&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;Oracle RAC, Data Guard, RMAN and multitenant architecture&lt;/li&gt;
  &lt;li&gt;Exadata, Exadata Cloud@Customer and Oracle Cloud Infrastructure&lt;/li&gt;
  &lt;li&gt;Shell or Python scripting for operational automation&lt;/li&gt;
  &lt;li&gt;Ansible and Terraform for repeatable configuration and provisioning&lt;/li&gt;
  &lt;li&gt;APIs, Git and CI/CD practices for database changes&lt;/li&gt;
  &lt;li&gt;Security controls, encryption, auditing and access governance&lt;/li&gt;
  &lt;li&gt;Observability across the database, operating system, storage and application layers&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This does not mean every DBA must become an expert in every tool. The practical goal is to stop treating database administration as a collection of manual server activities and start treating it as an engineered service.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Common Mistakes DBAs Should Avoid&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Trusting Recommendations Without Testing&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;An AI-generated script should be reviewed like any other production change. Check its scope, privileges, locking behaviour, failure handling and rollback path. Test it with representative data before running it against a critical database.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Automating a Broken Process&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Automation makes a good process faster, but it can also repeat a bad decision consistently. Before automating patching, failover or cleanup, define the prerequisites, safety checks, stopping conditions and evidence required after completion.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Ignoring Database Fundamentals&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;AI assistance does not remove the need to understand wait events, execution plans, locking, undo, redo, checkpoints, recovery and Oracle memory structures. Without that foundation, it is difficult to recognise when a recommendation is incomplete or unsafe.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Frequently Asked Questions&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Will junior Oracle DBA positions disappear?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Entry-level work will change because many routine checks and standard requests can be automated. Junior DBAs will need earlier exposure to scripting, cloud platforms, observability and incident analysis instead of relying only on repetitive operational tasks.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Should Oracle DBAs move completely into cloud roles?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Cloud knowledge is valuable, but many enterprises will continue operating hybrid environments. Experience with on-premises Oracle, Exadata, Exadata Cloud@Customer and OCI can be more useful than focusing on only one deployment model.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Can AI make production database changes automatically?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Technically, automation can execute approved changes. For critical systems, organisations should still use access controls, testing, change approval, audit trails, rollback procedures and human oversight. The level of autonomy should depend on the risk and reversibility of the operation.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Final Thoughts&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;AI is unlikely to replace the Oracle DBA by 2030, but it will expose inefficient ways of working. Tasks based on predictable inputs and repeatable steps will increasingly move to automation. Architecture decisions, complex recovery, performance trade-offs, security and business-critical incident handling will continue to require experienced engineers.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The safest career strategy is not to compete with automation. Use it to remove repetitive work, then invest the saved time in Oracle internals, platform engineering, cloud architecture and recovery design. The future Oracle DBA will manage fewer individual tasks but carry greater responsibility for the reliability of the entire database service.&lt;/p&gt;
</description><link>https://oracle-dba-help.blogspot.com/2026/10/oracle-dba-in-2030-what-will-role-look.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-4681157720855376541</guid><pubDate>Sun, 04 Oct 2026 12:49:00 +0000</pubDate><atom:updated>2026-10-04T20:49:00.208+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">MongoDB</category><title>MongoDB :  What DBAs Must Get Right</title><description>&lt;div style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;MongoDB often looks simple during the first few application releases. Developers can add fields without waiting for a table change, nested-objects map naturally to application code, and a complete business record can be retrieved without several joins.&lt;br /&gt;&lt;/span&gt;The real test starts after the collection grows, multiple services begin writing to it, and the workload becomes operationally important. One service stores an identifier as a string while another writes it as a number. Arrays grow without limits. Queries that were fast during development begin examining millions of documents. A secondary falls behind during a batch update, or a shard key concentrates most traffic on one node.&lt;/span&gt;&lt;/div&gt;



&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;MongoDB is not difficult because it uses documents instead of tables. It becomes difficult when flexible modelling is treated as a replacement for data governance, indexing, recovery planning, and capacity management. This article looks at MongoDB from a production DBA perspective and focuses on the design and operational decisions that usually determine whether the platform remains stable.&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Flexible Schema Does Not Mean No Schema&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;MongoDB stores data as BSON documents inside collections. BSON supports nested documents, arrays, dates, decimal values, binary data, and several numeric types. This allows an application object to be stored close to the form in which the application uses it.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A customer profile, for example, may contain contact details, preferences, addresses, and status information in one document. That can remove several joins and reduce application round trips.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The problem is not flexibility itself. The problem is uncontrolled variation. Without validation, different application versions may gradually introduce conflicting field names, missing attributes, and inconsistent data types.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;use customer360

db.createCollection(&quot;profiles&quot;, {
validator: {
$jsonSchema: {
bsonType: &quot;object&quot;,
required: [&quot;customerId&quot;, &quot;email&quot;, &quot;status&quot;, &quot;createdAt&quot;],
properties: {
customerId: {
bsonType: &quot;string&quot;
},
email: {
bsonType: &quot;string&quot;
},
status: {
enum: [&quot;ACTIVE&quot;, &quot;SUSPENDED&quot;, &quot;CLOSED&quot;]
},
createdAt: {
bsonType: &quot;date&quot;
}
}
}
},
validationLevel: &quot;strict&quot;,
validationAction: &quot;error&quot;
})

db.profiles.aggregate([
{
$project: {
customerIdType: { $type: &quot;$customerId&quot; },
emailType: { $type: &quot;$email&quot; }
}
},
{
$group: {
_id: {
customerIdType: &quot;$customerIdType&quot;,
emailType: &quot;$emailType&quot;
},
documentCount: { $sum: 1 }
}
}
])&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For an existing collection, inspect current documents before introducing strict validation. Enabling validation without understanding legacy data can reject application writes immediately after deployment.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A safer rollout is to identify inconsistent documents, correct the data, introduce validation in a controlled manner, and then enforce the final rules.&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Add Blogger image here: MongoDB flexible documents passing through schema validation, with valid and rejected document paths--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Model Around Business Operations&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A relational design should not be copied into MongoDB collection by collection. That often creates a system dependent on repeated &lt;code style=&quot;font-family: courier;&quot;&gt;$lookup&lt;/code&gt; operations and multiple application calls.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The opposite approach is equally risky. Embedding every related object into one document can produce oversized documents, heavily updated arrays, and duplicated data that becomes difficult to maintain.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Use embedding when the data belongs together&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Embedding works well when the related data is normally read together, updated together, and has a predictable size. Order line items are a common example because the description, quantity, and purchase price belong to the historical order.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Use references when the lifecycle is independent&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A product master, audit trail, login history, or notification history usually changes independently and may grow continuously. Referencing such data from a separate collection is generally safer.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Unbounded arrays become operational debt&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A customer document containing the last five login locations is manageable. A document containing every login since account creation will become increasingly expensive to read, update, index, replicate, and back up.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;MongoDB documents also have a size limit. Even before that limit is reached, a growing document can create write amplification and contention. A practical design is to keep a small summary in the parent document and store the complete history separately.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;db.orders.aggregate([
  {
    $project: {
      orderId: 1,
      itemCount: {
        $size: {
          $ifNull: [&quot;$items&quot;, []]
        }
      },
      documentSizeBytes: {
        $bsonSize: &quot;$$ROOT&quot;
      }
    }
  },
  {
    $sort: {
      documentSizeBytes: -1
    }
  },
  {
    $limit: 20
  }
])&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Add Blogger image here: Embed versus reference decision flow showing bounded data and independent lifecycle--&gt;
&lt;/div&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxp1Wm_lUh8G7fS0ybQOR7XUgIR_GPtZ3u-csMl6msnLUIRltfZa2vy3JRo81fbyyaLEpQ9UTP5fwiJn77WgWTqHAoHTe6i_QnXEgicckCjQQiJUo8Za-M2rALnoD7XJpnRa0qUlT0XSkDlJpMu7BRBaD5biPkapvQU9V-IEEfjnQNSVVKFfrw8hZ9Z0Q/s1536/mongo1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1024&quot; data-original-width=&quot;1536&quot; height=&quot;425&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxp1Wm_lUh8G7fS0ybQOR7XUgIR_GPtZ3u-csMl6msnLUIRltfZa2vy3JRo81fbyyaLEpQ9UTP5fwiJn77WgWTqHAoHTe6i_QnXEgicckCjQQiJUo8Za-M2rALnoD7XJpnRa0qUlT0XSkDlJpMu7BRBaD5biPkapvQU9V-IEEfjnQNSVVKFfrw8hZ9Z0Q/w639-h425/mongo1.png&quot; width=&quot;639&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Indexes Still Control Query Performance&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;MongoDB does not remove the need for careful access-path design. A missing or poorly ordered index produces familiar symptoms: high CPU, excessive storage reads, slow application calls, cache pressure, and replica lag.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Consider an order service that frequently filters by tenant and status, then sorts by creation time.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;db.orders.createIndex(
  {
    tenantId: 1,
    status: 1,
    createdAt: -1
  },
  {
    name: &quot;idx_orders_tenant_status_created&quot;
  }
)

db.orders.explain(&quot;executionStats&quot;).find({
tenantId: &quot;TENANT-110&quot;,
status: &quot;OPEN&quot;,
createdAt: {
$gte: ISODate(&quot;2026-07-01T00:00:00Z&quot;)
}
}).sort({
createdAt: -1
}).limit(100)

db.orders.aggregate([
{ $indexStats: {} },
{ $sort: { accesses: 1 } }
])&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;An &lt;code style=&quot;font-family: courier;&quot;&gt;IXSCAN&lt;/code&gt; stage does not automatically mean the query is efficient. Review the relationship between &lt;code style=&quot;font-family: courier;&quot;&gt;nReturned&lt;/code&gt;, &lt;code style=&quot;font-family: courier;&quot;&gt;totalKeysExamined&lt;/code&gt;, and &lt;code style=&quot;font-family: courier;&quot;&gt;totalDocsExamined&lt;/code&gt;.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;If a query returns 100 documents after examining several million keys, the index is being used, but the access path is still expensive.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Indexing mistakes seen in production&lt;/h3&gt;

&lt;ul&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Creating an index for every application filter without measuring write overhead.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Selecting the wrong order for fields in a compound index.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Removing an index because it appears unused during a short monitoring window.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Ignoring different BSON types in the indexed field.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Adding more indexes instead of correcting an unsuitable document model.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Add Blogger image here: Collection scan reading all documents versus compound index performing targeted lookup--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Replica Sets: High Availability Needs More Than Three Nodes&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A replica set usually contains one primary and multiple secondaries. The primary accepts writes, and secondaries copy changes from the replication oplog. If the primary becomes unavailable, eligible members hold an election and one secondary may be promoted.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This architecture provides redundancy, but durability depends on write concern. A three-member replica set does not prove that every acknowledged write has reached multiple nodes.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;db.orders.insertOne(
  {
    orderId: &quot;ORD-2026-10019&quot;,
    status: &quot;CREATED&quot;,
    createdAt: new Date()
  },
  {
    writeConcern: {
      w: &quot;majority&quot;,
      wtimeout: 5000
    }
  }
)

rs.status()
rs.printReplicationInfo()
rs.printSecondaryReplicationInfo()

db.adminCommand({
replSetGetStatus: 1
})&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Majority acknowledgment provides stronger durability but may add latency. A write concern timeout also requires careful application handling. It means the requested acknowledgment was not received within the configured time. It does not always prove that the write was never applied.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For this reason, retry logic should be idempotent. Retrying an order creation, payment request, or account update without a business key can create duplicates.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Replica lag is usually a capacity problem&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A lagging secondary is often receiving changes correctly but cannot apply them as quickly as the primary generates them. Common causes include slow storage, network problems, large batch updates, index maintenance, insufficient CPU, cache eviction pressure, and competing reporting or backup activity.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Increasing oplog size may provide more recovery time, but it does not fix a secondary whose replay capacity remains lower than the primary write rate.&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Add Blogger image here: Replica set primary failure, election, new primary promotion and application reconnection--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;WiredTiger: Look Beyond Cache Usage&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;WiredTiger is responsible for storage, compression, cache management, checkpoints, concurrency, and journal-based recovery. The implementation differs from Oracle and PostgreSQL, but the production questions are familiar.&lt;/p&gt;

&lt;ul&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Does the active working set fit in memory?&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Are dirty pages being written efficiently?&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Is storage latency affecting checkpoints or eviction?&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Is a write-heavy workload overwhelming the node?&lt;/li&gt;
&lt;/ul&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;const status = db.serverStatus()

status.mem
status.wiredTiger.cache
status.wiredTiger.transaction
status.wiredTiger.log

# Operating-system checks

iostat -xz 1 10
vmstat 1 10
pidstat -d -p &quot;$(pidof mongod)&quot; 1 10

grep -E &quot;WTCHKPT|WTEVICT|WTRECOV|Slow query&quot; 
/var/log/mongodb/mongod.log&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;High cache usage is not automatically a fault. A database cache is expected to remain busy. The warning signs are high cache pressure combined with aggressive eviction, growing dirty bytes, rising disk latency, checkpoint delays, and increasing application response time.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Increasing &lt;code style=&quot;font-family: courier;&quot;&gt;cacheSizeGB&lt;/code&gt; should not be the first response. More WiredTiger cache can reduce memory available to the filesystem cache, the operating system, connections, index builds, and aggregations.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4k4GMwDRmO-zj3tz_fOpfaMNwTb2mtSW3Vzqc4FSo9-H0xvNI3_-tjsg4vu_k5flS6nZ4fORrrBr0tK6RRhGZXHzvND53IsEInfIYeGLyYkGlEtFcT0Nj7Buvu08FEOhNPMusfIG2Z6GU_M6PcheWzZw-U9vDnPzZ50olJ16ooloGMR60Aul7XkMpQNs/s1448/mongo2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1086&quot; data-original-width=&quot;1448&quot; height=&quot;414&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4k4GMwDRmO-zj3tz_fOpfaMNwTb2mtSW3Vzqc4FSo9-H0xvNI3_-tjsg4vu_k5flS6nZ4fORrrBr0tK6RRhGZXHzvND53IsEInfIYeGLyYkGlEtFcT0Nj7Buvu08FEOhNPMusfIG2Z6GU_M6PcheWzZw-U9vDnPzZ50olJ16ooloGMR60Aul7XkMpQNs/w552-h414/mongo2.png&quot; width=&quot;552&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Add Blogger image here: Application write flowing through WiredTiger cache, journal, checkpoint and data files--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Transactions Should Not Hide a Poor Document Model&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;MongoDB supports multi-document transactions on replica sets and sharded clusters. They are useful when several independent documents must change as one business operation.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;They are not a substitute for proper modelling. If most application requests require updates across several collections, the design may be reproducing a relational system without the natural advantages of a relational database.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Long-running transactions can increase cache and storage pressure, retain older document versions for longer, experience more write conflicts, and become more expensive when multiple shards are involved.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Sharding Starts with the Shard Key&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Replica sets provide redundancy, but one primary still has finite CPU, memory, storage, and write capacity. Sharding distributes collection data across multiple shards. Each shard is normally a replica set, applications connect through &lt;code style=&quot;font-family: courier;&quot;&gt;mongos&lt;/code&gt;, and the config server replica set maintains cluster metadata.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The shard key determines how data is distributed and how queries are routed. A poor key can create a hot shard, uneven storage, excessive chunk movement, or scatter-gather queries that contact every shard.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;use commerce

db.orders.createIndex({
tenantId: 1,
orderDate: 1
})

sh.enableSharding(&quot;commerce&quot;)

sh.shardCollection(
&quot;commerce.orders&quot;,
{
tenantId: 1,
orderDate: 1
}
)

sh.status()
db.orders.getShardDistribution()&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Shard-key warning signs&lt;/h3&gt;

&lt;ul&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Low-cardinality fields such as status or a small number of regions.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Monotonically increasing values that concentrate new writes.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A shard key missing from common application queries.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Tenant-based sharding when one tenant generates most of the traffic.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Hashed sharding selected without considering range-query requirements.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The balancer can move chunks between shards, but it cannot correct a workload that continually targets one logical key range. Shard-key selection should use actual query patterns, tenant distribution, write behaviour, and projected growth.&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Add Blogger image here: Applications connecting through mongos to three sharded replica sets and config servers--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Practical Failure Scenario: Replica Lag During Batch Processing&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Problem&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A three-member replica set supported an order-processing application. During a nightly batch update, the primary remained responsive, but one secondary gradually fell more than 15 minutes behind. Since every process was running, the environment initially appeared healthy.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Root cause&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The batch job issued millions of small updates. Each update modified fields covered by several indexes. The primary also used faster storage than the lagging secondary. Oplog generation increased faster than the secondary could apply the changes.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Fix&lt;/h3&gt;

&lt;ul&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Converted individual operations into controlled bulk updates.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Reduced batch size and introduced pauses between batches.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Removed one redundant index after workload validation.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Aligned storage performance across replica-set members.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Increased oplog capacity as temporary protection.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Added alerts for apply-rate divergence and oplog-window reduction.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Increasing the oplog alone would only have delayed the problem. The permanent fix was to reduce write amplification and improve secondary replay capacity.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;MongoDB Versus Oracle and PostgreSQL&lt;/h2&gt;&lt;div&gt;&lt;table style=&quot;border-collapse: collapse; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal; width: 100%;&quot;&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Workload Requirement&lt;/th&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;MongoDB&lt;/th&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Oracle or PostgreSQL&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;Variable product attributes&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;Natural fit when different product categories require different fields and the document structure changes frequently.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;Supported through relational modelling, JSON columns, or a hybrid design, although highly variable attributes may require additional schema and query planning.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;Nested content records&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;Strong fit when related data can be stored and retrieved as a single document, reducing the need for joins.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;Well suited when nested information must be normalized, independently maintained, or queried across multiple entities. JSON can also be used where appropriate.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;Customer profile aggregation&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;Well suited for entity-centric profiles that combine preferences, addresses, activity summaries, and other related information in one document.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;A strong option when profile data is shared across normalized entities or requires complex reporting, joins, and strict relationship management.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;Core financial ledger&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;Supports ACID transactions, but is usually not the first choice for a highly relational ledger requiring extensive constraints, reconciliation, and audit controls.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;Usually the safer starting point because of mature transaction handling, strong consistency, relational constraints, locking controls, and established auditing capabilities.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;Complex cross-entity reporting&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;Aggregation pipelines can support advanced analysis, but repeated joins across many collections may indicate that the data model is becoming relational.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;Strong fit for complex joins, window functions, analytical SQL, materialized views, and reporting across multiple related entities.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;Strong relational integrity&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;Schema validation is available, but relationships between collections are generally enforced by the application or supporting services.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;Strong fit because primary keys, foreign keys, unique constraints, checks, and transactional rules can be enforced directly by the database.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;Rapid document evolution&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;Natural fit when fields are introduced gradually and multiple document versions must coexist during application changes.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;Possible through controlled schema migrations or JSON-based designs, but relational changes normally require more formal deployment and compatibility planning.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;Heavy distributed document writes&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;A strong candidate when writes can be distributed through sharding, provided the shard key avoids hotspots and supports the main query patterns.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px;&quot;&gt;Can scale through partitioning, replication, distributed extensions, or platform-specific architectures, but horizontal write scaling is not usually as transparent as native document sharding.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;



&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;MongoDB is a strong option for product catalogues, customer profiles, content platforms, device metadata, and other hierarchical records. Oracle or PostgreSQL is usually the safer starting point for financial ledgers, complex cross-entity reporting, strict foreign-key enforcement, and heavily normalized transactional systems.&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Add Blogger image here: MongoDB document model compared with Oracle and PostgreSQL relational model--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Production Lessons for DBAs&lt;/h2&gt;

&lt;ul&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Flexible schema moves responsibility to validators, application contracts, and release governance.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Unbounded arrays should be corrected before they become storage and replication problems.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;An index can be used and still be inefficient. Always compare examined data with returned data.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Replica lag should be analysed as a difference between write generation and replay capacity.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A successful election does not prove the application reconnected successfully.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Sharding should begin only after a shard key has been tested against real workload patterns.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Replication protects availability. Restore-tested backups protect recoverability.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h2 style=&quot;display: inline; font-family: &amp;quot;Source Sans Pro&amp;quot;; text-align: left;&quot;&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;When MongoDB Is the Better Choice&lt;/span&gt;&lt;/h2&gt;&lt;p class=&quot;isSelectedEnd&quot; style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;MongoDB is a strong candidate when the data is naturally represented as a complete document and is usually read or changed as one unit.&lt;/p&gt;&lt;p class=&quot;isSelectedEnd&quot; style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Typical examples include:&lt;/p&gt;&lt;ul data-spread=&quot;false&quot; style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;&lt;li&gt;Product catalogs with category-specific attributes&lt;/li&gt;&lt;li&gt;Customer profiles&lt;/li&gt;&lt;li&gt;Content management platforms&lt;/li&gt;&lt;li&gt;Configuration repositories&lt;/li&gt;&lt;li&gt;Mobile and web application backends&lt;/li&gt;&lt;li&gt;Session and preference data&lt;/li&gt;&lt;li&gt;Device metadata&lt;/li&gt;&lt;li&gt;Case-management records&lt;/li&gt;&lt;li&gt;APIs returning hierarchical objects&lt;/li&gt;&lt;/ul&gt;&lt;p class=&quot;isSelectedEnd&quot; style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;It is especially useful when new fields must be introduced frequently and application teams cannot coordinate repeated relational schema migrations.&lt;/p&gt;&lt;p class=&quot;isSelectedEnd&quot; style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;That flexibility should still be supported by:&lt;/p&gt;&lt;ul data-spread=&quot;false&quot; style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;&lt;li&gt;Schema ownership&lt;/li&gt;&lt;li&gt;Versioning rules&lt;/li&gt;&lt;li&gt;Validation&lt;/li&gt;&lt;li&gt;Index reviews&lt;/li&gt;&lt;li&gt;Retention policies&lt;/li&gt;&lt;li&gt;Backup and recovery testing&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;When Oracle or PostgreSQL Is the Safer Choice&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p class=&quot;isSelectedEnd&quot; style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;MongoDB is not the natural first choice for every modern application.&lt;/p&gt;&lt;p class=&quot;isSelectedEnd&quot; style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;A relational database is usually safer when the workload depends on:&lt;/p&gt;&lt;ul data-spread=&quot;false&quot; style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;&lt;li&gt;Strong foreign-key enforcement&lt;/li&gt;&lt;li&gt;Complex joins across many entities&lt;/li&gt;&lt;li&gt;Highly normalized master data&lt;/li&gt;&lt;li&gt;Frequent multi-entity transactions&lt;/li&gt;&lt;li&gt;Financial ledger behavior&lt;/li&gt;&lt;li&gt;Mature SQL reporting&lt;/li&gt;&lt;li&gt;Complex ad hoc analytics&lt;/li&gt;&lt;li&gt;Strict database-side constraints&lt;/li&gt;&lt;/ul&gt;&lt;p class=&quot;isSelectedEnd&quot; style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;A payment ledger, general ledger, securities position store, or ERP accounting engine should not be moved to MongoDB only because the development team prefers JSON.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;MongoDB can technically support many of these operations. Technical possibility is not the same as operational suitability.&lt;/p&gt;&lt;div&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Frequently Asked Questions&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Does MongoDB really have no schema?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;No. MongoDB has a flexible schema. Documents in the same collection can have different structures by default, but production systems still require an agreed document model. Collection validation can enforce critical rules.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Why is a query slow even when it uses an index?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The index may still examine too many keys or fetch too many documents. Check execution statistics, compound index order, sort behaviour, field data types, and predicate selectivity.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Can applications read from secondaries?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Yes, with an appropriate read preference. Secondary reads may be behind the primary, so read preference and read concern must match the application&#39;s consistency requirements.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Should every write use majority write concern?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Not automatically. Majority acknowledgment provides stronger durability but may increase latency and affect write availability during member failures. The choice should follow the business impact of losing, delaying, or retrying a write.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;When should a collection be sharded?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Shard when one replica set can no longer meet projected storage or throughput requirements and the workload has a suitable shard key. Do not shard only because the collection is expected to grow.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;MongoDB performs well when the workload is genuinely document-oriented and the operating model is designed around that reality. Flexible documents can simplify application development, replica sets provide high availability, and sharding offers a practical route beyond the limits of one server.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Those benefits do not remove the need for database engineering. Reliable MongoDB platforms define ownership for document structure, validate important fields, review execution plans before adding indexes, test elections with real application traffic, and monitor replication as a throughput problem rather than a simple process state.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The operational mindset remains similar to Oracle and PostgreSQL. Capacity planning, workload baselines, recovery testing, index discipline, and failure simulation still matter. The terminology changes to oplog, write concern, WiredTiger cache, checkpoints, and shard keys, but the DBA questions remain familiar: what can be lost, what can become slow, what can fail over, and how quickly can the service recover?&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Review the largest collections, inspect slow queries with execution statistics, test application behaviour during elections, validate backup restores, and challenge every proposed shard key before the platform reaches its scaling limit.&lt;/p&gt;

&lt;!--SEO Search Description: MongoDB production guide covering schema design, indexing, replica sets, WiredTiger, sharding and practical DBA lessons.--&gt;
</description><link>https://oracle-dba-help.blogspot.com/2026/10/mongodb-what-dbas-must-get-right.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxp1Wm_lUh8G7fS0ybQOR7XUgIR_GPtZ3u-csMl6msnLUIRltfZa2vy3JRo81fbyyaLEpQ9UTP5fwiJn77WgWTqHAoHTe6i_QnXEgicckCjQQiJUo8Za-M2rALnoD7XJpnRa0qUlT0XSkDlJpMu7BRBaD5biPkapvQU9V-IEEfjnQNSVVKFfrw8hZ9Z0Q/s72-w639-h425-c/mongo1.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-2237072265010505798</guid><pubDate>Fri, 25 Sep 2026 12:25:00 +0000</pubDate><atom:updated>2026-09-25T20:25:00.206+08:00</atom:updated><title>PostgreSQL Shared Buffers: A Production DBA Guide</title><description>&lt;h2 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;span style=&quot;font-size: large; font-weight: normal;&quot;&gt;A PostgreSQL server had just returned from planned operating-system maintenance. Recovery completed cleanly, connections were available, and the database log showed nothing unusual. Yet application latency was several times higher than before the restart, read IOPS had increased, and the first recommendation was to increase &lt;/span&gt;&lt;code style=&quot;font-family: courier; font-size: large; font-weight: normal;&quot;&gt;shared_buffers&lt;/code&gt;&lt;span style=&quot;font-size: large; font-weight: normal;&quot;&gt;.&lt;/span&gt;&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;That may help, but it is not a diagnosis. The PostgreSQL cache is cold after a restart. A shared-buffer miss may be served by the operating-system page cache or may reach storage. A query can also have an excellent cache-hit ratio and still be slow because it processes millions of cached blocks. On the write side, dirty buffers bring WAL, the background writer, client backends, and the checkpointer into the same performance path.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This article explains what PostgreSQL keeps in shared buffers, how cache hits and misses should be interpreted, and what happens when pages are modified. It also covers practical sizing, monitoring SQL, common production failures, and the operational differences Oracle DBAs should expect when moving from the SGA buffer cache to PostgreSQL.&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Why Buffer Sizing Becomes a Production Problem&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;shared_buffers&lt;/code&gt; defines a fixed-size shared memory area allocated when PostgreSQL starts. All databases and normal backends in the same PostgreSQL cluster use the same pool. It normally contains pages from permanent relations, including heap tables, indexes, materialized views, and system catalogs.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Most installations use an 8 KB database block size. A 4 GB setting therefore provides approximately 524,288 block-sized buffer slots. PostgreSQL caches pages, not complete query results. Finding a page in memory does not remove the CPU work required for MVCC visibility checks, filtering, joins, aggregation, row locking, or result transfer.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The setting is also not PostgreSQL&#39;s complete memory budget. Sorts and hash tables generally use &lt;code style=&quot;font-family: courier;&quot;&gt;work_mem&lt;/code&gt;. Temporary tables use session-local &lt;code style=&quot;font-family: courier;&quot;&gt;temp_buffers&lt;/code&gt;. WAL waiting to be written uses &lt;code style=&quot;font-family: courier;&quot;&gt;wal_buffers&lt;/code&gt;. The planner setting &lt;code style=&quot;font-family: courier;&quot;&gt;effective_cache_size&lt;/code&gt; allocates no memory at all; it only estimates the cache likely to be available.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;What Really Happens During a Read&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;When an execution plan requests a table or index block, the buffer manager checks whether that block is already in shared buffers. On a cache hit, the backend pins the buffer and works with the cached page. On a miss, PostgreSQL must find a reusable slot and request the page through the I/O path.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A PostgreSQL read is not automatically a physical storage read. Linux may already have the file page in its page cache. PostgreSQL statistics generally cannot distinguish a page supplied by kernel memory from one retrieved from the storage device. That is why a low PostgreSQL hit ratio and low storage IOPS can exist at the same time.&lt;/p&gt;

&lt;ol style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The executor requests a heap or index block.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The buffer manager searches the shared buffer mapping.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;On a hit, PostgreSQL uses the cached page.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;On a miss, it selects an unused or replaceable buffer.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A dirty victim may need to be written before reuse.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The requested page is loaded and the executor continues processing.&lt;/li&gt;
&lt;/ol&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Image Idea: Left-to-right flow showing Client Query -&gt; Executor -&gt; Shared Buffer Lookup. Split into Cache Hit and Cache Miss. Continue the miss path through OS Page Cache -&gt; Storage -&gt; Load Into Shared Buffers. Add the label: A PostgreSQL read does not always mean a physical disk read.--&gt;
&lt;/div&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;How PostgreSQL Chooses a Victim Buffer&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Once unused slots are exhausted, PostgreSQL uses a clock-sweep style replacement algorithm. Buffers have a usage count. Repeatedly used pages receive some protection, while pages with a low usage count become stronger replacement candidates. A pinned page cannot be replaced while a backend is actively using it.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Large scans use limited buffer-access strategies for several operations so that one scan does not automatically occupy the entire pool. Even with that protection, repeated reporting scans can displace useful OLTP pages or saturate storage. The useful signal is not simply a low hit ratio. It is a hot page being evicted and then read again shortly afterward.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGLvYKdw9MfmaSkMoYWatHViy8A2H0uIFUkW3E6fWvjYX4wcbpohC9Q_9lDQyrQ_xvqs9LNaU8mx3TFxSSrP6oCTx8GKoUqNGEn4fR8oNuyEQ6i682Ami0i_frQu1TkBSKisCxxD9grwrplXxD8fUzfg65uycWcveyuoEanWFJQHfABJHkz4FAGxz5214/s1800/postgresql-shared-buffers-read-path.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1000&quot; data-original-width=&quot;1800&quot; height=&quot;485&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGLvYKdw9MfmaSkMoYWatHViy8A2H0uIFUkW3E6fWvjYX4wcbpohC9Q_9lDQyrQ_xvqs9LNaU8mx3TFxSSrP6oCTx8GKoUqNGEn4fR8oNuyEQ6i682Ami0i_frQu1TkBSKisCxxD9grwrplXxD8fUzfg65uycWcveyuoEanWFJQHfABJHkz4FAGxz5214/w868-h485/postgresql-shared-buffers-read-path.png&quot; width=&quot;868&quot; /&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Dirty Pages, WAL, and Data-File Writes&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;An &lt;code style=&quot;font-family: courier;&quot;&gt;INSERT&lt;/code&gt;, &lt;code style=&quot;font-family: courier;&quot;&gt;UPDATE&lt;/code&gt;, or &lt;code style=&quot;font-family: courier;&quot;&gt;DELETE&lt;/code&gt; normally changes a page in shared buffers. Once the in-memory page differs from its current data-file copy, the buffer is dirty. PostgreSQL does not need to write that page to the data file at transaction commit.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For a normal WAL-logged change, PostgreSQL generates the required WAL record, modifies the shared page, and marks it dirty. Commit normally waits for the required WAL to become durable. The data page can be written later because crash recovery can replay WAL if the instance fails before the page reaches disk.&lt;/p&gt;

&lt;table style=&quot;border-collapse: collapse; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal; width: 100%;&quot;&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Writer&lt;/th&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Role in Production&lt;/th&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;DBA Signal&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Background writer&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Writes selected dirty buffers in advance to improve the supply of clean reusable buffers.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Cleaning volume and repeated stops at the configured limit.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Checkpointer&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Writes and synchronizes pages required for a checkpoint recovery boundary.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Requested checkpoints, write time, sync time, and storage latency.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Client backend&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Can write a dirty victim when it needs a reusable buffer and no clean one is ready.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Writes occurring directly in the application path.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A dirty page is not the same as an uncommitted page. One page can contain row versions created by several transactions. MVCC metadata determines visibility. WAL and the synchronization path protect durability.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Image Idea: Top-down flow showing DML -&gt; WAL Record -&gt; Dirty Shared Buffer -&gt; Commit. From WAL show Flush Before Data Page. From the dirty buffer branch to Background Writer, Checkpointer, and Client Backend, then converge on Data Files.--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Too Small and Too Large Both Create Problems&lt;/h2&gt;

&lt;table style=&quot;border-collapse: collapse; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal; width: 100%;&quot;&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Condition&lt;/th&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Typical Symptoms&lt;/th&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;What to Validate&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;shared_buffers&lt;/code&gt; too small&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Repeated reads of hot relations, rising evictions, backend writes, and unstable peak latency.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Whether evicted pages are reused, storage latency, OS cache behavior, and available memory.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;shared_buffers&lt;/code&gt; too large&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Reduced OS cache, swap risk, memory pressure during concurrency peaks, and a larger dirty working set.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Full memory exposure, container limits, connection count, query memory, WAL, and checkpoints.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The PostgreSQL documentation suggests 25% of RAM as a reasonable starting point for a dedicated server with at least 1 GB of memory. It also notes that values above roughly 40% are unlikely to work better for most workloads because PostgreSQL relies on the operating-system cache. These are starting points, not universal targets.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Do not size from total database capacity. A 5 TB database may have a 20 GB active working set. A 200 GB reporting database may scan almost everything. The access pattern and reuse interval matter more than allocated size.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;A Practical Production Scenario&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A pattern I have seen during platform migrations is a production host inheriting a lower-environment configuration. In one representative case, a server with 64 GB of RAM was running with only 512 MB of shared buffers. Query plans were unchanged, but p95 latency rose sharply during the morning peak.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;strong&gt;Problem:&lt;/strong&gt; Hot order and customer indexes were repeatedly read. &lt;code style=&quot;font-family: courier;&quot;&gt;pg_stat_io&lt;/code&gt; showed frequent evictions, storage telemetry confirmed physical reads, and client-backend writes increased during peak concurrency. The server still had safe memory headroom and no swap activity.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;strong&gt;Root cause:&lt;/strong&gt; The PostgreSQL cache was sized for a test workload, while the reusable OLTP working set was several gigabytes. The OS cache absorbed some misses but could not protect the workload when concurrent reporting started.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;strong&gt;Fix:&lt;/strong&gt; We replayed a representative workload with 8 GB and 16 GB settings, reviewed peak memory exposure, and adjusted &lt;code style=&quot;font-family: courier;&quot;&gt;max_wal_size&lt;/code&gt; to spread checkpoint-related writes. The final setting was applied during a planned restart.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;strong&gt;Result:&lt;/strong&gt; Repeated reads and evictions fell, backend writes became uncommon during the peak, and latency stabilized. The lesson was not that 25% is always correct. The improvement came from proving that a reusable working set was being displaced while the host had safe memory headroom.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;SQL and Commands for Buffer Analysis&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Start with configuration, database-level cache activity, and cluster I/O. Capture differences over a representative interval because cumulative counters can hide a short production incident.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SHOW&lt;/span&gt; shared_buffers;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;SHOW&lt;/span&gt; block_size;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; name, setting, unit, context, pending_restart &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; pg_settings &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; name &lt;span style=&quot;color: #ff79c6;&quot;&gt;IN&lt;/span&gt; ( &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;shared_buffers&#39;&lt;/span&gt;, &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;effective_cache_size&#39;&lt;/span&gt;, &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;work_mem&#39;&lt;/span&gt;, &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;max_wal_size&#39;&lt;/span&gt;, &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;checkpoint_timeout&#39;&lt;/span&gt;
) &lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; name;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; datname,
blks_read,
blks_hit,
round(
100.0 * blks_hit /
nullif(blks_hit + blks_read, 0), 2
) &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; shared_buffer_hit_pct &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; pg_stat_database &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; datname &lt;span style=&quot;color: #ff79c6;&quot;&gt;IS NOT NULL&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; shared_buffer_hit_pct;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; backend_type, object, context,
reads, hits, evictions, writes, writebacks &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; pg_stat_io &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; object = &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;relation&#39;&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; evictions &lt;span style=&quot;color: #ff79c6;&quot;&gt;DESC NULLS LAST&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;pg_stat_io&lt;/code&gt; is available from PostgreSQL 16. PostgreSQL 17 introduced &lt;code style=&quot;font-family: courier;&quot;&gt;pg_stat_checkpointer&lt;/code&gt; and moved checkpoint-related fields out of &lt;code style=&quot;font-family: courier;&quot;&gt;pg_stat_bgwriter&lt;/code&gt;. Version-aware monitoring matters. Also, &lt;code style=&quot;font-family: courier;&quot;&gt;pg_stat_bgwriter&lt;/code&gt; has never been the view for calculating the cache-hit ratio.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Query-Level and Cache Inspection&lt;/h3&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;EXPLAIN&lt;/span&gt; (ANALYZE, BUFFERS, WAL, TIMING OFF)
&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; order_id, customer_id, order_status
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; orders
&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; customer_id = &lt;span style=&quot;color: #8be9fd;&quot;&gt;1001&lt;/span&gt;;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;CREATE EXTENSION IF NOT EXISTS&lt;/span&gt; pg_buffercache;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; count(*) &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; total_buffers,
count(*) &lt;span style=&quot;color: #ff79c6;&quot;&gt;FILTER&lt;/span&gt; (&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; relfilenode &lt;span style=&quot;color: #ff79c6;&quot;&gt;IS NOT NULL&lt;/span&gt;) &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; used_buffers,
count(*) &lt;span style=&quot;color: #ff79c6;&quot;&gt;FILTER&lt;/span&gt; (&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; isdirty) &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; dirty_buffers,
round(avg(usagecount)::numeric, 2) &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; avg_usage_count &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; pg_buffercache;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;EXPLAIN (ANALYZE)&lt;/code&gt; executes the SQL. Do not run production DML casually to obtain buffer statistics. A plan reporting only shared hits can still be expensive if it touches hundreds of thousands of cached blocks. Logical I/O consumes CPU and can create contention.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Operating-System Correlation and Configuration Review&lt;/h3&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;free -h
vmstat 1 10
iostat -xz 1 10

# Example values for review, not a universal recommendation

shared_buffers = &#39;16GB&#39;
effective_cache_size = &#39;44GB&#39;
max_wal_size = &#39;32GB&#39;
checkpoint_timeout = &#39;15min&#39;
checkpoint_completion_target = 0.9&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Check swap, run queue, device utilization, throughput, and read/write latency. Increasing shared buffers requires a restart. A substantial increase should be reviewed with WAL volume, &lt;code style=&quot;font-family: courier;&quot;&gt;max_wal_size&lt;/code&gt;, checkpoint frequency, recovery-time expectations, and disk-space planning.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Oracle Buffer Cache vs PostgreSQL&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle DBAs will recognize the basic design. Oracle&#39;s database buffer cache is a shared SGA component containing data blocks, while DBWn writes dirty buffers. PostgreSQL shared buffers serve a comparable purpose, but the sizing and write paths are not identical.&lt;/p&gt;

&lt;table style=&quot;border-collapse: collapse; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal; width: 100%;&quot;&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Area&lt;/th&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;PostgreSQL&lt;/th&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Oracle&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Primary cache&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;shared_buffers&lt;/code&gt;, shared across databases in one cluster.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Database buffer cache inside the SGA.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Durability&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;WAL protects changes before related data pages become durable.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Redo provides the corresponding instance-recovery protection.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Dirty-page writer&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Background writer, checkpointer, and sometimes client backends.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;DBWn writes dirty buffers and supports checkpoint progress.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Replacement&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Clock-sweep behavior using usage counts and buffer pins.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;LRU-based mechanisms using touch counts and internal lists.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Sizing model&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Fixed at server start and deliberately leaves room for the OS cache.&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;DB_CACHE_SIZE&lt;/code&gt; can operate within SGA memory management such as ASMM.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; name, display_value
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; v$parameter
&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; name &lt;span style=&quot;color: #ff79c6;&quot;&gt;IN&lt;/span&gt; (
  &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;db_cache_size&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;sga_target&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;memory_target&#39;&lt;/span&gt;
);

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; name, block_size, current_size, buffers &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; v$buffer_pool;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; name, physical_reads, db_block_gets, consistent_gets &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; v$buffer_pool_statistics;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;In both products, the hit ratio can mislead. An Oracle query performing excessive consistent gets and a PostgreSQL query performing excessive shared hits can both be slow without generating many physical reads. Logical I/O is not free.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Image Idea: Split diagram. PostgreSQL side shows Shared Buffers + OS Page Cache, WAL, Background Writer, Checkpointer, and Backend Writes. Oracle side shows SGA Buffer Cache, Redo, DBWn, and Checkpoint Queue. Add arrows from both caches to their data files.--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Common Failure and Troubleshooting Patterns&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;High Reads Immediately After Restart&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The cache is cold. Check whether read latency and IOPS fall as the workload warms the pool. Do not resize from the first few minutes unless warm-up itself breaks the service objective.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Excellent Hit Ratio but Slow SQL&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Review &lt;code style=&quot;font-family: courier;&quot;&gt;EXPLAIN (ANALYZE, BUFFERS)&lt;/code&gt;. Look for excessive block access, poor joins, missing predicates, repeated nested-loop reads, and rows removed by filters.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Evictions Rise While the Host Has Free Memory&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This can support testing a larger pool, but first confirm that the evicted pages are needed again. A one-time sequential scan may not benefit from a permanent increase.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Backend Writes Increase During Traffic Peaks&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Review buffer pressure, background-writer activity, checkpoint timing, and storage latency together. More aggressive background cleaning may reduce backend work but can increase steady write traffic.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Temporary Files Remain High After a Cache Increase&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Shared buffers do not store sort and hash spill files. Review &lt;code style=&quot;font-family: courier;&quot;&gt;work_mem&lt;/code&gt;, plan shape, concurrency, and temporary-file logging instead of increasing the wrong memory area.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;The Server Starts Swapping&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Revisit the full memory budget immediately. Include connections, parallel workers, autovacuum, per-operation memory, extensions, agents, and container limits. A larger cache is not an improvement if active PostgreSQL processes are paged out.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Image Idea: Troubleshooting decision flow. Start with High PostgreSQL Reads. Branch to Just Restarted?, Storage I/O Also High?, Evictions Rising?, and Same Pages Read Repeatedly?. End with Normal Warm-Up, OS Cache Service, Query Tuning, Buffer Resize Test, and Storage Investigation.--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Lessons From the Field&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The first common mistake is treating 25% of RAM as a finished design. It is only a starting point. The useful cache size depends on reuse, concurrency, the OS cache, storage, and the memory needed outside the buffer pool.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The second mistake is tuning from cumulative ratios. Capture deltas during the incident window. Separate restart warm-up, reporting, autovacuum, backup activity, and business traffic. One percentage covering all of them is rarely actionable.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The third mistake is increasing memory before reviewing SQL. Cached block access still consumes CPU. A missing index or poor join remains expensive even if every required page is already in memory.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Finally, watch the write side. Backend writes, requested checkpoints, dirty-buffer volume, and storage sync latency can explain application spikes that a cache-hit ratio cannot. The real target is stable latency with predictable memory and I/O behavior at peak load.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Quick Takeaways&lt;/h2&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Shared buffers cache relation pages and hold the normal working pages modified by DML.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A shared-buffer miss is not proof of physical storage I/O.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Dirty buffers can be written by the background writer, checkpointer, or a client backend.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A high cache-hit ratio does not prove that a query is efficient.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Size for reusable working data and the full memory budget, not total database size.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Review WAL and checkpoint behavior when substantially increasing the pool.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Correlate PostgreSQL statistics with operating-system and storage telemetry.&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Frequently Asked Questions&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Should shared_buffers always be 25% of RAM?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;No. Use it as a starting point for a dedicated server, then validate working-set reuse, OS memory, concurrency, checkpoints, and storage performance. Managed platforms may calculate or restrict the value differently.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Why is the hit ratio low when storage latency is normal?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The operating-system page cache may be satisfying PostgreSQL reads. The workload may also contain expected sequential or bulk reads. Compare PostgreSQL counters with device I/O.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Will increasing shared_buffers eliminate disk reads?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;No. Cold starts, one-time scans, changing access patterns, and datasets larger than memory still generate reads. Poor SQL can also touch more blocks than any sensible cache should retain.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Can the setting be changed without a restart?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;No. It is a server-start parameter. Check &lt;code style=&quot;font-family: courier;&quot;&gt;pg_settings.pending_restart&lt;/code&gt; to confirm whether a configured change is waiting for restart.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Which view should be used for cache hits?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Use &lt;code style=&quot;font-family: courier;&quot;&gt;pg_stat_database&lt;/code&gt; for database-level hits, &lt;code style=&quot;font-family: courier;&quot;&gt;pg_statio_*&lt;/code&gt; for relations, &lt;code style=&quot;font-family: courier;&quot;&gt;EXPLAIN (BUFFERS)&lt;/code&gt; for a query, and &lt;code style=&quot;font-family: courier;&quot;&gt;pg_stat_io&lt;/code&gt; for cluster I/O by backend type and context.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Shared buffers sit at the center of PostgreSQL&#39;s normal table and index I/O path. They reduce repeated reads, hold pages changed by DML, and connect directly to WAL, checkpoints, background writing, and crash recovery. That makes &lt;code style=&quot;font-family: courier;&quot;&gt;shared_buffers&lt;/code&gt; one of the first parameters DBAs inspect, but it should not become the automatic answer to every performance problem.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;An undersized pool can repeatedly evict useful pages and expose applications to storage latency. An oversized pool can starve the operating system, increase total memory risk, and complicate write behavior. A cache hit avoids a PostgreSQL file read, but it does not make query processing free. A cache miss may still be served from kernel memory. These details explain why a cache-hit percentage alone is weak tuning evidence.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Start with a sensible allocation, then measure the workload that matters. Capture short-interval changes in reads, hits, evictions, backend writes, checkpoints, and storage latency. Review which relations and SQL statements are responsible. Test changes under realistic concurrency, leave headroom for the OS and per-session memory, and compare the same metrics after restart and cache warm-up.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Review your current setting, prove whether hot pages are being displaced, and confirm the finding outside PostgreSQL before scheduling a restart. Measure, test, change, and monitor. Do not size the buffer cache from folklore.&lt;/p&gt;

&lt;h2 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;span style=&quot;font-size: large; font-weight: normal;&quot;&gt;Have you handled an incident caused by buffer churn, backend writes, or an oversized memory setting? Share the evidence you used and whether resizing the pool actually fixed the problem.&lt;/span&gt;&lt;/h2&gt;&lt;div&gt;&lt;span style=&quot;font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;References&lt;/h2&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/runtime-config-resource.html&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;PostgreSQL Documentation: Resource Consumption&lt;/a&gt;&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/monitoring-stats.html&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;PostgreSQL Documentation: Cumulative Statistics&lt;/a&gt;&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;a href=&quot;https://www.postgresql.org/docs/current/pgbuffercache.html&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;PostgreSQL Documentation: pg_buffercache&lt;/a&gt;&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;a href=&quot;https://docs.oracle.com/en/database/oracle/oracle-database/26/dbiad/db_dbbuffercache.html&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;Oracle Database Documentation: Buffer Cache&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description><link>https://oracle-dba-help.blogspot.com/2026/09/postgresql-shared-buffers-production.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGLvYKdw9MfmaSkMoYWatHViy8A2H0uIFUkW3E6fWvjYX4wcbpohC9Q_9lDQyrQ_xvqs9LNaU8mx3TFxSSrP6oCTx8GKoUqNGEn4fR8oNuyEQ6i682Ami0i_frQu1TkBSKisCxxD9grwrplXxD8fUzfg65uycWcveyuoEanWFJQHfABJHkz4FAGxz5214/s72-w868-h485-c/postgresql-shared-buffers-read-path.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-455834374851991197</guid><pubDate>Mon, 21 Sep 2026 14:24:08 +0000</pubDate><atom:updated>2026-09-22T16:40:27.385+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Interview Questions</category><category domain="http://www.blogger.com/atom/ns#">Must Read</category><category domain="http://www.blogger.com/atom/ns#">RAC</category><title>Oracle RAC - Oracle DBA Interview Questions with Practical Answers</title><description>&lt;div style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Oracle DBA interviews, especially for senior roles, usually go beyond definitions. The discussion often moves quickly into troubleshooting, recovery, RAC, Data Guard, patching, GoldenGate, and real production scenarios.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Below are some recent Oracle DBA interview questions reportedly asked in a product-based organization, along with practical answers and the checks I would expect a DBA to discuss during an interview.&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;1. Explain the Oracle RAC startup sequence.&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
RAC startup is dependency-driven. Oracle does not simply start the database instances first.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
A simplified startup sequence is:
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
&lt;strong&gt;OHASD → CSSD / CRSD / EVMD → ASM → VIP / Listener / SCAN → Database Instances → Services&lt;/strong&gt;
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Clusterware first establishes cluster membership and access to voting resources. ASM must be available before the database can access its files. Database instances and application services are then started according to Clusterware resource dependencies.
&lt;/p&gt;

&lt;pre style=&quot;background-color: whitesmoke; border: 1px solid rgb(221, 221, 221); overflow-x: auto; padding: 12px;&quot;&gt;&lt;code&gt;crsctl check crs
crsctl stat res -t
srvctl status database -d &amp;lt;db_unique_name&amp;gt;&lt;/code&gt;&lt;/pre&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;2. What are the ways to resolve lag in a standby database?&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
The first step is to determine whether the problem is &lt;strong&gt;transport lag&lt;/strong&gt; or &lt;strong&gt;apply lag&lt;/strong&gt;.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
For transport lag, I would check redo shipping, archive destination errors, network latency, archive gaps and standby redo log configuration. For apply lag, I would check managed recovery, CPU and I/O pressure on the standby, recovery waits and whether real-time apply is being used.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Useful views include:
&lt;/p&gt;

&lt;pre style=&quot;background-color: whitesmoke; border: 1px solid rgb(221, 221, 221); overflow-x: auto; padding: 12px;&quot;&gt;&lt;code&gt;V$DATAGUARD_STATS
V$ARCHIVE_DEST_STATUS
V$ARCHIVED_LOG
V$DATAGUARD_PROCESS&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Restarting MRP may recover a stopped recovery process, but it should not be treated as the solution until the actual reason for the lag is understood.
&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;3. Explain the export steps for an audit trail table.&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
The approach depends on whether the database uses traditional auditing or Unified Auditing.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
For Unified Auditing, the required records can be selected from &lt;code&gt;UNIFIED_AUDIT_TRAIL&lt;/code&gt; into an archive table and that table can then be exported using Data Pump.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
For traditional auditing, &lt;code&gt;SYS.AUD$&lt;/code&gt; may be involved, but audit management should preferably be performed using &lt;code&gt;DBMS_AUDIT_MGMT&lt;/code&gt; rather than directly manipulating SYS-owned audit tables.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Before exporting, I would define the required date range and scope so that unnecessary historical audit data is not included.
&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;4. Explain important RAC background processes.&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Some important RAC-specific processes are:
&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
&lt;li&gt;&lt;strong&gt;LMON&lt;/strong&gt; – Monitors Global Enqueue Service activity and participates in cluster reconfiguration.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LMD&lt;/strong&gt; – Handles global enqueue requests and global deadlock detection.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LMS&lt;/strong&gt; – Handles Cache Fusion block transfers between RAC instances.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LMHB&lt;/strong&gt; – Monitors RAC lock-management processes and detects hangs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
These processes work with the Global Cache Service and Global Enqueue Service to coordinate resources across RAC instances.
&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;5. If STANDBY_FILE_MANAGEMENT is MANUAL, what happens when a datafile is added on primary?&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
The standby does not automatically create and manage the corresponding datafile.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
During managed recovery, Oracle may register the new file using a name such as &lt;code&gt;UNNAMEDxxxxx&lt;/code&gt;, and recovery can stop because the expected standby datafile does not exist.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
After identifying the file number and correct destination, the file can be created at the required standby location and managed recovery restarted.
&lt;/p&gt;

&lt;pre style=&quot;background-color: whitesmoke; border: 1px solid rgb(221, 221, 221); overflow-x: auto; padding: 12px;&quot;&gt;&lt;code&gt;ALTER DATABASE CREATE DATAFILE
&#39;&amp;lt;UNNAMED_file&amp;gt;&#39;
AS &#39;&amp;lt;standby_datafile_path&amp;gt;&#39;;&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
With &lt;code&gt;STANDBY_FILE_MANAGEMENT=AUTO&lt;/code&gt;, Oracle can normally handle new files automatically when OMF or the relevant filename conversion configuration is correct.
&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;6. A dump contains 10 schemas. How would you import only one?&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Use the &lt;code&gt;SCHEMAS&lt;/code&gt; parameter with Data Pump Import.
&lt;/p&gt;

&lt;pre style=&quot;background-color: whitesmoke; border: 1px solid rgb(221, 221, 221); overflow-x: auto; padding: 12px;&quot;&gt;&lt;code&gt;impdp system/***** \
DIRECTORY=DP_DIR \
DUMPFILE=exp.dmp \
SCHEMAS=HR&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
If the schema has to be imported under a different name:
&lt;/p&gt;

&lt;pre style=&quot;background-color: whitesmoke; border: 1px solid rgb(221, 221, 221); overflow-x: auto; padding: 12px;&quot;&gt;&lt;code&gt;REMAP_SCHEMA=HR:HR_TEST&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
If the requirement is actually to import only one table, then &lt;code&gt;TABLES&lt;/code&gt; should be used instead. A table can also be renamed during import using &lt;code&gt;REMAP_TABLE&lt;/code&gt;.
&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;7. What causes a split-brain scenario?&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Split brain can occur when RAC nodes lose communication with each other while individual nodes remain alive and believe they can continue servicing the database.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Possible causes include private interconnect failure, network partitioning, severe latency, OS hangs, heartbeat failures or voting-disk accessibility problems.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Oracle Clusterware protects the cluster using network and disk heartbeats. A node that cannot maintain valid cluster membership can be evicted to protect database integrity.
&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;8. If the whole RAC cluster goes down, how would you bring it back?&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
I would first determine why the cluster went down rather than immediately attempting database startup.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
The basic validation order would be:
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
&lt;strong&gt;Servers → Storage → Interconnect → Voting/OCR → Clusterware → ASM → Listeners → Database → Services&lt;/strong&gt;
&lt;/p&gt;

&lt;pre style=&quot;background-color: whitesmoke; border: 1px solid rgb(221, 221, 221); overflow-x: auto; padding: 12px;&quot;&gt;&lt;code&gt;crsctl check crs
crsctl start crs
crsctl stat res -t&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
After recovery, I would verify instance status, ASM disk groups, services and both Clusterware and database alert logs to understand the original failure.
&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;9. Explain Cache Fusion.&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Cache Fusion allows RAC instances to transfer database blocks directly between their buffer caches through the private interconnect.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
If Instance 1 has the required current block and Instance 2 requests it, Oracle can transfer the block through the interconnect instead of forcing Instance 1 to write it to disk and Instance 2 to read it back.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
The Global Cache Service manages block ownership and LMS processes participate in the block transfer.
&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;10. Explain Oracle patching steps.&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
A production patching activity normally follows this sequence:
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
&lt;strong&gt;Read README → Compatibility check → OPatch validation → Inventory check → Prerequisite checks → Backup → Apply patch → Start services → Run datapatch → Validate&lt;/strong&gt;
&lt;/p&gt;

&lt;pre style=&quot;background-color: whitesmoke; border: 1px solid rgb(221, 221, 221); overflow-x: auto; padding: 12px;&quot;&gt;&lt;code&gt;opatch lsinventory

datapatch -verbose&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
After patching, I would verify &lt;code&gt;DBA_REGISTRY_SQLPATCH&lt;/code&gt;, database and Clusterware logs, component status and application connectivity.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
For RAC and Grid Infrastructure, whether the patch can be applied in rolling mode depends on the specific patch and Oracle&#39;s documented instructions.
&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;11. I have a full database backup in two different locations. How would you restore the database?&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
First I would make sure RMAN can see the required backup pieces. If the backup files have been moved or copied, they may need to be cataloged.
&lt;/p&gt;

&lt;pre style=&quot;background-color: whitesmoke; border: 1px solid rgb(221, 221, 221); overflow-x: auto; padding: 12px;&quot;&gt;&lt;code&gt;CATALOG START WITH &#39;&amp;lt;backup_location&amp;gt;&#39;;

RESTORE DATABASE;
RECOVER DATABASE;&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
The complete sequence may include restoring the SPFILE and controlfile, mounting the database, cataloging backup pieces, restoring datafiles, recovering the database and finally opening it.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
If incomplete recovery is performed or a backup controlfile is involved, opening with &lt;code&gt;RESETLOGS&lt;/code&gt; may be required.
&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;12. Normally 100 processes run, but during peak hours it suddenly becomes 300. What would you check?&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
I would first identify where those additional connections came from instead of immediately increasing the &lt;code&gt;PROCESSES&lt;/code&gt; parameter.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
I would group sessions by username, machine, program, module, service and session status.
&lt;/p&gt;

&lt;pre style=&quot;background-color: whitesmoke; border: 1px solid rgb(221, 221, 221); overflow-x: auto; padding: 12px;&quot;&gt;&lt;code&gt;V$SESSION
GV$SESSION
V$RESOURCE_LIMIT&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Then I would investigate connection-pool behaviour, application connection leaks, batch jobs, deployments, idle session accumulation, blocking sessions, listener connection storms and CPU or memory pressure.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
ASH and AWR can also help establish what changed during the spike.
&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;13. What are the different switchover statuses and what do they mean?&lt;/h2&gt;

&lt;pre style=&quot;background-color: whitesmoke; border: 1px solid rgb(221, 221, 221); overflow-x: auto; padding: 12px;&quot;&gt;&lt;code&gt;SELECT switchover_status
FROM v$database;&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Some important values are:
&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
&lt;li&gt;&lt;strong&gt;TO STANDBY&lt;/strong&gt; – Primary is ready to transition to standby.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SESSIONS ACTIVE&lt;/strong&gt; – Switchover is possible, but active sessions are present.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TO PRIMARY&lt;/strong&gt; – Standby is ready to become primary.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;RECOVERY NEEDED&lt;/strong&gt; – Additional redo must be applied before the transition.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;NOT ALLOWED&lt;/strong&gt; – The database is not currently ready for the requested transition.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Other statuses can appear depending on redo gaps or the current stage of the switchover. The important point is to understand why the role transition is or is not currently possible.
&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;14. What happens when active sessions are disconnected during switchover?&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
When the switchover is performed using the option that allows active sessions to be disconnected, Oracle can proceed with the role transition even when user sessions still exist.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Those sessions are disconnected and any uncommitted transactions may require rollback. Oracle then completes the required role-transition processing and updates the database role.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
In production, application connections should still be drained gracefully wherever possible before the switchover.
&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;15. Explain Oracle GoldenGate processes.&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
In a traditional GoldenGate architecture, the logical flow is:
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
&lt;strong&gt;Source Database → Extract → Local Trail → Data Pump → Remote Trail → Replicat → Target Database&lt;/strong&gt;
&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
&lt;li&gt;&lt;strong&gt;Manager&lt;/strong&gt; – Manages GoldenGate processes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Extract&lt;/strong&gt; – Captures database changes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data Pump&lt;/strong&gt; – Optionally sends trail data to the target environment.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Trail Files&lt;/strong&gt; – Store captured change records.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Replicat&lt;/strong&gt; – Applies changes to the target database.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Integrated Extract also uses Oracle database mining infrastructure to capture changes from redo.
&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;16. What are the steps to drop an Oracle database?&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Before dropping a database, I would confirm the database identity, verify approvals and make sure any required backups have been retained.
&lt;/p&gt;

&lt;pre style=&quot;background-color: whitesmoke; border: 1px solid rgb(221, 221, 221); overflow-x: auto; padding: 12px;&quot;&gt;&lt;code&gt;STARTUP FORCE MOUNT RESTRICT;

DROP DATABASE;&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
For RAC, the database configuration may also need to be removed from Clusterware using the appropriate &lt;code&gt;srvctl&lt;/code&gt; command.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Archived logs, RMAN backups, diagnostic files and other external configuration may require separate cleanup depending on the decommissioning procedure.
&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;17. What redo and Data Guard parameters are normally configured?&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Common Data Guard parameters include:
&lt;/p&gt;

&lt;pre style=&quot;background-color: whitesmoke; border: 1px solid rgb(221, 221, 221); overflow-x: auto; padding: 12px;&quot;&gt;&lt;code&gt;DB_UNIQUE_NAME
LOG_ARCHIVE_CONFIG
LOG_ARCHIVE_DEST_n
LOG_ARCHIVE_DEST_STATE_n
FAL_SERVER
STANDBY_FILE_MANAGEMENT
DB_FILE_NAME_CONVERT
LOG_FILE_NAME_CONVERT&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
The filename-conversion parameters are particularly relevant when primary and standby file locations differ and Oracle Managed Files are not being used.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
I would also verify FORCE LOGGING, standby redo logs, password-file synchronization and redo transport configuration because Data Guard readiness is not only about initialization parameters.
&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;18. Explain manual Grid Infrastructure patching steps.&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
The exact sequence should always come from the README supplied with the specific Grid Infrastructure Release Update.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
For a rolling manual patch, the general approach is:
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
&lt;strong&gt;Prerequisite checks → Backup configuration → Prepatch → Patch Grid Home → Postpatch → Validate node → Continue with next node&lt;/strong&gt;
&lt;/p&gt;

&lt;pre style=&quot;background-color: whitesmoke; border: 1px solid rgb(221, 221, 221); overflow-x: auto; padding: 12px;&quot;&gt;&lt;code&gt;rootcrs.sh -prepatch

# Apply the required patch using the procedure
# documented for the specific RU.

rootcrs.sh -postpatch

crsctl stat res -t
opatch lsinventory&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Once a node is healthy, the same procedure can be performed on the remaining nodes. If database homes are also patched, the required SQL patching with &lt;code&gt;datapatch&lt;/code&gt; must also be completed.
&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;19. Even after killing a session, why might it still appear?&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Executing &lt;code&gt;ALTER SYSTEM KILL SESSION&lt;/code&gt; does not necessarily mean that the corresponding operating-system process disappears immediately.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
A session can remain in &lt;code&gt;KILLED&lt;/code&gt; state while Oracle completes cleanup.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Possible reasons include a large transaction rollback, PMON cleanup, an OS-level process stuck in an I/O call, network waits, distributed transaction cleanup or another uninterruptible operation.
&lt;/p&gt;

&lt;pre style=&quot;background-color: whitesmoke; border: 1px solid rgb(221, 221, 221); overflow-x: auto; padding: 12px;&quot;&gt;&lt;code&gt;V$SESSION
V$PROCESS
V$TRANSACTION&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
In RAC, I would also confirm which instance owns the session before attempting further action. Killing the operating-system process should only be considered after identifying exactly what that process is doing.
&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;One Point Worth Remembering During DBA Interviews&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
For experienced DBA roles, knowing the command is usually only the beginning of the discussion.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
The next questions are often:
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
&lt;strong&gt;How would you verify it?&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;Which view or log would you check?&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;What if the first solution does not work?&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;How would you validate the database after the change?&lt;/strong&gt;
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
A practical way to structure most troubleshooting answers is:
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal; text-align: center;&quot;&gt;
&lt;strong&gt;Symptom → Evidence → Component → Action → Validation&lt;/strong&gt;
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
That usually makes the difference between giving a memorized answer and showing how you would actually handle the situation as a DBA.
&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
Have you encountered any of these questions in an Oracle DBA interview? And more importantly, how many of these scenarios have you actually tested in your own lab or environment? 🙂
&lt;/p&gt;

&lt;/div&gt;
</description><link>https://oracle-dba-help.blogspot.com/2026/09/oracle-rac-oracle-dba-interview.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-6938129760613756304</guid><pubDate>Mon, 21 Sep 2026 08:02:02 +0000</pubDate><atom:updated>2026-09-21T18:50:35.412+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">26ai</category><category domain="http://www.blogger.com/atom/ns#">AI</category><category domain="http://www.blogger.com/atom/ns#">Core DBA</category><category domain="http://www.blogger.com/atom/ns#">Exam Prep</category><title>My Learning and Exam Experience – Oracle  Agentic AI Foundations Associate [1Z0-1157-26]</title><description>&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;I recently completed the &lt;/span&gt;&lt;strong style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;Oracle 1Z0-1157-26 – Agentic AI Foundations Associate&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt; exam.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;I had been reading and learning about AI agents, MCP, vector search and some of the newer AI capabilities around Oracle for a while, so this certification came at a good time. I decided to go through the complete learning path rather than preparing only from an exam point of view.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;And I think that is the right way to approach this one.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: large;&quot;&gt;What I liked about this course&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;One thing I liked is that the course does not assume that everyone already understands how an AI agent works.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;It starts with a fairly simple question: &lt;/span&gt;&lt;strong style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;what actually makes something an AI agent?&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;From there, it introduces the role of the LLM, tools and the orchestration loop, and then moves into reasoning patterns such as Chain-of-Thought and ReAct, along with safety and guardrails.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;That foundation helps because the later topics make much more sense once you understand the basic agent execution flow.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;The course then moves through &lt;strong&gt;LangChain, Model Context Protocol (MCP), OpenAI Responses API and Agents SDK, OCI Enterprise AI Agents, and finally Agentic AI capabilities around Oracle AI Database&lt;/strong&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;It is not only about learning definitions. Oracle&#39;s current course also includes practical exposure to building AI agents and understanding how these pieces fit together. (Refer &amp;gt;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://mylearn.oracle.com/ou/course/oracle-agentic-ai-foundations/163240&quot; style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot; title=&quot;Oracle MyLearn&quot;&gt;Oracle MyLearn&lt;/a&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: large;&quot;&gt;MCP was one of the interesting parts for me&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;Before going through this learning path, MCP was something I had seen mentioned more and more whenever AI agents were discussed.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;The course gives a good foundation around &lt;strong&gt;MCP hosts, clients, servers, tools, resources and prompts&lt;/strong&gt;, along with JSON-RPC messaging and the different transport options.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;Understanding MCP also makes it easier to see why it is becoming relevant. Instead of every AI application building its own custom integration for every external tool or data source, MCP provides a standard way for these components to communicate.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;For anyone starting with Agentic AI, I think this is an area worth spending some extra time on rather than just remembering the terminology for the exam.&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: large;&quot;&gt;The Oracle Database part made it more relevant&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;The later part of the course was particularly interesting because it brings Agentic AI closer to the database.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;It covers &lt;i&gt;&lt;strong&gt;Oracle AI Vector Search, vector embeddings, similarity search, document chunking, Select AI, Private Agent Factory and the Autonomous AI Database MCP Server&lt;/strong&gt;.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;This is where some of the concepts from the earlier modules start connecting together.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;You first learn what an agent is, how it calls tools and how MCP works. Then you see how similar ideas can be used with enterprise data sitting inside Oracle AI Database.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;For database professionals, I think this part is especially useful because AI is no longer something completely separate from the database world. We are gradually seeing these capabilities getting closer to where enterprise data actually resides.&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: large;&quot;&gt;About the 1Z0-1157-26 exam&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;The exam format is quite straightforward:&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;&lt;strong&gt;Exam:&lt;/strong&gt; 1Z0-1157-26 – Agentic AI Foundations Associate&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;&lt;strong&gt;Questions:&lt;/strong&gt; 40&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;&lt;strong&gt;Duration:&lt;/strong&gt; 60 minutes&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;&lt;strong&gt;Passing score:&lt;/strong&gt; 65%&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;The questions are mostly foundation and concept-oriented, but I would not recommend relying only on memorizing definitions.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;You should understand things such as what happens during an agent loop, how tools are invoked, the difference between various MCP components, how handoffs work between agents, the purpose of guardrails, and the basic workflow behind embeddings and vector search.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;Oracle&#39;s learning path also includes skill checks, exam-preparation material and a practice exam before the certification exam. The certification is currently offered free of charge. (&lt;a href=&quot;https://blogs.oracle.com/oracleuniversity/oracle-agentic-ai-foundations-training-certification-now-available?utm_source=chatgpt.com&quot; title=&quot;Oracle Agentic AI Foundations: Get skilled for the Agentic AI Era | oracleuniversity&quot;&gt;Oracle Blogs&lt;/a&gt;)&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #e06666; font-size: large;&quot;&gt;How I would prepare&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;My suggestion would be to complete the learning material first and then use the practice exam to identify areas where the concepts are still not completely clear.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;&lt;u&gt;I would pay particular attention to&lt;/u&gt;&amp;nbsp; -- &amp;gt;&amp;nbsp; agent architecture and execution flow, LangChain tools and agents, MCP architecture, OpenAI Agents SDK concepts, OCI Enterprise AI Agents, embeddings and Oracle AI Vector Search.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;For several topics, understanding &lt;em&gt;why&lt;/em&gt; a particular component exists is more useful than simply remembering what it is called.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;That approach also makes the learning useful after the certification is finished.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: large;&quot;&gt;Should you take this course ?&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;I would encourage anyone who is curious about &lt;strong&gt;Agentic AI&lt;/strong&gt; to go through this course.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;You do not necessarily need to be working as an AI or ML engineer to get value from it. If you are working with databases, cloud infrastructure, development, DevOps/SRE or OCI, it gives you a good starting point for understanding where AI agents are heading and how they can interact with existing enterprise systems.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;Oracle describes the course as a practical introduction that starts from first principles and then works through LangChain, OpenAI Agents SDK, MCP, OCI Enterprise AI Agents and Oracle AI Database.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;That is probably the part I liked most about it: you don&#39;t have to begin as an Agentic AI expert.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;Start with the fundamentals, understand how an agent works, and the rest of the pieces gradually start making sense.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: large;&quot;&gt;My Recommendation&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;If Agentic AI is something you have been hearing about but haven&#39;t yet found a structured place to start, I would definitely recommend giving this learning path a try.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;And I would not approach it only with the goal of clearing &lt;strong&gt;1Z0-1157-26&lt;/strong&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;Take some time to understand the agent loop. Build something small. Understand why tools are needed. Look at how MCP connects systems, and then see how those same ideas are being brought into OCI and Oracle AI Database.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;The certification is a nice milestone at the end, but the real value is understanding how these technologies are beginning to fit together.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;If you have been planning to start learning Agentic AI, this is a good course to begin with.&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;References&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;&lt;strong&gt;Oracle Agentic AI Foundations (2026) – Oracle MyLearn&lt;/strong&gt;&lt;br /&gt;&lt;a href=&quot;https://mylearn.oracle.com/ou/course/oracle-agentic-ai-foundations/163240&quot;&gt;Oracle Agentic AI Foundations course&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;&lt;strong&gt;Oracle University – Agentic AI Foundations Training &amp;amp; Certification&lt;/strong&gt;&lt;br /&gt;&lt;a href=&quot;https://blogs.oracle.com/oracleuniversity/oracle-agentic-ai-foundations-training-certification-now-available?&quot;&gt;Oracle Agentic AI Foundations: Get skilled for the Agentic AI Era&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiodFF41NUDuGoz2Py9xv5YtIJ8u0iSpa3Q44zLafPKtidUpWWi7aomODqxd4Wv-pEgDGjmU9PCkX1MMi10-BuyI9S4RAH74bR_lE3SsWt4Bs1kPTnjfet5SQiVjzLhJ3SdDE05guQg6nCl-AfhcPVbXOz0oFS7O46k7gXgMgzNrz3geehysKKguIladGA&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;797&quot; data-original-width=&quot;1157&quot; height=&quot;679&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiodFF41NUDuGoz2Py9xv5YtIJ8u0iSpa3Q44zLafPKtidUpWWi7aomODqxd4Wv-pEgDGjmU9PCkX1MMi10-BuyI9S4RAH74bR_lE3SsWt4Bs1kPTnjfet5SQiVjzLhJ3SdDE05guQg6nCl-AfhcPVbXOz0oFS7O46k7gXgMgzNrz3geehysKKguIladGA=w986-h679&quot; width=&quot;986&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Cheers..! 🫡🙌😊&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;</description><link>https://oracle-dba-help.blogspot.com/2026/09/oracle-1z0-1157-26-agentic-ai.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEiodFF41NUDuGoz2Py9xv5YtIJ8u0iSpa3Q44zLafPKtidUpWWi7aomODqxd4Wv-pEgDGjmU9PCkX1MMi10-BuyI9S4RAH74bR_lE3SsWt4Bs1kPTnjfet5SQiVjzLhJ3SdDE05guQg6nCl-AfhcPVbXOz0oFS7O46k7gXgMgzNrz3geehysKKguIladGA=s72-w986-h679-c" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-772187452464741156</guid><pubDate>Sun, 20 Sep 2026 05:25:00 +0000</pubDate><atom:updated>2026-09-21T20:09:56.331+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">19c</category><category domain="http://www.blogger.com/atom/ns#">DataGuard</category><title>Oracle Standby Redo Logs: The Gap Most DBAs Miss</title><description>&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The first warning often appears during a DR drill. Redo transport is healthy, managed recovery is running, and the standby looks ready. Then Data Guard Broker reports insufficient standby redo logs, or apply lag starts rising after an online redo log resize even though the network has no visible problem.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This is why I do not validate standby redo logs only by checking whether rows exist in &lt;code style=&quot;font-family: courier;&quot;&gt;V$STANDBY_LOG&lt;/code&gt;. The count must be correct for every redo thread, the sizes must match the primary redo layout, RFS must actually be using them, and the same preparation should exist on the current primary for the next role transition.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;There is another misconception worth clearing up early. Standby redo logs improve how received redo is stored and applied. They do not convert asynchronous transport into a guaranteed zero-data-loss service. Protection mode, transport progress and apply progress are three different parts of the Data Guard path.&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The discussion below focuses mainly on physical standby databases and the checks that matter in production: real-time apply, the required SRL count, RAC thread coverage, role readiness, storage pressure and the lag patterns that expose a broken receive path.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;What a Standby Redo Log Changes&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;An online redo log belongs to the database while it is operating in the primary role. A standby redo log, or SRL, is a receiving structure. On a physical standby, the remote file server process, RFS, receives redo from the source database and writes it into the current SRL.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The managed recovery process can read that SRL while it is still being filled. This is real-time apply. Recovery does not need to wait for the current redo sequence to complete and become an archived redo log before applying it to the standby datafiles.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;From Oracle Database 12.1 onward, the old &lt;code style=&quot;font-family: courier;&quot;&gt;USING CURRENT LOGFILE&lt;/code&gt; clause is deprecated and is no longer needed to start real-time apply. Starting managed recovery normally enables real-time apply when the standby is in &lt;code style=&quot;font-family: courier;&quot;&gt;ARCHIVELOG&lt;/code&gt; mode and usable SRLs are available.&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Add Blogger image here: Primary redo transport to RFS, SRL, MRP and standby datafiles--&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;If RFS cannot obtain a suitable SRL, Oracle can write received redo directly to a standby archived redo log. That does not mean modern ASYNC transport simply waits for the next primary log switch before sending redo. The visible penalty is usually on the apply side: recovery falls back to the completed archived-log path instead of applying the current stream from an SRL.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;In monitoring, this can produce a saw-tooth pattern. Transport lag remains low, apply lag grows during the current sequence, and then falls after the sequence is completed and applied. When I see that pattern, I verify real-time apply and SRL usage before blaming network bandwidth or increasing apply parallelism.&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Add Blogger image here: Usable SRL with real-time apply versus archived redo fallback--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Protection Mode Is Not the Same as Apply Mode&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;SRLs, synchronous transport and zero data loss are often discussed as though they are one feature. They are related, but each controls a different stage.&lt;/p&gt;

&lt;div style=&quot;overflow-x: auto;&quot;&gt;
  &lt;table style=&quot;border-collapse: collapse; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal; width: 100%;&quot;&gt;
    &lt;thead&gt;
      &lt;tr&gt;
        &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Production question&lt;/th&gt;
        &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Main control&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;tr&gt;
        &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Does the primary wait before acknowledging a commit?&lt;/td&gt;
        &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Protection mode and SYNC or ASYNC transport&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Must the remote side acknowledge after writing to storage?&lt;/td&gt;
        &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;AFFIRM&lt;/code&gt; or &lt;code style=&quot;font-family: courier;&quot;&gt;NOAFFIRM&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Can recovery apply the current incoming sequence?&lt;/td&gt;
        &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;A usable SRL and real-time apply&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;How much received redo is still unapplied?&lt;/td&gt;
        &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Standby CPU, datafile I/O and apply capacity&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Maximum Availability and Maximum Protection depend on synchronous transport to an eligible standby and require SRLs. Maximum Performance normally uses ASYNC transport. In ASYNC mode, a primary transaction can commit before its redo reaches durable storage at the standby.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A well-performing ASYNC configuration may show only a small exposure window, but SRLs do not make that window disappear. They protect and expose redo that has reached the destination. They cannot protect redo that was still buffered or in transit when the primary site was lost.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Storage latency also matters differently by mode. With &lt;code style=&quot;font-family: courier;&quot;&gt;SYNC AFFIRM&lt;/code&gt;, the primary commit path includes the remote durable write, so network latency and SRL write latency can affect application response time. With ASYNC transport, slow receiver storage may not delay every foreground commit, but sustained backpressure can increase transport lag and widen the RPO exposure.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;The SRL Count Rule: ORL Groups Plus One&lt;/h2&gt;

&lt;div style=&quot;background-color: #f6f7f9; border-left: 6px solid rgb(224, 102, 102); margin: 16px 0px; padding: 12px 16px;&quot;&gt;
  &lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal; margin: 0px;&quot;&gt;&lt;strong&gt;Required formula for every source redo thread:&lt;/strong&gt;&lt;br /&gt;SRL groups = primary online redo log groups + 1&lt;/p&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;An equal number of online and standby redo log groups is not sufficient. Oracle requires at least one more SRL group than the online redo log count for each source thread. The additional group gives RFS another target while the previous SRL is being archived and made reusable.&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;A single-instance primary with three online redo groups needs at least four SRL groups.&lt;/li&gt;
  &lt;li&gt;A two-instance RAC primary with three online groups in each thread needs four SRLs for thread 1 and four for thread 2.&lt;/li&gt;
  &lt;li&gt;The same thread coverage is required even if the standby RAC cluster runs fewer instances. The receiver must support every redo thread at the source.&lt;/li&gt;
  &lt;li&gt;If completed SRLs cannot be archived quickly enough during heavy switching, more than the minimum may be required.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Size the SRLs from &lt;code style=&quot;font-family: courier;&quot;&gt;V$LOG.BYTES&lt;/code&gt;. Each SRL must be at least as large as the largest source online redo log, and the cleanest operational layout is to keep the online and standby redo logs the same size. I prefer to use the exact byte value in the DDL instead of manually converting it to an approximate MB or GB value.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;If the primary online redo groups have mixed sizes, standardize that layout first. In RAC, assign every SRL to its intended thread and place the files on shared storage. Leaving groups at thread 0 may allow runtime assignment in some configurations, but explicit thread ownership is easier to validate and follows current Oracle guidance.&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Add Blogger image here: Two RAC threads with three ORLs and four SRLs per thread--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Why SRLs Should Exist on the Primary Too&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A standby redo log is not used while the database is operating in the primary role. That sometimes leads teams to create SRLs only on the current standby. The design works until the first role transition.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;After a switchover, the old primary becomes the new redo receiver. If its SRLs were created in advance, it can immediately receive redo through the correct path. If they are missing, the DBA has additional work to perform and the configuration is not fully ready in the reverse direction.&lt;/p&gt;

&lt;div style=&quot;background-color: #f6f7f9; border-left: 6px solid rgb(224, 102, 102); margin: 16px 0px; padding: 12px 16px;&quot;&gt;
  &lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal; margin: 0px;&quot;&gt;&lt;strong&gt;Production best practice:&lt;/strong&gt; Create the complete SRL layout on both the primary and standby databases before a switchover.&lt;/p&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Pre-created SRLs do not make Oracle&#39;s internal role-conversion step execute faster. They make the overall switchover cleaner and immediately role-ready because no post-switch SRL creation is required. Data Guard Broker validates SRLs on both sides before a role transition, and SRLs are required on the primary when Fast-Start Failover is enabled.&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Add Blogger image here: Primary and standby both prepared with ORLs and SRLs before and after switchover--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Build and Inspect the SRL Layout&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Keep the discovery and creation statements together in the runbook. Run the online redo queries on the source database and review &lt;code style=&quot;font-family: courier;&quot;&gt;V$STANDBY_LOG&lt;/code&gt; on every database that may receive redo.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #6272a4;&quot;&gt;-- Primary: online redo count and exact size by thread&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; thread#, group#, bytes,
       ROUND(bytes / 1024 / 1024) AS size_mb,
       members, status
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; v$log
&lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; thread#, group#;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; thread#, COUNT(*) AS online_groups,
MIN(bytes) AS min_bytes,
MAX(bytes) AS max_bytes &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; v$log &lt;span style=&quot;color: #ff79c6;&quot;&gt;GROUP BY&lt;/span&gt; thread# &lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; thread#;

&lt;span style=&quot;color: #6272a4;&quot;&gt;-- Run on each role-capable database&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; thread#, group#, bytes,
ROUND(bytes / 1024 / 1024) AS size_mb,
status, archived, sequence# &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; v$standby_log &lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; thread#, group#;

&lt;span style=&quot;color: #6272a4;&quot;&gt;-- Example: four 2 GB SRLs for thread 1 on ASM&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER DATABASE ADD STANDBY LOGFILE&lt;/span&gt; THREAD 1 GROUP 11 (&lt;span style=&quot;color: #f1fa8c;&quot;&gt;&#39;+DATA&#39;&lt;/span&gt;) SIZE &lt;span style=&quot;color: #bd93f9;&quot;&gt;2147483648&lt;/span&gt;; &lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER DATABASE ADD STANDBY LOGFILE&lt;/span&gt; THREAD 1 GROUP 12 (&lt;span style=&quot;color: #f1fa8c;&quot;&gt;&#39;+DATA&#39;&lt;/span&gt;) SIZE &lt;span style=&quot;color: #bd93f9;&quot;&gt;2147483648&lt;/span&gt;; &lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER DATABASE ADD STANDBY LOGFILE&lt;/span&gt; THREAD 1 GROUP 13 (&lt;span style=&quot;color: #f1fa8c;&quot;&gt;&#39;+DATA&#39;&lt;/span&gt;) SIZE &lt;span style=&quot;color: #bd93f9;&quot;&gt;2147483648&lt;/span&gt;; &lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER DATABASE ADD STANDBY LOGFILE&lt;/span&gt; THREAD 1 GROUP 14 (&lt;span style=&quot;color: #f1fa8c;&quot;&gt;&#39;+DATA&#39;&lt;/span&gt;) SIZE &lt;span style=&quot;color: #bd93f9;&quot;&gt;2147483648&lt;/span&gt;;

&lt;span style=&quot;color: #6272a4;&quot;&gt;-- Physical standby, Oracle 12.1 and later&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT&lt;/span&gt;; &lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Choose group numbers that do not collide with online redo groups or existing SRLs. Repeat the DDL for every source thread. Adding new groups is normally straightforward, but dropping or resizing old groups needs a controlled change. Never drop the group currently receiving redo. Confirm that it is safely reusable before running &lt;code style=&quot;font-family: courier;&quot;&gt;ALTER DATABASE DROP STANDBY LOGFILE GROUP group_number&lt;/code&gt;.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;SRL storage must sustain the peak redo rate. A slow or inaccessible disk group can create receiver backpressure even when the network is healthy. If SRLs are multiplexed, place the members in separate failure domains; two members on the same vulnerable file system provide little additional protection.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;How to prove That RFS Is Using the SRLs&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A clean configuration query is only the first layer. Runtime validation should cover RFS, recovery mode, lag freshness, archive health and broker readiness.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #6272a4;&quot;&gt;-- Standby: RFS and managed recovery activity&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; name, role, action, client_role,
       thread#, sequence#, group#
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; v$dataguard_process
&lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; name, thread#, sequence#;

&lt;span style=&quot;color: #6272a4;&quot;&gt;-- Standby: lag value and metric freshness&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; name, value, unit, time_computed, datum_time &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; v$dataguard_stats &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; name &lt;span style=&quot;color: #ff79c6;&quot;&gt;IN&lt;/span&gt; (&lt;span style=&quot;color: #f1fa8c;&quot;&gt;&#39;transport lag&#39;&lt;/span&gt;, &lt;span style=&quot;color: #f1fa8c;&quot;&gt;&#39;apply lag&#39;&lt;/span&gt;, &lt;span style=&quot;color: #f1fa8c;&quot;&gt;&#39;apply finish time&#39;&lt;/span&gt;) &lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; name;

&lt;span style=&quot;color: #6272a4;&quot;&gt;-- Primary: remote destination and SRL use&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; dest_id, status, type, database_mode,
recovery_mode, srl, error &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; v$archive_dest_status &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; type &lt;span style=&quot;color: #ff79c6;&quot;&gt;IN&lt;/span&gt; (&lt;span style=&quot;color: #f1fa8c;&quot;&gt;&#39;PHYSICAL&#39;&lt;/span&gt;, &lt;span style=&quot;color: #f1fa8c;&quot;&gt;&#39;LOGICAL&#39;&lt;/span&gt;, &lt;span style=&quot;color: #f1fa8c;&quot;&gt;&#39;FAR SYNC&#39;&lt;/span&gt;);

&lt;span style=&quot;color: #6272a4;&quot;&gt;-- Data Guard Broker&lt;/span&gt;
DGMGRL&amp;gt; SHOW CONFIGURATION;
DGMGRL&amp;gt; SHOW DATABASE VERBOSE &lt;span style=&quot;color: #f1fa8c;&quot;&gt;&#39;STBYDB&#39;&lt;/span&gt;;
DGMGRL&amp;gt; VALIDATE DATABASE VERBOSE &lt;span style=&quot;color: #f1fa8c;&quot;&gt;&#39;STBYDB&#39;&lt;/span&gt;; &lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For new monitoring, use &lt;code style=&quot;font-family: courier;&quot;&gt;V$DATAGUARD_PROCESS&lt;/code&gt; instead of building around &lt;code style=&quot;font-family: courier;&quot;&gt;V$MANAGED_STANDBY&lt;/code&gt;, which has been deprecated since Oracle Database 12.2.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Always read &lt;code style=&quot;font-family: courier;&quot;&gt;DATUM_TIME&lt;/code&gt; with the lag value. A transport lag of zero is not reassuring if &lt;code style=&quot;font-family: courier;&quot;&gt;DATUM_TIME&lt;/code&gt; stopped changing ten minutes ago. The last computed metric is stale because the standby is no longer receiving fresh data.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;One &lt;code style=&quot;font-family: courier;&quot;&gt;ACTIVE&lt;/code&gt; SRL for a receiving thread is normal. Use &lt;code style=&quot;font-family: courier;&quot;&gt;ARCHIVED&lt;/code&gt;, &lt;code style=&quot;font-family: courier;&quot;&gt;SEQUENCE#&lt;/code&gt;, process activity and the alert log to understand whether it is currently being written or has completed and is waiting for archival. Do not clear or drop a group simply because its status is &lt;code style=&quot;font-family: courier;&quot;&gt;ACTIVE&lt;/code&gt;.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;When RFS Is Not Using an SRL&lt;/h3&gt;

&lt;ol style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;Compare the primary ORL byte size with the receiver SRL byte size.&lt;/li&gt;
  &lt;li&gt;Count SRL groups by thread, not only as a database total.&lt;/li&gt;
  &lt;li&gt;Verify that every source RAC thread is represented.&lt;/li&gt;
  &lt;li&gt;Check the SRL members, ASM disk groups or file-system paths.&lt;/li&gt;
  &lt;li&gt;Check the local archive destination and fast recovery area.&lt;/li&gt;
  &lt;li&gt;Review the standby alert log around the affected sequence.&lt;/li&gt;
&lt;/ol&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A full FRA can look like an SRL shortage because completed groups cannot be archived and reused. Adding more SRLs may postpone the symptom, but it does not fix the archive destination.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Once RFS is writing to the expected group, separate transport lag from apply lag. Rising transport lag points toward the send-and-receive path, network capacity, destination errors, authentication or receiver I/O. Low transport lag with rising apply lag points toward MRP, standby CPU, datafile I/O, hot blocks or the redo workload. SRLs remove the wait for a completed log; they do not make an underpowered standby faster.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-f5Um5_2WdHrfclNIyPApk58iq7L0HWqrNgXQjRdP_SSESkRwDqs0UUU5hq97_SzQPkOwzW2YPqb21TVimVGFhswo_Z5W6hzhhGQIuHobm25qPgEB5XCaJit3tfYtgAMBzbfYGl-dPFgm2QcAUhOm1gCUC3RkrnDO48pty-ZzP81bk2em_O-bMzuK8fU/s1800/oracle-real-time-redo-path.png&quot; style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1000&quot; data-original-width=&quot;1800&quot; height=&quot;525&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-f5Um5_2WdHrfclNIyPApk58iq7L0HWqrNgXQjRdP_SSESkRwDqs0UUU5hq97_SzQPkOwzW2YPqb21TVimVGFhswo_Z5W6hzhhGQIuHobm25qPgEB5XCaJit3tfYtgAMBzbfYGl-dPFgm2QcAUhOm1gCUC3RkrnDO48pty-ZzP81bk2em_O-bMzuK8fU/w945-h525/oracle-real-time-redo-path.png&quot; width=&quot;945&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Oracle SRLs Compared With PostgreSQL WAL Reception&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;PostgreSQL does not have an object that a DBA creates as a direct equivalent of an Oracle SRL group. The receiver-side stages are still useful to compare.&lt;/p&gt;

&lt;div style=&quot;overflow-x: auto;&quot;&gt;
  &lt;table style=&quot;border-collapse: collapse; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal; width: 100%;&quot;&gt;
    &lt;thead&gt;
      &lt;tr&gt;
        &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Oracle Data Guard&lt;/th&gt;
        &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;PostgreSQL physical replication&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;tr&gt;
        &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Redo transport processes send redo&lt;/td&gt;
        &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;WAL sender streams WAL&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;RFS receives redo&lt;/td&gt;
        &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;WAL receiver receives WAL&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Current redo is persisted in an SRL&lt;/td&gt;
        &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Received WAL is persisted under &lt;code style=&quot;font-family: courier;&quot;&gt;pg_wal&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;MRP applies redo&lt;/td&gt;
        &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Startup process replays WAL&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Archived redo can resolve gaps&lt;/td&gt;
        &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;WAL archive and &lt;code style=&quot;font-family: courier;&quot;&gt;restore_command&lt;/code&gt; can supply missing segments&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The commit settings are comparable only at a high level. PostgreSQL &lt;code style=&quot;font-family: courier;&quot;&gt;synchronous_commit = remote_write&lt;/code&gt; waits until the standby operating system has written the WAL, while &lt;code style=&quot;font-family: courier;&quot;&gt;remote_apply&lt;/code&gt; waits until replay. Waiting for replay gives a stronger visibility point but can add significant commit latency. These settings should not be presented as exact equivalents of Oracle protection modes.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #6272a4;&quot;&gt;-- PostgreSQL primary&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; application_name, client_addr, state, sync_state,
       write_lag, flush_lag, replay_lag,
       pg_size_pretty(
         pg_wal_lsn_diff(pg_current_wal_lsn(), replay_lsn)
       ) AS replay_gap
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; pg_stat_replication;

&lt;span style=&quot;color: #6272a4;&quot;&gt;-- PostgreSQL standby&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; status, sender_host, latest_end_lsn,
last_msg_send_time, last_msg_receipt_time &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; pg_stat_wal_receiver;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; now() - pg_last_xact_replay_timestamp() AS replay_delay; &lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The time-based replay query is useful, but it is not an exact RPO measurement. It can return &lt;code style=&quot;font-family: courier;&quot;&gt;NULL&lt;/code&gt; before any transaction has been replayed, and an idle database can make a time delay look larger than the actual byte gap. As with Oracle, position, time and metric freshness should be read together.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVfr_49M-fq3kOe7uVe7Ox_8HDq2dhI1dPbkWPMXPLw8FunGpMMiUrvGWk7zqvlYFfepWkQ9cUNUamx3nPz5mlctbFJNsO6NvbaHlMTBf1ZwRJJVPbt0FLYWv8Wf22iKrGx-kO4nKH8zQ5c3GP2fVNimgizrKEu58QKUA_pXULp3YB1uhHyoXLiNbEqFk/s1800/oracle%20vs%20pg.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1000&quot; data-original-width=&quot;1800&quot; height=&quot;521&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVfr_49M-fq3kOe7uVe7Ox_8HDq2dhI1dPbkWPMXPLw8FunGpMMiUrvGWk7zqvlYFfepWkQ9cUNUamx3nPz5mlctbFJNsO6NvbaHlMTBf1ZwRJJVPbt0FLYWv8Wf22iKrGx-kO4nKH8zQ5c3GP2fVNimgizrKEu58QKUA_pXULp3YB1uhHyoXLiNbEqFk/w937-h521/oracle%20vs%20pg.png&quot; width=&quot;937&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Add Blogger image here: Oracle RFS to SRL to MRP versus PostgreSQL WAL receiver to pg_wal to startup process--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Mini Case Study: Apply Lag After a Redo Resize&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Problem&amp;nbsp;&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A busy RAC database had its online redo logs increased from 1 GB to 4 GB to reduce excessive switching during batch processing. Transport lag remained low, but apply lag grew through every sequence and dropped after the next log switch. The first assumption was that MRP could not keep up.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Root cause&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Only the primary ORLs had been changed. The standby still had 1 GB SRLs. RFS could not use those smaller groups for the 4 GB incoming sequence and used the standby archived redo path. The alert log and an exact comparison between &lt;code style=&quot;font-family: courier;&quot;&gt;V$LOG&lt;/code&gt; and &lt;code style=&quot;font-family: courier;&quot;&gt;V$STANDBY_LOG&lt;/code&gt; exposed the mismatch.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Fix we made&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;New 4 GB SRLs were added for every RAC thread, using one more group per thread than the online redo count. The same layout was created on the primary for its future standby role. The old groups were removed only after they were no longer active. RFS resumed writing to the current SRL, and the saw-tooth apply lag disappeared.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The operational lesson was simple: every online redo log change needs a Data Guard log-layout review. Redo sizing is not a primary-only activity.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Lessons From the Field&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Most SRL problems are configuration drift, not an Oracle defect. A DBA resizes online redo, adds a RAC thread, rebuilds a standby or moves storage and forgets to repeat the SRL review on every role-capable database.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A small scheduled control is valuable here. Compare ORL and SRL counts per thread, exact byte sizes, member status and database role across the configuration. That check is more useful than discovering the mismatch during the next DR exercise.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The FRA and local archive destination belong in the same monitoring story. A completed SRL must be archived before it can be reused. Destination errors and space pressure can therefore surface as an apparent SRL availability problem.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Finally, test the design in both directions. Broker validation is useful, but a controlled switchover proves the services, transport path, redo reception, apply behavior and ability to switch back. High availability is a tested behavior, not only a correct set of control-file records.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Quick Takeaways&lt;/h2&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;SRLs allow recovery to apply the current incoming sequence without waiting for a completed archived log.&lt;/li&gt;
  &lt;li&gt;Every source thread requires at least one more SRL group than its primary online redo log groups.&lt;/li&gt;
  &lt;li&gt;Match the SRL size to the primary redo layout and assign RAC threads explicitly.&lt;/li&gt;
  &lt;li&gt;SRLs do not turn ASYNC transport into guaranteed zero data loss.&lt;/li&gt;
  &lt;li&gt;Create the complete SRL layout on both primary and standby before a role transition.&lt;/li&gt;
  &lt;li&gt;Validate actual RFS use, recovery mode, lag freshness, archive health and broker readiness.&lt;/li&gt;
  &lt;li&gt;Low transport lag with high apply lag normally points to the standby apply path.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Standby redo logs sit directly between redo transport and recovery. When they are correctly sized, assigned and available, RFS can write the incoming stream to an SRL and MRP can apply it without waiting for a completed archived log. This reduces apply latency and leaves less recovery work during a role transition.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The boundaries are equally important. SRLs do not change ASYNC transport into a zero-data-loss design, repair a slow standby or compensate for a full FRA. Protection mode determines when the primary can acknowledge a commit. Transport health shows what reached the standby. Apply capacity determines how quickly the standby datafiles catch up.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For a single-instance database, use the primary ORL count plus one and verify the exact size. For RAC, apply the same formula separately to every source thread. Create the full layout on every database that may become a redo receiver, including the current primary.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Add this to the next Data Guard review: compare online and standby redo layouts across every member and check both current and future roles. Repeat the review after a redo resize, RAC topology change, standby rebuild or storage migration. Then validate the runtime path. Confirm RFS activity, real-time recovery mode, fresh lag timestamps, archive health and broker readiness before a DR test has to find the gap for you.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Frequently Asked Questions&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Are SRLs mandatory on the current primary database?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;SRLs are not used while the database remains in the primary role. Oracle recommends keeping them on the primary so it is immediately ready to receive redo after a switchover or failover. Broker-managed role transitions validate them on both sides, and Fast-Start Failover requires them on the primary.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;How many SRL groups are required?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Calculate the count separately for each source redo thread. The required baseline is the number of primary online redo log groups in that thread plus one. If thread 1 has three ORL groups, it needs at least four SRL groups.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Do SRLs guarantee zero data loss with ASYNC transport?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;No. SRLs persist redo that has reached the standby. ASYNC commits can complete before the redo arrives, so the RPO still depends on transport progress and the exact failure sequence.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Can an SRL simply be larger than the online redo log?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;An SRL must not be smaller than the largest source online redo log. For a clean and predictable layout, use matching sizes rather than treating a larger file as the normal standard.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Is an ACTIVE SRL a problem?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Usually not. One active group for a receiving thread is expected. Investigate when completed groups cannot be archived or reused, no group is available for the next sequence, or the alert log reports an SRL error.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;What Have You Seen in Production?&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Have you seen a Data Guard configuration where transport looked healthy but SRL drift caused delayed apply or a switchover warning? Was it exposed by a redo resize, RAC thread change, FRA issue, broker validation or an actual DR test? Share the check that helped you find it.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Official References&lt;/h2&gt;

&lt;ol style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.oracle.com/en/database/oracle/oracle-database/19/sbydb/oracle-data-guard-redo-transport-services.html&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;Oracle Database 19c Data Guard - Redo Transport Services&lt;/a&gt;&lt;br /&gt;Official guidance for managing standby redo logs, sizing, the per-thread ORL plus one requirement, RFS behavior and archived redo fallback.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.oracle.com/en/database/oracle/oracle-database/19/dgbkr/managing-oracle-data-guard-broker-configuration-members.html&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;Oracle Database 19c Data Guard Broker - Managing Configuration Members&lt;/a&gt;&lt;br /&gt;Official guidance for configuring SRLs on primary and standby databases, preparing for switchovers and failovers, and Fast-Start Failover requirements.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;</description><link>https://oracle-dba-help.blogspot.com/2026/09/oracle-standby-redo-logs-gap-most-dbas.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-f5Um5_2WdHrfclNIyPApk58iq7L0HWqrNgXQjRdP_SSESkRwDqs0UUU5hq97_SzQPkOwzW2YPqb21TVimVGFhswo_Z5W6hzhhGQIuHobm25qPgEB5XCaJit3tfYtgAMBzbfYGl-dPFgm2QcAUhOm1gCUC3RkrnDO48pty-ZzP81bk2em_O-bMzuK8fU/s72-w945-h525-c/oracle-real-time-redo-path.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-3891740911198185957</guid><pubDate>Sat, 19 Sep 2026 13:09:00 +0000</pubDate><atom:updated>2026-09-19T21:09:00.111+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Core DBA</category><category domain="http://www.blogger.com/atom/ns#">Must Read</category><category domain="http://www.blogger.com/atom/ns#">RAC</category><title>ORA-12547 from SRVCTL While SQL*Plus Startup Works – Tracing It Back to a Post-Patching Relink Issue</title><description>&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;I recently worked on an Oracle database that could be started normally from SQL*Plus, but failed every time Clusterware tried to start it through &lt;code style=&quot;font-family: courier;&quot;&gt;srvctl&lt;/code&gt;. The error returned by Clusterware was &lt;code style=&quot;font-family: courier;&quot;&gt;ORA-12547: TNS:lost contact&lt;/code&gt;.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The final fix was to relink the database Oracle Home, but I did not reach that conclusion from the error message alone. The useful clues came from comparing SQL*Plus and SRVCTL startup behaviour, noticing what was happening to the Oracle executable during the SRVCTL attempt, and then going back through the last database startup and patching history.&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;The SRVCTL Startup Failure&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The database resource was registered with Clusterware, but the startup failed immediately:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: medium;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-weight: normal;&quot;&gt;$ srvctl start database -d BPL1VODA

PRCR-1079 : Failed to start resource ora.bpl1voda&lt;/span&gt;&lt;db_unique_name&gt;&lt;span style=&quot;color: #f8f8f2; font-weight: normal;&quot;&gt;.db
CRS-5017: The resource action &quot;ora.bpl1voda&lt;/span&gt;&lt;db_unique_name&gt;&lt;span style=&quot;color: #f8f8f2; font-weight: normal;&quot;&gt;.db start&quot;
encountered the following error:

&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&lt;b&gt;ORA-12547: TNS:lost contact&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-weight: normal;&quot;&gt;

CRS-2674: Start of &#39;ora.bpl1voda&lt;/span&gt;&lt;db_unique_name style=&quot;color: #f8f8f2; font-weight: normal;&quot;&gt;.db&#39; failed&lt;/db_unique_name&gt;&lt;/db_unique_name&gt;&lt;/db_unique_name&gt;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;ORA-12547&lt;/code&gt; is not very specific. Oracle describes it as the partner process unexpectedly disappearing, usually during process startup. In a local database startup like this, I would not immediately treat the word &lt;code style=&quot;font-family: courier;&quot;&gt;TNS&lt;/code&gt; as evidence of a listener or network problem. The process being launched by Clusterware may simply be terminating before the startup can complete.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;SQL*Plus Startup Worked&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Before spending more time inside CRS, I wanted to know whether the database itself had a startup problem. I set the database environment and tried a direct startup as the Oracle software owner.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;$ export ORACLE_SID=BPL1VODA
$ export ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/BPL
$ export PATH=$ORACLE_HOME/bin:$PATH

$ sqlplus / as sysdba

SQL&amp;gt; startup;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The database started successfully.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;That was an important separation point. If there had been a basic problem with the SPFILE, control files, database files, ASM disk groups or recovery, I would normally expect the manual startup to expose it as well.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Instead, the behaviour was:&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;SQL*Plus startup worked.&lt;/li&gt;
  &lt;li&gt;SRVCTL startup consistently failed with &lt;code style=&quot;font-family: courier;&quot;&gt;ORA-12547&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;At that stage it looked as though something was different in the Clusterware-managed startup path. I also verified the Oracle Home registered with the database resource rather than assuming that SRVCTL was using the same environment as my shell.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;$ echo $ORACLE_HOME&lt;br /&gt;$ ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/BPL&lt;br /&gt;
$ which oracle

$ srvctl config database -d BLL1VODA&lt;db_unique_name&gt;
$ srvctl status database -d BPL1VODA&lt;db_unique_name&gt;&lt;/db_unique_name&gt;&lt;/db_unique_name&gt;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The configured database home was the expected one, so I continued looking at what happened when Clusterware actually attempted the startup.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;The Oracle Executable Kept Changing Back&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This was the first behaviour that made the Oracle Home itself suspicious.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;While troubleshooting, I checked &lt;code style=&quot;font-family: courier;&quot;&gt;$ORACLE_HOME/bin/oracle&lt;/code&gt;. Most of the executables in the same database home were owned by &lt;code style=&quot;font-family: courier;&quot;&gt;oracle:oinstall&lt;/code&gt;, but the main Oracle executable was showing this state:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;-rwxr-s--x. 1 grid asmadmin 464944488 Sep 11 17:27 oracle&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;I corrected the ownership and permissions of the executable and verified them before trying another startup&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The surprising part was that the correction did not stay in place. The moment I ran:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;$ srvctl start database -d BLP1VODA&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;the executable returned to:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #cc0000; font-family: courier; font-size: medium;&quot;&gt;&lt;b&gt;grid&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;:asmadmin
-rwxr-s--x&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;and the database startup failed again with the same &lt;code style=&quot;font-family: courier;&quot;&gt;ORA-12547&lt;/code&gt;&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;At first this looked like a straightforward executable permission problem. But repeatedly correcting the file manually was clearly not solving anything. Clusterware was touching the binary again during startup, so there was another reason behind the behaviour.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The &lt;code style=&quot;font-family: courier;&quot;&gt;s&lt;/code&gt; in the group execute position also showed that the set-GID bit was being used. ASM environments have specific handling around the group and set-GID state of the RDBMS &lt;code style=&quot;font-family: courier;&quot;&gt;oracle&lt;/code&gt; executable, including Oracle&#39;s &lt;code style=&quot;font-family: courier;&quot;&gt;setasmgidwrap&lt;/code&gt; processing. For that reason, I did not use the permission change alone as proof of the root cause.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;What was more relevant was the complete behaviour: SQL*Plus could start the database, SRVCTL could not, and the state of the main executable was being changed again as soon as Clusterware tried to launch the database.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Going Back to the Last Time the Database Was Running&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Instead of continuing to retry the same startup, I went back through the timeline. I wanted to know when this database had last been running normally and, more importantly, why it had been stopped.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;That brought the recent patching activity into the investigation.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;I correlated the instance startup information with the SQL patch history and the Oracle Home inventory:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: white; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;SQL&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #ff79c6; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt; SELECT&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt; instance_name,
       host_name, SQL &amp;gt; 
       startup_time,
       status
&lt;/span&gt;&lt;span style=&quot;color: #ff79c6; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt; v$instance;
&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: white; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;SQL&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #ff79c6; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt; SELECT&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt; patch_id,
action,
status,
action_time,
description &lt;/span&gt;&lt;span style=&quot;color: #ff79c6; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt; dba_registry_sqlpatch &lt;/span&gt;&lt;span style=&quot;color: #ff79c6; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;ORDER BY&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt; action_time DESC;

$ORACLE_HOME/OPatch/opatch lsinventory&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The database had been stopped as part of a patching activity. The patch information confirmed that patching had taken place, and when I correlated the timestamps with the database and Clusterware history, I could not find a successful normal SRVCTL-managed startup after that activity.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;One detail is worth being precise about. &lt;code style=&quot;font-family: courier;&quot;&gt;V$INSTANCE&lt;/code&gt; does not tell us whether an instance was started through SQL*Plus or SRVCTL, and &lt;code style=&quot;font-family: courier;&quot;&gt;DBA_REGISTRY_SQLPATCH&lt;/code&gt; does not record the startup method. I used these timestamps together with the patch and Clusterware history to reconstruct the sequence.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;What I now had was a much more useful timeline:&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;The database had previously been running normally.&lt;/li&gt;
  &lt;li&gt;It was stopped for patching.&lt;/li&gt;
  &lt;li&gt;The database Oracle Home had gone through patching.&lt;/li&gt;
  &lt;li&gt;There was no confirmed successful SRVCTL-managed startup afterwards.&lt;/li&gt;
  &lt;li&gt;A direct SQL*Plus startup still worked.&lt;/li&gt;
  &lt;li&gt;An SRVCTL startup failed with &lt;code style=&quot;font-family: courier;&quot;&gt;ORA-12547&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Correcting the Oracle executable manually did not persist; the SRVCTL attempt changed it back again.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Why Relinking Became the Next Logical Test&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;At this point there was still no single log line saying, &quot;the Oracle Home must be relinked.&quot; The direction came from the combination of evidence.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The database engine itself could start, the problem appeared only through the Clusterware-managed path, the Oracle executable was being modified during that path, and the last significant change to the Oracle Home had been patching.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Rather than continuing to change file permissions manually, I decided to rebuild the executables in the database Oracle Home.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;With the database stopped, I ran:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;$ cd $ORACLE_HOME/bin

$ relink all&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The relink completed successfully. I then returned to the same operation that had been failing:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;$ srvctl start database -d BPL1VODA

$ srvctl status database -d BPL1VODA&lt;db_unique_name&gt;&lt;/db_unique_name&gt;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This time the database started successfully through SRVCTL.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;That result was much more useful than simply seeing SQL*Plus work. The exact Clusterware-managed startup that had been failing before the relink was now working without manually changing the executable.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;What I Consider the Most Likely Root Cause&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;I would not document this incident as &quot;ORA-12547 is fixed by relink.&quot; ORA-12547 has several possible causes, and relinking should not be used as a generic response to that error.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For this case, the strongest explanation is that the database Oracle Home had been left in an inconsistent executable or linking state following the patching activity.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The reasoning is based on the sequence:&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;The Oracle Home had recently been patched.&lt;/li&gt;
  &lt;li&gt;The problem appeared on the subsequent Clusterware-managed startup.&lt;/li&gt;
  &lt;li&gt;SQL*Plus could still start the instance.&lt;/li&gt;
  &lt;li&gt;SRVCTL repeatedly failed with ORA-12547.&lt;/li&gt;
  &lt;li&gt;The main Oracle executable was being returned to the same unexpected ownership/group state during the failed SRVCTL attempt.&lt;/li&gt;
  &lt;li&gt;Relinking the database Oracle Home corrected the condition.&lt;/li&gt;
  &lt;li&gt;The same SRVCTL startup succeeded immediately afterwards.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Unless an older patching or relink log contains a definite linker error, I would still avoid claiming that a previous relink failure was conclusively proven. What the evidence does show is that rebuilding the Oracle executables corrected the post-patching state that was preventing Clusterware from starting the database.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Where to Look for Evidence of a Relink Problem&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;After recovering the database, it is worth going back through the logs rather than treating the successful startup as the end of the investigation.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle writes relink output below &lt;code style=&quot;font-family: courier;&quot;&gt;$ORACLE_HOME/install&lt;/code&gt;. I would look for the logs created during the original patching window as well as the new successful relink log.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;# Relink history
$ ls -ltr $ORACLE_HOME/install/relinkActions*

$ grep -Ein 
&#39;error|failed|fatal|undefined|cannot find|not found|ld:|collect2|make.*error&#39; 
$ORACLE_HOME/install/relinkActions*.log

# OPatch history

$ ls -ltr $ORACLE_HOME/cfgtoollogs/opatch/

$ grep -RniE &#39;relink|linking|make|error|failed&#39; ORACLE_HOME/cfgtoollogs/opatch/ 2&amp;gt;/dev/null

# Clusterware agent trace

$ grep -iE &#39;ORA-12547|&lt;db_unique_name&gt;|failed|error&#39; ORACLE_BASE/diag/crs/$(hostname -s)/crs/trace/crsd_oraagent_oracle.trc&lt;/db_unique_name&gt;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;An older &lt;code style=&quot;font-family: courier;&quot;&gt;relinkActions&lt;/code&gt; log from the patching window is particularly useful. Messages such as &lt;code style=&quot;font-family: courier;&quot;&gt;undefined reference&lt;/code&gt;, &lt;code style=&quot;font-family: courier;&quot;&gt;cannot find&lt;/code&gt;, linker errors, &lt;code style=&quot;font-family: courier;&quot;&gt;make: *** Error&lt;/code&gt; or permission failures would provide direct evidence that a previous linking operation did not finish cleanly.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The CRS agent trace may not contain an explicit relink error. Clusterware may only know that the process it launched terminated and therefore report &lt;code style=&quot;font-family: courier;&quot;&gt;ORA-12547&lt;/code&gt;. This is why the patching timeline and Oracle Home history can be more useful than searching for one specific error string.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;What the SQL*Plus Test Actually Proved&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The successful SQL*Plus startup was initially one reason to suspect SRVCTL itself, but it is important not to take that test further than it proves.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;It proved that the database instance could be started directly using that Oracle Home. It did not prove that the entire Oracle Home and the Clusterware/ASM-managed startup path were in the expected state.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;That difference was exactly where this issue was hiding.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;One Check I Would Add After Patching&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For a database managed by Oracle Clusterware, seeing an open database after patching is not enough for me to consider the startup validation complete.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;I also want to know that the database can be managed through the same path that will be used during the next restart or failover.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;$ srvctl status database -d BPL1VODA

$ srvctl stop database -d BPL1VODA&lt;br /&gt;&lt;db_unique_name&gt;
$ srvctl start database -d BPL1VODA&lt;br /&gt;&lt;db_unique_name&gt;
$ srvctl status database -d BPL1VODA&lt;db_unique_name&gt;&lt;/db_unique_name&gt;&lt;/db_unique_name&gt;&lt;/db_unique_name&gt;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;In this case, a manual startup would have given a false sense that everything was fine. The problem only became visible when Clusterware attempted to manage the database through SRVCTL.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The error itself was only one part of the investigation. The useful path was to compare the two startup methods, observe what Clusterware was doing to the executable, trace the database back to the patching activity, and then test the Oracle Home rather than continuing to modify permissions manually.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Oracle References&lt;/h2&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;
    &lt;a href=&quot;https://docs.oracle.com/en/error-help/db/ora-12547/&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Oracle Error Help – ORA-12547: TNS:lost contact&lt;/a&gt;&lt;br /&gt;
    Oracle describes ORA-12547 as the partner unexpectedly disappearing, usually during process startup.&lt;/li&gt;
  &lt;li&gt;
    &lt;a href=&quot;https://docs.oracle.com/en/database/oracle/oracle-database/19/racad/administering-database-instances-and-cluster-databases.html&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Oracle RAC 19c – Administering Database Instances and Cluster Databases&lt;/a&gt;&lt;br /&gt;
    Covers starting and stopping RAC databases and instances through SRVCTL.
  &lt;/li&gt;
  &lt;li&gt;
    &lt;a href=&quot;https://docs.oracle.com/en/database/oracle/oracle-database/19/racad/server-control-utility-reference.html&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Oracle RAC 19c – Server Control Utility Reference&lt;/a&gt;&lt;br /&gt;
    Official SRVCTL command reference for Oracle RAC resources.
  &lt;/li&gt;
&lt;/ul&gt;
</description><link>https://oracle-dba-help.blogspot.com/2026/09/ora-12547-from-srvctl-while-sqlplus.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-6696147795993960978</guid><pubDate>Mon, 07 Sep 2026 05:58:00 +0000</pubDate><atom:updated>2026-09-21T15:48:30.663+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Core DBA</category><category domain="http://www.blogger.com/atom/ns#">Tuning</category><title>Oracle CPU Spike After Statistics Gathering: A Real-World Optimizer Investigation</title><description>&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Every Oracle DBA has experienced that moment when monitoring alerts suddenly explode across the dashboard. Everything was running smoothly, and then without a warning - the CPU utilization jumps to 95%, applications slow down, and users start reporting performance issues.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;522&quot; data-start=&quot;330&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;One of the most frustrating parts of such incidents is when &lt;span data-end=&quot;417&quot; data-start=&quot;390&quot;&gt;nothing obvious changed&lt;/span&gt;. No deployments, no schema modifications, and no new batch jobs. Yet the database is clearly struggling.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;825&quot; data-start=&quot;524&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;In many real-world cases, the root cause is surprisingly subtle: &lt;span data-end=&quot;663&quot; data-start=&quot;589&quot;&gt;a change in optimizer statistics leading to a different execution plan&lt;/span&gt;. Oracle&#39;s automatic statistics gathering is powerful, but it is not always perfect and especially when data distribution is skewed or histograms behave unexpectedly.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;1139&quot; data-start=&quot;827&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;In this article, we will walk through a &lt;span data-end=&quot;912&quot; data-start=&quot;867&quot;&gt;real-world Oracle CPU spike investigation&lt;/span&gt;. You will see the step-by-step troubleshooting approach using AWR, execution plan history, and histogram analysis. We’ll also cover how the issue was fixed using manual statistics and SQL plan baselines to stabilize performance.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;1335&quot; data-start=&quot;1141&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p data-end=&quot;1335&quot; data-start=&quot;1141&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;1335&quot; data-start=&quot;1141&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;If you ar an &lt;span data-end=&quot;1208&quot; data-start=&quot;1154&quot;&gt;Oracle DBA responsible for production environments&lt;/span&gt;, this guide will help you recognize the warning signs and quickly resolve similar high CPU incidents before they impact users.&lt;/span&gt;&lt;/p&gt;
&lt;h2 data-end=&quot;1385&quot; data-section-id=&quot;w7acl1&quot; data-start=&quot;1342&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h1 data-end=&quot;3063&quot; data-start=&quot;3022&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;When the Database Suddenly Went High CPU&lt;/span&gt;&lt;/h1&gt;
&lt;p data-end=&quot;1459&quot; data-start=&quot;1387&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;It started as a normal afternoon when monitoring alerts began appearing.&lt;/span&gt;&lt;/p&gt;
&lt;ul data-end=&quot;1580&quot; data-start=&quot;1461&quot;&gt;
&lt;li data-end=&quot;1488&quot; data-section-id=&quot;18yhyn0&quot; data-start=&quot;1461&quot;&gt;
&lt;p data-end=&quot;1488&quot; data-start=&quot;1463&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;CPU utilization: &lt;span data-end=&quot;1488&quot; data-start=&quot;1480&quot;&gt;95%+ and&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;Application response times was&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span data-end=&quot;1537&quot; data-start=&quot;1519&quot; style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;extremely slow&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li data-end=&quot;1580&quot; data-section-id=&quot;mfgers&quot; data-start=&quot;1538&quot;&gt;
&lt;p data-end=&quot;1580&quot; data-start=&quot;1540&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;No deployments, changes&amp;nbsp; or maintenance activities&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-end=&quot;1793&quot; data-start=&quot;1582&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;From an operational perspective, this scenario is common in large enterprise databases. Performance issues often arise &lt;span data-end=&quot;1792&quot; data-start=&quot;1701&quot;&gt;not from new changes, but from optimizer behaviour reacting to existing data differently&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;1888&quot; data-start=&quot;1795&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;At this stage, the priority was clear- that is to&amp;nbsp; identify the &lt;span data-end=&quot;1887&quot; data-start=&quot;1847&quot;&gt;SQL statement consuming the most CPU&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;1888&quot; data-start=&quot;1795&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;1888&quot; data-start=&quot;1795&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 data-end=&quot;1940&quot; data-section-id=&quot;1rlsb2j&quot; data-start=&quot;1895&quot;&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Source Sans Pro; font-size: large;&quot;&gt;Step 1: Identify the Top SQL Consuming CPU&lt;/span&gt;&lt;/h2&gt;
&lt;p data-end=&quot;2069&quot; data-start=&quot;1942&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The first step in any Oracle performance investigation is to determine &lt;span data-end=&quot;2068&quot; data-start=&quot;2013&quot;&gt;which SQL statement is responsible for the workload&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;2132&quot; data-start=&quot;2071&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;A quick query against &lt;code data-end=&quot;2100&quot; data-start=&quot;2093&quot;&gt;v$sql&lt;/code&gt; revealed the top CPU consumers.&lt;/span&gt;&lt;/p&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span&gt;&lt;/span&gt;SELECT&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;sql_id,&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;executions,&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;elapsed_time,&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;cpu_time,&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;sql_text
FROM&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;v$sql
ORDER&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;BY&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;cpu_time&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;DESC
FETCH&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;FIRST&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;ROWS&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;ONLY;
&lt;/pre&gt;&lt;/div&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;2263&quot; data-start=&quot;2134&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;div class=&quot;cm-content q9tKkq_readonly&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;2321&quot; data-start=&quot;2265&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;One query clearly stood out that it was dominating CPU usage.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;2485&quot; data-start=&quot;2323&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;This approach is widely recommended in Oracle performance tuning because &lt;span data-end=&quot;2484&quot; data-start=&quot;2396&quot;&gt;a small number of SQL statements typically account for the majority of database load&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;2594&quot; data-start=&quot;2487&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Once the SQL ID was identified, the next step was to determine &lt;span data-end=&quot;2593&quot; data-start=&quot;2550&quot;&gt;why the query suddenly became expensive&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;2594&quot; data-start=&quot;2487&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 data-end=&quot;2646&quot; data-section-id=&quot;1wd5t7q&quot; data-start=&quot;2601&quot;&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Source Sans Pro; font-size: large;&quot;&gt;Step 2: Investigate Execution Plan Changes&lt;/span&gt;&lt;/h2&gt;
&lt;p data-end=&quot;2753&quot; data-start=&quot;2648&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Oracle queries can suddenly become slower if the optimizer decides to use a &lt;span data-end=&quot;2752&quot; data-start=&quot;2724&quot;&gt;different execution plan&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;2821&quot; data-start=&quot;2755&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;To verify this, the historical execution plans were checked using:&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;2912&quot; data-start=&quot;2823&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;div class=&quot;cm-content q9tKkq_readonly&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;span class=&quot;ͼ8&quot;&gt;SELECT&lt;/span&gt; &lt;span class=&quot;ͼ8&quot;&gt;*&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;ͼ8&quot;&gt;FROM&lt;/span&gt; dba_hist_sql_plan&lt;br /&gt;&lt;span class=&quot;ͼ8&quot;&gt;WHERE&lt;/span&gt; sql_id&lt;span class=&quot;ͼ8&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;ͼc&quot;&gt;&#39;sqlid0sqltext1&#39;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;ͼ8&quot;&gt;ORDER&lt;/span&gt; &lt;span class=&quot;ͼ8&quot;&gt;BY&lt;/span&gt; &lt;span class=&quot;ͼe&quot;&gt;timestamp&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;2954&quot; data-start=&quot;2914&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The result showed something interesting.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;3039&quot; data-start=&quot;2956&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The query&#39;s execution plan &lt;span data-end=&quot;3038&quot; data-start=&quot;2983&quot;&gt;changed after the nightly statistics collection job&lt;/span&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;This explained why the query had been performing well previously but suddenly started consuming excessive CPU resources.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;3292&quot; data-start=&quot;3163&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Execution plan changes triggered by statistics updates are a well-known cause of performance issues in large Oracle environments.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;3344&quot; data-start=&quot;3294&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;But why did the optimizer choose a different plan?&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;The answer often lies in &lt;/span&gt;&lt;span data-end=&quot;3407&quot; data-start=&quot;3371&quot; style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;histograms and data distribution&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;h2 data-end=&quot;3470&quot; data-section-id=&quot;icnia3&quot; data-start=&quot;3415&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 data-end=&quot;3470&quot; data-section-id=&quot;icnia3&quot; data-start=&quot;3415&quot;&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Source Sans Pro; font-size: large;&quot;&gt;Step 3: Check Histogram Behaviour on Critical Columns&lt;/span&gt;&lt;/h2&gt;
&lt;p data-end=&quot;3604&quot; data-start=&quot;3472&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Histograms help Oracle understand &lt;span data-end=&quot;3542&quot; data-start=&quot;3506&quot;&gt;data distribution within columns&lt;/span&gt;, which is essential for generating efficient execution plans.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;However, they can also introduce instability when data is skewed.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;3748&quot; data-start=&quot;3673&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;To investigate further, the histogram for the relevant column was examined.&lt;/span&gt;&lt;/p&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span&gt;&lt;/span&gt;SQL&lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;SELECT&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;endpoint_value&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;endpoint_number
FROM&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;dba_tab_histograms
WHERE&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;table_name&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&#39;EMPLOYEE&#39;
AND&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;column_name&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&#39;EMPLOYEE_FEED&#39;;
&lt;/pre&gt;&lt;/div&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;3881&quot; data-start=&quot;3750&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;div class=&quot;cm-content q9tKkq_readonly&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;3961&quot; data-start=&quot;3883&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;The results showed a &lt;/span&gt;&lt;span data-end=&quot;3934&quot; data-start=&quot;3904&quot; style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;highly skewed distribution&lt;/span&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt; in the&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;EMPLOYEE_FEED &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;column.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;4125&quot; data-start=&quot;3963&quot;&gt;&lt;span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;When statistics were gathered using the default &lt;/span&gt;&lt;code data-end=&quot;4029&quot; data-start=&quot;4011&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;AUTO_SAMPLE_SIZE&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;, the optimizer misinterpreted the data distribution and selected an inefficient execution plan.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;4247&quot; data-start=&quot;4127&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;This is not uncommon in production environments with &lt;span data-end=&quot;4204&quot; data-start=&quot;4180&quot;&gt;skewed data patterns&lt;/span&gt;, such as regional or status-based columns.&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;4247&quot; data-start=&quot;4127&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h1 data-end=&quot;3063&quot; data-start=&quot;3022&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: xx-large;&quot;&gt;Fixing the Issue: Stabilizing the Optimizer&lt;/span&gt;&lt;/h1&gt;
&lt;p data-end=&quot;4372&quot; data-start=&quot;4302&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Once the root cause was identified, two corrective actions were taken.&lt;/span&gt;&lt;/p&gt;
&lt;h3 data-end=&quot;4425&quot; data-section-id=&quot;5inenh&quot; data-start=&quot;4374&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large; font-weight: normal;&quot;&gt;1. Regather Statistics with Controlled Sampling&lt;/span&gt;&lt;/h3&gt;
&lt;p data-end=&quot;4520&quot; data-start=&quot;4427&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Instead of relying on automatic sampling, statistics were gathered with a manual sample size.&lt;/span&gt;&lt;/p&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span&gt;&lt;/span&gt;EXEC&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;DBMS_STATS&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;GATHER_TABLE_STATS(
&lt;span style=&quot;color: #bbbbbb;&quot;&gt;    &lt;/span&gt;&#39;SALES&#39;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;color: #bbbbbb;&quot;&gt;    &lt;/span&gt;&#39;CUSTOMERS&#39;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;color: #bbbbbb;&quot;&gt;    &lt;/span&gt;estimate_percent&lt;span style=&quot;color: #333333;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;50&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;color: #bbbbbb;&quot;&gt;    &lt;/span&gt;method_opt&lt;span style=&quot;color: #333333;&quot;&gt;=&amp;gt;&lt;/span&gt;&#39;FOR&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;ALL&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;COLUMNS&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;SIZE&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;AUTO&#39;
);
&lt;/pre&gt;&lt;/div&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;4671&quot; data-start=&quot;4522&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;div class=&quot;cm-content q9tKkq_readonly&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;4787&quot; data-start=&quot;4673&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Using a higher sample percentage provides &lt;span data-end=&quot;4754&quot; data-start=&quot;4715&quot;&gt;more accurate cardinality estimates&lt;/span&gt;, especially for skewed datasets.&lt;/span&gt;&lt;/p&gt;
&lt;h3 data-end=&quot;4857&quot; data-section-id=&quot;vtyr12&quot; data-start=&quot;4794&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 data-end=&quot;4857&quot; data-section-id=&quot;vtyr12&quot; data-start=&quot;4794&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;2. Capture the Good Execution Plan Using SQL Plan Baselines&lt;/span&gt;&lt;/h3&gt;
&lt;p data-end=&quot;4976&quot; data-start=&quot;4859&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;To prevent the optimizer from choosing an unstable plan again, the working plan was locked using SQL Plan Management.&lt;/span&gt;&lt;/p&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span&gt;&lt;/span&gt;EXEC&lt;span style=&quot;color: #bbbbbb;&quot;&gt; &lt;/span&gt;DBMS_SPM&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;LOAD_PLANS_FROM_CURSOR_CACHE(
&lt;span style=&quot;color: #bbbbbb;&quot;&gt;    &lt;/span&gt;sql_id&lt;span style=&quot;color: #333333;&quot;&gt;=&amp;gt;&lt;/span&gt;&#39;sqlid0sqltext1&#39;
);
&lt;/pre&gt;&lt;/div&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;5061&quot; data-start=&quot;4978&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;div class=&quot;cm-content q9tKkq_readonly&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;5204&quot; data-start=&quot;5063&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;SQL Plan Baselines allow Oracle to &lt;span data-end=&quot;5127&quot; data-start=&quot;5098&quot;&gt;preserve known good plans&lt;/span&gt;, preventing unexpected performance regressions caused by statistics updates.&lt;/span&gt;&lt;/p&gt;
&lt;h2 data-end=&quot;5235&quot; data-section-id=&quot;1lqsij9&quot; data-start=&quot;5211&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 data-end=&quot;5235&quot; data-section-id=&quot;1lqsij9&quot; data-start=&quot;5211&quot;&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Source Sans Pro; font-size: large;&quot;&gt;Results After the Fix&lt;/span&gt;&lt;/h2&gt;
&lt;p data-end=&quot;5279&quot; data-start=&quot;5237&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The impact of these changes was immediate.&lt;/span&gt;&lt;/p&gt;
&lt;ul data-end=&quot;5398&quot; data-start=&quot;5281&quot;&gt;
&lt;li data-end=&quot;5319&quot; data-section-id=&quot;x3nxxb&quot; data-start=&quot;5281&quot;&gt;
&lt;p data-end=&quot;5319&quot; data-start=&quot;5283&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;CPU usage dropped from &lt;span data-end=&quot;5319&quot; data-start=&quot;5306&quot;&gt;95% → 40%&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li data-end=&quot;5361&quot; data-section-id=&quot;so2d44&quot; data-start=&quot;5320&quot;&gt;
&lt;p data-end=&quot;5361&quot; data-start=&quot;5322&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Query response times returned to normal&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li data-end=&quot;5398&quot; data-section-id=&quot;154wes9&quot; data-start=&quot;5362&quot;&gt;
&lt;p data-end=&quot;5398&quot; data-start=&quot;5364&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Application performance stabilized&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-end=&quot;5524&quot; data-start=&quot;5400&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;This confirmed that the issue was entirely caused by &lt;span data-end=&quot;5523&quot; data-start=&quot;5453&quot;&gt;optimizer misestimation due to statistics sampling and skewed data&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;h2 data-end=&quot;5584&quot; data-section-id=&quot;l2fx4m&quot; data-start=&quot;5531&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 data-end=&quot;5584&quot; data-section-id=&quot;l2fx4m&quot; data-start=&quot;5531&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 data-end=&quot;5584&quot; data-section-id=&quot;l2fx4m&quot; data-start=&quot;5531&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;Unique Insight:&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt; Why Auto Statistics Sometimes Fail&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p data-end=&quot;5703&quot; data-start=&quot;5586&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Oracle&#39;s automatic statistics gathering works well in most environments, but it can struggle in situations involving:&lt;/span&gt;&lt;/p&gt;
&lt;ul data-end=&quot;5832&quot; data-start=&quot;5705&quot;&gt;
&lt;li data-end=&quot;5725&quot; data-section-id=&quot;ox1e3s&quot; data-start=&quot;5705&quot;&gt;
&lt;p data-end=&quot;5725&quot; data-start=&quot;5707&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Highly skewed data&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li data-end=&quot;5763&quot; data-section-id=&quot;7w7fop&quot; data-start=&quot;5726&quot;&gt;
&lt;p data-end=&quot;5763&quot; data-start=&quot;5728&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Rapidly changing data distributions&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li data-end=&quot;5790&quot; data-section-id=&quot;owxwrf&quot; data-start=&quot;5764&quot;&gt;
&lt;p data-end=&quot;5790&quot; data-start=&quot;5766&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Large partitioned tables&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li data-end=&quot;5832&quot; data-section-id=&quot;15kl1we&quot; data-start=&quot;5791&quot;&gt;
&lt;p data-end=&quot;5832&quot; data-start=&quot;5793&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Queries sensitive to histogram accuracy&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-end=&quot;5996&quot; data-start=&quot;5834&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Many DBAs assume automatic statistics are always safe, but in high-scale systems, &lt;span data-end=&quot;5995&quot; data-start=&quot;5916&quot;&gt;controlled statistics strategies often produce more predictable performance&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;6036&quot; data-start=&quot;5998&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Experienced DBAs frequently implement:&lt;/span&gt;&lt;/p&gt;
&lt;ul data-end=&quot;6147&quot; data-start=&quot;6038&quot;&gt;
&lt;li data-end=&quot;6072&quot; data-section-id=&quot;zg0vup&quot; data-start=&quot;6038&quot;&gt;
&lt;p data-end=&quot;6072&quot; data-start=&quot;6040&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Custom stats gathering schedules&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li data-end=&quot;6105&quot; data-section-id=&quot;oyv7pu&quot; data-start=&quot;6073&quot;&gt;
&lt;p data-end=&quot;6105&quot; data-start=&quot;6075&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Column-level histogram control&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;6105&quot; data-section-id=&quot;oyv7pu&quot; data-start=&quot;6073&quot;&gt;&lt;p data-end=&quot;6105&quot; data-start=&quot;6075&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;SQL Plan Baselines for critical queries&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-end=&quot;6226&quot; data-start=&quot;6149&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;This combination provides both &lt;span data-end=&quot;6225&quot; data-start=&quot;6180&quot;&gt;optimizer intelligence and plan stability&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;h2 data-end=&quot;6251&quot; data-section-id=&quot;3auoiu&quot; data-start=&quot;6233&quot;&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 data-end=&quot;6251&quot; data-section-id=&quot;3auoiu&quot; data-start=&quot;6233&quot;&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 data-end=&quot;6251&quot; data-section-id=&quot;3auoiu&quot; data-start=&quot;6233&quot;&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Source Sans Pro; font-size: large;&quot;&gt;Quick Takeaways&lt;/span&gt;&lt;/h2&gt;
&lt;ul data-end=&quot;6749&quot; data-start=&quot;6253&quot;&gt;
&lt;li data-end=&quot;6338&quot; data-section-id=&quot;qmsr6c&quot; data-start=&quot;6253&quot;&gt;
&lt;p data-end=&quot;6338&quot; data-start=&quot;6255&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;High CPU spikes in Oracle databases are often caused by &lt;span data-end=&quot;6337&quot; data-start=&quot;6311&quot;&gt;execution plan changes&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li data-end=&quot;6404&quot; data-section-id=&quot;1sg44o1&quot; data-start=&quot;6339&quot;&gt;
&lt;p data-end=&quot;6404&quot; data-start=&quot;6341&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Always identify the &lt;span data-end=&quot;6403&quot; data-start=&quot;6361&quot;&gt;top CPU-consuming SQL statements first&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li data-end=&quot;6473&quot; data-section-id=&quot;1uglmoo&quot; data-start=&quot;6405&quot;&gt;
&lt;p data-end=&quot;6473&quot; data-start=&quot;6407&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Statistics updates can trigger unexpected &lt;span data-end=&quot;6472&quot; data-start=&quot;6449&quot;&gt;optimizer decisions&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li data-end=&quot;6547&quot; data-section-id=&quot;2s83i0&quot; data-start=&quot;6474&quot;&gt;
&lt;p data-end=&quot;6547&quot; data-start=&quot;6476&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Histograms on skewed columns may cause incorrect cardinality estimates.&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li data-end=&quot;6608&quot; data-section-id=&quot;17r35cq&quot; data-start=&quot;6548&quot;&gt;
&lt;p data-end=&quot;6608&quot; data-start=&quot;6550&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Manual statistics sampling can improve optimizer accuracy.&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li data-end=&quot;6671&quot; data-section-id=&quot;q1tp0o&quot; data-start=&quot;6609&quot;&gt;
&lt;p data-end=&quot;6671&quot; data-start=&quot;6611&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;SQL Plan Baselines help &lt;span data-end=&quot;6670&quot; data-start=&quot;6635&quot;&gt;prevent performance regressions&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li data-end=&quot;6749&quot; data-section-id=&quot;6rf8l9&quot; data-start=&quot;6672&quot;&gt;
&lt;p data-end=&quot;6749&quot; data-start=&quot;6674&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Stable statistics strategies are critical for &lt;span data-end=&quot;6748&quot; data-start=&quot;6720&quot;&gt;large production systems&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 data-end=&quot;6769&quot; data-section-id=&quot;8dtpi&quot; data-start=&quot;6756&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h1 data-end=&quot;3063&quot; data-start=&quot;3022&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: xx-large;&quot;&gt;Conclusion&lt;/span&gt;&lt;/h1&gt;
&lt;p data-end=&quot;6960&quot; data-start=&quot;6771&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Unexpected CPU spikes are among the most stressful incidents for any Oracle DBA. What makes them particularly challenging is that they often occur &lt;span data-end=&quot;6959&quot; data-start=&quot;6918&quot;&gt;without obvious changes to the system&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;7218&quot; data-start=&quot;6962&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;As this case demonstrated, the root cause can sometimes be hidden in something as routine as &lt;span data-end=&quot;7090&quot; data-start=&quot;7055&quot;&gt;automatic statistics collection&lt;/span&gt;. When data distribution is skewed, the optimizer may misinterpret cardinality estimates and choose inefficient execution plans.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;7506&quot; data-start=&quot;7220&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The key to resolving such issues quickly is a &lt;span data-end=&quot;7303&quot; data-start=&quot;7266&quot;&gt;structured investigation approach&lt;/span&gt;. Start by identifying the top SQL statements consuming resources, verify whether the execution plan has changed, and analyze histograms or statistics that might have influenced the optimizer’s decision.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;7786&quot; data-start=&quot;7508&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;More importantly, prevention is just as critical as troubleshooting. Implementing &lt;span data-end=&quot;7713&quot; data-start=&quot;7590&quot;&gt;controlled statistics gathering, monitoring histogram behavior, and protecting critical queries with SQL Plan Baselines&lt;/span&gt; can significantly reduce the risk of unexpected performance regressions.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;8051&quot; data-start=&quot;7788&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;For Oracle DBAs managing high-volume production systems, understanding how the optimizer interprets statistics is a crucial skill. The database optimizer is powerful—but like any intelligent system, it performs best when guided with the right data and safeguards.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;8244&quot; data-start=&quot;8053&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;If you’ve encountered similar optimizer surprises in your environment, consider reviewing your statistics strategy today. A small adjustment could prevent the next major performance incident.&lt;/span&gt;&lt;/p&gt;
&lt;hr data-end=&quot;8249&quot; data-start=&quot;8246&quot; /&gt;&lt;h1 data-end=&quot;3063&quot; data-start=&quot;3022&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: xx-large;&quot;&gt;Frequently Asked Questions (FAQs)&lt;/span&gt;&lt;/h1&gt;
&lt;h3 data-end=&quot;8360&quot; data-section-id=&quot;1set2bp&quot; data-start=&quot;8289&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large; font-weight: normal;&quot;&gt;1. Why do Oracle execution plans change after statistics gathering?&lt;/span&gt;&lt;/h3&gt;
&lt;p data-end=&quot;8575&quot; data-start=&quot;8362&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Execution plans may change because the optimizer uses updated statistics to estimate cardinality and costs. If the new statistics differ significantly from previous ones, the optimizer may choose a different plan.&lt;/span&gt;&lt;/p&gt;
&lt;hr data-end=&quot;8580&quot; data-start=&quot;8577&quot; /&gt;
&lt;h3 data-end=&quot;8645&quot; data-section-id=&quot;5jxt4w&quot; data-start=&quot;8582&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large; font-weight: normal;&quot;&gt;2. What is AUTO_SAMPLE_SIZE in Oracle statistics gathering?&lt;/span&gt;&lt;/h3&gt;
&lt;p data-end=&quot;8824&quot; data-start=&quot;8647&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;AUTO_SAMPLE_SIZE allows Oracle to automatically determine the sampling rate for statistics collection. While convenient, it may sometimes misrepresent skewed data distributions.&lt;/span&gt;&lt;/p&gt;
&lt;hr data-end=&quot;8829&quot; data-start=&quot;8826&quot; /&gt;
&lt;h3 data-end=&quot;8878&quot; data-section-id=&quot;1kmptzv&quot; data-start=&quot;8831&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large; font-weight: normal;&quot;&gt;3. When should DBAs use SQL Plan Baselines?&lt;/span&gt;&lt;/h3&gt;
&lt;p data-end=&quot;9032&quot; data-start=&quot;8880&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;SQL Plan Baselines are useful for &lt;span data-end=&quot;8975&quot; data-start=&quot;8914&quot;&gt;critical queries where performance stability is essential&lt;/span&gt;, especially in systems with frequent statistics updates.&lt;/span&gt;&lt;/p&gt;
&lt;hr data-end=&quot;9037&quot; data-start=&quot;9034&quot; /&gt;
&lt;h3 data-end=&quot;9089&quot; data-section-id=&quot;1ee5yka&quot; data-start=&quot;9039&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large; font-weight: normal;&quot;&gt;4. How do histograms affect query performance?&lt;/span&gt;&lt;/h3&gt;
&lt;p data-end=&quot;9285&quot; data-start=&quot;9091&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Histograms provide detailed information about data distribution. They help the optimizer estimate row counts accurately, but if misinterpreted, they can also lead to inefficient execution plans.&lt;/span&gt;&lt;/p&gt;
&lt;hr data-end=&quot;9290&quot; data-start=&quot;9287&quot; /&gt;
&lt;h3 data-end=&quot;9357&quot; data-section-id=&quot;l4ienz&quot; data-start=&quot;9292&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large; font-weight: normal;&quot;&gt;5. How can DBAs prevent optimizer-related performance issues?&lt;/span&gt;&lt;/h3&gt;
&lt;p data-end=&quot;9382&quot; data-start=&quot;9359&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Best practices include:&lt;/span&gt;&lt;/p&gt;
&lt;ul data-end=&quot;9533&quot; data-start=&quot;9384&quot;&gt;
&lt;li data-end=&quot;9421&quot; data-section-id=&quot;1k2h4gg&quot; data-start=&quot;9384&quot;&gt;
&lt;p data-end=&quot;9421&quot; data-start=&quot;9386&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Monitoring execution plan changes&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li data-end=&quot;9455&quot; data-section-id=&quot;1axjr3k&quot; data-start=&quot;9422&quot;&gt;
&lt;p data-end=&quot;9455&quot; data-start=&quot;9424&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Managing histograms carefully&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li data-end=&quot;9485&quot; data-section-id=&quot;s7smu8&quot; data-start=&quot;9456&quot;&gt;
&lt;p data-end=&quot;9485&quot; data-start=&quot;9458&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Using SQL Plan Management&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li data-end=&quot;9533&quot; data-section-id=&quot;mkbuvf&quot; data-start=&quot;9486&quot;&gt;
&lt;p data-end=&quot;9533&quot; data-start=&quot;9488&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Gathering statistics with controlled sampling&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr data-end=&quot;9538&quot; data-start=&quot;9535&quot; /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;&lt;b&gt;Share Your Thoughts&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;p data-end=&quot;9651&quot; data-start=&quot;9564&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;Have you ever experienced a sudden Oracle CPU spike caused by an optimizer plan change?&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;Would love to hear how you diagnosed and resolved it in your environment.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;9927&quot; data-start=&quot;9726&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;If you found this article useful, feel free to &lt;span data-end=&quot;9836&quot; data-start=&quot;9773&quot;&gt;share it with fellow DBAs or your database engineering team&lt;/span&gt;. Real-world troubleshooting stories often help others avoid the same production surprises.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;9978&quot; data-is-last-node=&quot;&quot; data-is-only-node=&quot;&quot; data-start=&quot;9929&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Your feedback and experiences are always welcome!&lt;/span&gt;&lt;/p&gt;</description><link>https://oracle-dba-help.blogspot.com/2026/09/oracle-cpu-spike-fix.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-2791962260503797057</guid><pubDate>Sun, 06 Sep 2026 10:55:00 +0000</pubDate><atom:updated>2026-09-21T15:49:06.711+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Interview Questions</category><title>Split Brain in Oracle RAC: What Every DBA Must Know</title><description>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp;If you have worked with Oracle RAC long enough, you know the cluster is only as strong as its communication layer. Most days, RAC behaves beautifully ; instances coordinate, cache fusion works seamlessly, and life is good. But when inter-node communication breaks down, things can get ugly very quickly.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;One of the most dangerous scenarios in a RAC environment is a split brain condition. It is not just a theoretical concept., it is something that can bring your cluster to its knees if not handled correctly. I have personally seen environments where a poorly configured interconnect or a flaky switch triggered node evictions during peak hours&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;In this article, I will break down what split brain really means in practical terms, how Oracle RAC prevents it, and what you as a DBA should monitor proactively. We will also go through essential commands, real-world scenarios, and operational insights that are rarely discussed in documentation.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;&lt;span style=&quot;color: #e06666; font-size: x-large;&quot;&gt;&lt;b&gt;What Split Brain Actually Means in RAC&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;At its core, split brain is a communication failure between RAC nodes.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;When nodes stop seeing each other over the private interconnect, each node may assume it is the only surviving member of the cluster. Now imagine both nodes continuing to process transactions independently against the same storage—that is where data corruption risk comes in.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;In a healthy RAC setup:&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;The Nodes exchange heartbeat signals over the private interconnect&lt;/li&gt;&lt;li&gt;Clusterware keeps track of node membership &amp;amp;&amp;nbsp;All nodes agree on cluster state&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;div style=&quot;color: #6fa8dc; font-weight: bold; text-align: left;&quot;&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;color: #6fa8dc; font-weight: bold;&quot;&gt;In a split scenario:&lt;/span&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Heartbeat is lost &amp;amp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Nodes cannot validate each other&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
Each node believes the other is down&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Oracle does not allow both to continue. It forces a decision.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;&lt;span style=&quot;color: #e06666; font-size: x-large;&quot;&gt;&lt;b&gt;Why Split Brain Happens in Production&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;From experience, split brain is rarely caused by a single obvious failure. It is often a combination of infrastructure and configuration issues.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Common triggers I have seen:&lt;/span&gt;&lt;/span&gt;&lt;ul data-end=&quot;2222&quot; data-start=&quot;2165&quot;&gt;&lt;li data-end=&quot;2222&quot; data-section-id=&quot;1r1g0qf&quot; data-start=&quot;2136&quot;&gt;&lt;strong data-end=&quot;2162&quot; data-start=&quot;2138&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Interconnect failure&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;&lt;li data-end=&quot;2222&quot; data-section-id=&quot;10uj6a2&quot; data-start=&quot;2165&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;NIC issues, bonding misconfiguration, or cable problems
&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul data-end=&quot;2330&quot; data-start=&quot;2255&quot;&gt;&lt;li data-end=&quot;2330&quot; data-section-id=&quot;1b746ld&quot; data-start=&quot;2223&quot;&gt;&lt;strong data-end=&quot;2252&quot; data-start=&quot;2225&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Network switch problems&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;&lt;li data-end=&quot;2330&quot; data-section-id=&quot;nw6uvm&quot; data-start=&quot;2255&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Especially when interconnect traffic shares switches with other workloads
&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul data-end=&quot;2417&quot; data-start=&quot;2359&quot;&gt;&lt;li data-end=&quot;2417&quot; data-section-id=&quot;1oiadq4&quot; data-start=&quot;2331&quot;&gt;&lt;strong data-end=&quot;2356&quot; data-start=&quot;2333&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;High CPU or OS hang&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;&lt;li data-end=&quot;2417&quot; data-section-id=&quot;1g5wsqa&quot; data-start=&quot;2359&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Node becomes unresponsive and misses heartbeat intervals
&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul data-end=&quot;2504&quot; data-start=&quot;2462&quot;&gt;&lt;li data-end=&quot;2504&quot; data-section-id=&quot;5agrpm&quot; data-start=&quot;2418&quot;&gt;&lt;strong data-end=&quot;2459&quot; data-start=&quot;2420&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Improper interconnect configuration&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;&lt;li data-end=&quot;2504&quot; data-section-id=&quot;1ld9sqx&quot; data-start=&quot;2462&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Wrong interface priority or MTU mismatch
&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;Split brain is not always a &quot;network down&quot; scenario. Even latency spikes or packet drops can trigger it.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;&lt;span style=&quot;color: #e06666; font-size: x-large;&quot;&gt;&lt;b&gt;How Oracle RAC Protects Your Data&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Oracle RAC is designed with a strong principle:&amp;nbsp;&lt;strong data-end=&quot;2914&quot; data-start=&quot;2859&quot;&gt;Data integrity is more important than availability.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;When a split condition is detected, Oracle Clusterware steps in immediately.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;1. Node Eviction&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Oracle resolves the conflict by evicting one node from the cluster.&lt;br /&gt;&lt;/span&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;The node that loses quorum or heartbeat validation is removed&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;Its database instance is terminated &amp;amp;&amp;nbsp;&lt;/span&gt;Access to shared storage is blocked&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;This ensures only one side continues processing.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;b&gt;2. Voting Disk Mechanism&lt;br /&gt;&lt;/b&gt;Voting disks act as arbiters.&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;
Each node votes to confirm cluster membership&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;Majority wins &amp;amp; t&lt;/span&gt;he losing node is evicted&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Hence, Always use an odd number of voting disks (3 or 5)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;b&gt;3. Heartbeat Monitoring&lt;br /&gt;&lt;/b&gt;Cluster Synchronization Services (CSS):&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
Tracks node liveness and&amp;nbsp;&lt;/span&gt;Uses heartbeat signals over interconnect&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;Missed heartbeats beyond threshold trigger eviction&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;b&gt;4. Fencing&lt;br /&gt;&lt;/b&gt;Once evicted, a&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;Node is completely isolated from shared storag and&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;Prevents accidental writes&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;&lt;span style=&quot;color: #e06666; font-size: x-large;&quot;&gt;&lt;b&gt;Essential Commands Every RAC DBA Should Know&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;During an incident, speed matters. You do not have time to google commands.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Cluster Health Checks :&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;crsctl check cluster &lt;span class=&quot;ͼf&quot;&gt;-all&lt;/span&gt;&lt;br /&gt;crsctl stat res &lt;span class=&quot;ͼf&quot;&gt;-t&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;Node Information&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;olsnodes -n&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Voting Disk Status&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;crsctl query css votedisk&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;CRS Logs (Eviction Analysis)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;cd $GRID_HOME/log/&amp;lt;node_name&amp;gt;/crsd/&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;&lt;b&gt;When Node Eviction Becomes a Problem&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;While node eviction protects data, frequent evictions are a red flag.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;You might face some&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;Application disruptions /&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;Session drops / Performance instability&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;If evictions happen often, it is not a RAC problem-- it is an infrastructure problem.&lt;/span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;Focus on the areas such as&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;Interconnect latency /&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;Network packet drops /&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;CPU starvation&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;&lt;span style=&quot;color: #e06666; font-size: x-large;&quot;&gt;&lt;b&gt;Mini Case Study: The Invisible Network Issue&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;In one production setup, we observed random node evictions during peak batch processing.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Initial suspicion was&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;Database load &amp;amp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;High I/O&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;But the real issue was a&amp;nbsp;misconfigured network switch intermittently dropping jumbo frames.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Symptoms we noticed :&amp;nbsp;&lt;/span&gt;&lt;ul data-end=&quot;5567&quot; data-start=&quot;5498&quot;&gt;&lt;li data-end=&quot;5522&quot; data-section-id=&quot;l0wwrt&quot; data-start=&quot;5498&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
No full network outage and&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul data-end=&quot;5567&quot; data-start=&quot;5498&quot;&gt;&lt;li data-end=&quot;5567&quot; data-section-id=&quot;xn3dw1&quot; data-start=&quot;5523&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
Just enough packet loss to miss heartbeats
&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;Fix:&lt;/span&gt;&lt;ul data-end=&quot;5648&quot; data-start=&quot;5574&quot;&gt;&lt;li data-end=&quot;5618&quot; data-section-id=&quot;pbkdqm&quot; data-start=&quot;5574&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
Standardized MTU across nodes and switches
&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul data-end=&quot;5648&quot; data-start=&quot;5574&quot;&gt;&lt;li data-end=&quot;5648&quot; data-section-id=&quot;1yu8wak&quot; data-start=&quot;5619&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
Dedicated interconnect VLAN
&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;Lesson learnt : Split brain is often triggered by subtle network inconsistencies, not total failures.&lt;/span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #e06666; font-size: x-large;&quot;&gt;DBA Perspective&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;ul data-end=&quot;6485&quot; data-start=&quot;5843&quot;&gt;&lt;li data-end=&quot;5973&quot; data-section-id=&quot;rri6vo&quot; data-start=&quot;5843&quot;&gt;&lt;strong data-end=&quot;5889&quot; data-start=&quot;5845&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Eviction is not failure- it is protection&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;&lt;li data-end=&quot;5973&quot; data-section-id=&quot;rri6vo&quot; data-start=&quot;5843&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Many teams panic when they see node eviction. It is actually RAC doing its job.
&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul data-end=&quot;6485&quot; data-start=&quot;5843&quot;&gt;&lt;li data-end=&quot;6074&quot; data-section-id=&quot;ii81m7&quot; data-start=&quot;5975&quot;&gt;&lt;strong data-end=&quot;6019&quot; data-start=&quot;5977&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Interconnect deserves dedicated design&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;&lt;li data-end=&quot;6074&quot; data-section-id=&quot;ii81m7&quot; data-start=&quot;5975&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Never treat it as &quot;just another network interface&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;span data-end=&quot;6116&quot; data-start=&quot;6078&quot;&gt;&lt;ul data-end=&quot;6485&quot; data-start=&quot;5843&quot; style=&quot;text-align: left;&quot;&gt;&lt;li style=&quot;font-weight: bold;&quot;&gt;&lt;strong data-end=&quot;6116&quot; data-start=&quot;6078&quot;&gt;&lt;strong data-end=&quot;6116&quot; data-start=&quot;6078&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Monitoring must go beyond database&lt;/span&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ul data-end=&quot;6485&quot; data-start=&quot;5843&quot; style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;span data-end=&quot;6116&quot; data-start=&quot;6078&quot;&gt;such as Network latency&amp;nbsp;&amp;nbsp;&lt;/span&gt;OS load &amp;amp;&amp;nbsp; NIC errors&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul data-end=&quot;6485&quot; data-start=&quot;5843&quot;&gt;&lt;li data-end=&quot;6253&quot; data-section-id=&quot;d2qbnb&quot; data-start=&quot;6178&quot; style=&quot;font-weight: bold;&quot;&gt;&lt;strong data-end=&quot;6218&quot; data-start=&quot;6180&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;CRS logs are gold during incidents&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;&lt;li data-end=&quot;6253&quot; data-section-id=&quot;d2qbnb&quot; data-start=&quot;6178&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Do not rely only on alert logs
&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;ul data-end=&quot;6485&quot; data-start=&quot;5843&quot;&gt;&lt;li data-end=&quot;6342&quot; data-section-id=&quot;nx4jfq&quot; data-start=&quot;6255&quot;&gt;&lt;strong data-end=&quot;6295&quot; data-start=&quot;6257&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Virtual environments increase risk&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;&lt;li data-end=&quot;6342&quot; data-section-id=&quot;nx4jfq&quot; data-start=&quot;6255&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Resource contention can mimic node failure&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;ul data-end=&quot;6485&quot; data-start=&quot;5843&quot;&gt;&lt;li data-end=&quot;6342&quot; data-section-id=&quot;nx4jfq&quot; data-start=&quot;6255&quot;&gt;&lt;strong data-end=&quot;6403&quot; data-start=&quot;6346&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Timeout parameters are not tuning knobs for beginners&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;&lt;li data-end=&quot;6485&quot; data-section-id=&quot;9s4vuo&quot; data-start=&quot;6344&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Changing misscount or disktimeout without understanding can make things worse&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;&lt;div style=&quot;font-size: x-large; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;color: #e06666; font-weight: bold;&quot;&gt;Quick Takeaways&lt;/span&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Split brain occurs when RAC nodes lose communication&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Oracle resolves it using node eviction&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Voting disks ensure majority-based decisions&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Interconnect stability is critical&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Frequent evictions indicate deeper infrastructure issues&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Monitoring CRS logs is essential for diagnosis&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Always prioritize data integrity over uptime&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;&lt;span style=&quot;color: #e06666; font-size: x-large;&quot;&gt;&lt;b&gt;Conclusion&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Split brain is one of those topics that sounds theoretical until you experience it in production. And when you do, it quickly becomes clear why Oracle designed RAC the way it did.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The cluster does not try to be overly smart -, it simply ensures that only one consistent version of truth exists. That is why node eviction happens so aggressively. It may feel disruptive, but it is preventing something far worse: data corruption.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;As a DBA, your responsibility is not just to understand split brain, but to prevent the conditions that lead to it. That means investing time in network design, validating interconnect configurations, and monitoring system health beyond the database layer.&lt;br /&gt;If you are running RAC today, take a moment to review your setup:&lt;/span&gt;&lt;ul data-end=&quot;7747&quot; data-start=&quot;7620&quot;&gt;&lt;li data-end=&quot;7659&quot; data-section-id=&quot;1tjfs0p&quot; data-start=&quot;7620&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
Are voting disks properly configured?
&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul data-end=&quot;7747&quot; data-start=&quot;7620&quot;&gt;&lt;li data-end=&quot;7705&quot; data-section-id=&quot;rhbhp4&quot; data-start=&quot;7660&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
Is your interconnect isolated and reliable?
&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul data-end=&quot;7747&quot; data-start=&quot;7620&quot;&gt;&lt;li data-end=&quot;7747&quot; data-section-id=&quot;1dnmik&quot; data-start=&quot;7706&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
Do you actively monitor cluster health?
&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Because in RAC, stability is not accidental—it is engineered.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;&lt;span style=&quot;color: #e06666; font-size: x-large;&quot;&gt;&lt;b&gt;FAQs&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span data-end=&quot;7881&quot; data-start=&quot;7826&quot;&gt;1. Does split brain always lead to data corruption?&lt;/span&gt;&lt;br /&gt;&lt;span&gt;
No. Oracle prevents corruption using node eviction and fencing mechanisms.&lt;/span&gt;&lt;br /&gt;&lt;span data-end=&quot;8002&quot; data-start=&quot;7960&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;span data-end=&quot;8002&quot; data-start=&quot;7960&quot;&gt;2. Can I disable node eviction in RAC?&lt;/span&gt;&lt;br /&gt;&lt;span&gt;
No. It is a core safety feature and cannot be disabled.&lt;/span&gt;&lt;br /&gt;&lt;span data-end=&quot;8110&quot; data-start=&quot;8062&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;span data-end=&quot;8110&quot; data-start=&quot;8062&quot;&gt;3. What is the ideal number of voting disks?&lt;/span&gt;&lt;br /&gt;&lt;span&gt;
Always use an odd number -. typically 3 or 5.&lt;/span&gt;&lt;br /&gt;&lt;span data-end=&quot;8205&quot; data-start=&quot;8157&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span data-end=&quot;8205&quot; data-start=&quot;8157&quot; style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;4. How do I identify which node was evicted?&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;
Check CRS logs under &lt;/span&gt;&lt;code data-end=&quot;8258&quot; data-start=&quot;8229&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;$GRID_HOME/log/&amp;lt;node&amp;gt;/crsd/&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt; and alert logs.&lt;/span&gt;&lt;br /&gt;&lt;span data-end=&quot;8314&quot; data-start=&quot;8276&quot; style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;span data-end=&quot;8314&quot; data-start=&quot;8276&quot;&gt;5. Can high CPU cause split brain?&lt;/span&gt;&lt;br /&gt;&lt;span&gt;
Yes. If a node cannot send heartbeat signals due to CPU starvation, it may be evicted.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;What is your experience with RAC node evictions in production?&lt;br /&gt;Have you ever traced a split brain issue back to something unexpected like network latency or OS load?&lt;br /&gt;Drop your insights in comments below., these are the scenarios every DBA learns from.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;











































&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;4148&quot; data-start=&quot;4092&quot; style=&quot;text-align: left;&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;w-full overflow-x-hidden overflow-y-auto&quot;&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;div class=&quot;cm-content q9tKkq_readonly&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;4555&quot; data-start=&quot;4526&quot; style=&quot;text-align: left;&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;

















































</description><link>https://oracle-dba-help.blogspot.com/2026/09/split-brain-in-oracle-rac-what-every.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-1219786694872724519</guid><pubDate>Sat, 05 Sep 2026 12:29:00 +0000</pubDate><atom:updated>2026-09-05T20:29:00.144+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">PostgreSQL</category><title>PostgreSQL Crash Recovery: An Oracle DBA’s View</title><description>&lt;h2 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: medium; font-weight: normal;&quot;&gt;&amp;nbsp; The first PostgreSQL crash I handled felt unusually quiet. I was prepared to mount the database, check the required logs and start a recovery procedure. Instead, PostgreSQL detected the unclean shutdown, replayed WAL and opened the database without any DBA command.&lt;/span&gt;&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;That automatic restart can make crash recovery appear simpler than it really is. Recovery time still depends on checkpoint activity, WAL volume, storage performance and the availability of required WAL files. A database that normally starts in seconds can behave very differently after a write-heavy workload or storage incident.&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;What Happens During PostgreSQL Crash Recovery?&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;When PostgreSQL starts after an operating system failure, forced termination or power loss, it checks the cluster control information and identifies the latest valid checkpoint. Recovery begins from the REDO location recorded in that checkpoint, which can be earlier than the checkpoint record itself.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;PostgreSQL then replays the required Write-Ahead Log records to restore physical consistency. After WAL replay completes, it performs an end-of-recovery checkpoint and starts accepting connections.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The database log normally contains messages similar to:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;LOG:  database system was interrupted
LOG:  database system was not properly shut down
LOG:  automatic recovery in progress
LOG:  redo starts at ...
LOG:  redo done at ...
LOG:  database system is ready to accept connections&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;An &lt;code style=&quot;font-family: courier;&quot;&gt;invalid record length&lt;/code&gt; message near the end of recovery does not always indicate corruption. It can simply mean PostgreSQL reached the end of valid WAL. Always read the messages around it before treating it as a failure.&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Add Blogger image here: Server crash -&gt; Read control file -&gt; Locate checkpoint REDO position -&gt; Replay WAL -&gt; End-of-recovery checkpoint -&gt; Accept connections--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Oracle Redo and PostgreSQL WAL Are Not Identical&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The write-ahead principle is familiar to Oracle DBAs. Oracle writes redo before modified blocks reach the data files, while PostgreSQL writes WAL before dirty pages are flushed. Both use these records to recover from a crash.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The main difference is how uncommitted work is handled. Oracle uses undo to roll back uncommitted transactions. PostgreSQL does not physically reverse every uncommitted tuple during startup. MVCC transaction visibility rules keep rows from uncommitted transactions invisible, and vacuum can reclaim the dead tuple versions later.&lt;/p&gt;

&lt;table style=&quot;border-collapse: collapse; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal; width: 100%;&quot;&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Recovery Area&lt;/th&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Oracle&lt;/th&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;PostgreSQL&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Recovery records&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Online redo&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Write-Ahead Log&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Uncommitted transactions&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Recovered using undo&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Hidden through MVCC visibility&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Recovery-time target&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;FAST_START_MTTR_TARGET&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;No direct equivalent&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Recovery monitoring&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;V$INSTANCE_RECOVERY&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Logs and operating-system metrics&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;How Checkpoints Affect Recovery Time&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Checkpoint configuration influences how much work may be required after a crash, but PostgreSQL does not provide a guaranteed recovery-time target.&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;checkpoint_timeout&lt;/code&gt; limits the time between automatic checkpoints.&lt;/li&gt;
  &lt;li&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;max_wal_size&lt;/code&gt; is a soft limit that can trigger checkpoints based on WAL volume.&lt;/li&gt;
  &lt;li&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;checkpoint_completion_target&lt;/code&gt; spreads checkpoint writes across the available interval. It does not control checkpoint frequency directly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;More frequent checkpoints may reduce the amount of WAL replay required, but they can increase normal write I/O. They may also produce more full-page-image WAL because the first change to a page after a checkpoint can require the complete page image to be logged.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This is the same broad performance-versus-recovery trade-off Oracle DBAs associate with &lt;code style=&quot;font-family: courier;&quot;&gt;FAST_START_MTTR_TARGET&lt;/code&gt;, but the controls are not equivalent.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Useful Checks for the DBA&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Start with the PostgreSQL and operating-system logs. If the cluster is stopped, &lt;code style=&quot;font-family: courier;&quot;&gt;pg_controldata&lt;/code&gt; can help identify the recorded cluster state and checkpoint positions. It is not a live recovery progress tool.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;# Service, recovery and storage checks
systemctl status postgresql
journalctl -u postgresql --since &quot;30 minutes ago&quot;
pg_controldata &quot;$PGDATA&quot;
iostat -xz 1

# Active checkpoint configuration

&lt;/span&gt;&lt;span style=&quot;color: #ff79c6; font-family: courier; font-size: medium;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium;&quot;&gt; name, setting, unit, source &lt;/span&gt;&lt;span style=&quot;color: #ff79c6; font-family: courier; font-size: medium;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium;&quot;&gt; pg_settings &lt;/span&gt;&lt;span style=&quot;color: #ff79c6; font-family: courier; font-size: medium;&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium;&quot;&gt; name &lt;/span&gt;&lt;span style=&quot;color: #ff79c6; font-family: courier; font-size: medium;&quot;&gt;IN&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium;&quot;&gt; (
&#39;checkpoint_timeout&#39;,
&#39;checkpoint_completion_target&#39;,
&#39;max_wal_size&#39;,
&#39;min_wal_size&#39;,
&#39;full_page_writes&#39;,
&#39;wal_compression&#39;
) &lt;/span&gt;&lt;span style=&quot;color: #ff79c6; font-family: courier; font-size: medium;&quot;&gt;ORDER BY&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium;&quot;&gt; name;

# PostgreSQL 17 and later

&lt;/span&gt;&lt;span style=&quot;color: #ff79c6; font-family: courier; font-size: medium;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium;&quot;&gt; * &lt;/span&gt;&lt;span style=&quot;color: #ff79c6; font-family: courier; font-size: medium;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium;&quot;&gt; pg_stat_checkpointer;

# WAL generation

&lt;/span&gt;&lt;span style=&quot;color: #ff79c6; font-family: courier; font-size: medium;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium;&quot;&gt;
wal_records,
wal_fpi,
wal_bytes,
wal_buffers_full,
stats_reset &lt;/span&gt;&lt;span style=&quot;color: #ff79c6; font-family: courier; font-size: medium;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium;&quot;&gt; pg_stat_wal;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;On releases before PostgreSQL 17, checkpoint counters are available in &lt;code style=&quot;font-family: courier;&quot;&gt;pg_stat_bgwriter&lt;/code&gt;. Compare counter changes over a fixed interval instead of interpreting cumulative values in isolation.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;A Production Scenario&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;On one write-heavy system, application latency showed regular spikes and recovery after a server failure took longer than expected. The production configuration had been inherited from a much smaller environment:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;checkpoint_timeout = 5min
max_wal_size = 1GB
checkpoint_completion_target = 0.5&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Checkpoint statistics showed that WAL volume was repeatedly triggering requested checkpoints before the timeout. Checkpoint writes were also compressed into a relatively short period.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;After measuring WAL generation, disk capacity and storage latency, the team increased &lt;code style=&quot;font-family: courier;&quot;&gt;max_wal_size&lt;/code&gt;, extended the checkpoint interval and used a higher &lt;code style=&quot;font-family: courier;&quot;&gt;checkpoint_completion_target&lt;/code&gt;. The exact values were selected from workload measurements rather than copied from a generic recommendation.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Normal latency became more stable, but the work did not end there. Controlled crash testing was used to measure the new recovery time. Larger checkpoint intervals can improve normal performance while increasing the amount of WAL that may need to be replayed, so both sides of the change must be tested.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Common Recovery Problems&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Required WAL Is Missing&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This often happens because someone deleted files from &lt;code style=&quot;font-family: courier;&quot;&gt;pg_wal&lt;/code&gt;, a separate WAL filesystem was not mounted, or a restored data directory is inconsistent with the available WAL. Never delete WAL files manually to solve a space problem.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Recovery Is Running but Very Slowly&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Check storage latency before concluding that PostgreSQL is stuck. WAL replay can become slow on a throttled cloud volume or a storage device reporting repeated I/O errors.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;The WAL Filesystem Keeps Growing&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Failed archiving, inactive replication slots, disconnected standbys and backup activity can retain WAL. Check these consumers before modifying checkpoint settings.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Unlogged Tables Lose Their Contents&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Unlogged tables are not crash-safe. PostgreSQL truncates them automatically after a crash. They should never be used for data that must survive an unexpected restart.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Lessons from the Field&lt;/h2&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;A graceful restart does not test the crash-recovery path.&lt;/li&gt;
  &lt;li&gt;Recovery time depends on storage throughput as much as checkpoint configuration.&lt;/li&gt;
  &lt;li&gt;A large &lt;code style=&quot;font-family: courier;&quot;&gt;pg_wal&lt;/code&gt; directory does not automatically indicate a fault.&lt;/li&gt;
  &lt;li&gt;Do not use &lt;code style=&quot;font-family: courier;&quot;&gt;pg_resetwal&lt;/code&gt; as a routine startup fix. It is a last-resort salvage utility.&lt;/li&gt;
  &lt;li&gt;Measure checkpoint frequency, WAL generation, archive failures and actual restart duration.&lt;/li&gt;
  &lt;li&gt;Keep the expected recovery log sequence and escalation steps in the production runbook.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Frequently Asked Questions&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Does PostgreSQL require manual crash recovery?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Normally, no. PostgreSQL starts WAL replay automatically after detecting an unclean shutdown.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Can applications connect during primary crash recovery?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Regular connections are normally accepted only after crash recovery has completed. A hot standby accepting read-only connections is a different recovery scenario.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Will reducing checkpoint_timeout always improve recovery?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;No. It may reduce recovery work but can increase checkpoint I/O and full-page-image WAL generation during normal operation.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Is there a PostgreSQL equivalent of V$INSTANCE_RECOVERY?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;PostgreSQL does not provide a direct view showing a reliable remaining-time estimate for primary crash recovery. DBAs normally follow the logs and operating-system I/O metrics.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;When should pg_resetwal be used?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Only after normal restore and WAL recovery options have been exhausted. If it is used to salvage a cluster, the safer approach is to extract the data and rebuild the database rather than return the same cluster directly to production.&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1IDSBcaAOaVUZPgfqrfZwMJ2WyuntBi_SkoP1SnFAlOECalnMTRf9PUQP7PREVMgl2g6Wu28pe2QYbbyLwCNgIBX_qWHAV8CSHgyRBShGOX8fTrEOH5KQHS14d4mRiVfyuZoEuW6PIz9zAjTHlZAszeoQwgHKIO2tqu0iU1gQla7E1RYJNAyuzi4jkgk/s1800/blogpost%20best%20image.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;900&quot; data-original-width=&quot;1800&quot; height=&quot;540&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1IDSBcaAOaVUZPgfqrfZwMJ2WyuntBi_SkoP1SnFAlOECalnMTRf9PUQP7PREVMgl2g6Wu28pe2QYbbyLwCNgIBX_qWHAV8CSHgyRBShGOX8fTrEOH5KQHS14d4mRiVfyuZoEuW6PIz9zAjTHlZAszeoQwgHKIO2tqu0iU1gQla7E1RYJNAyuzi4jkgk/w1078-h540/blogpost%20best%20image.png&quot; width=&quot;1078&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;PostgreSQL crash recovery is designed to be automatic, but it should never be treated as a black box. WAL restores physical consistency, MVCC keeps uncommitted tuples invisible, and later vacuum activity reclaims dead row versions.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For Oracle DBAs, redo and checkpoint concepts provide a useful starting point. The major differences are the absence of an Oracle-style undo rollback phase and the lack of a direct PostgreSQL equivalent to &lt;code style=&quot;font-family: courier;&quot;&gt;FAST_START_MTTR_TARGET&lt;/code&gt; or &lt;code style=&quot;font-family: courier;&quot;&gt;V$INSTANCE_RECOVERY&lt;/code&gt;.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Review checkpoint statistics, monitor WAL retention, validate storage performance and test an unclean restart in a controlled environment. Until it has been measured under realistic workload conditions, the expected recovery time is only an assumption.&lt;/p&gt;
</description><link>https://oracle-dba-help.blogspot.com/2026/10/postgresql-crash-recovery-oracle-dbas.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1IDSBcaAOaVUZPgfqrfZwMJ2WyuntBi_SkoP1SnFAlOECalnMTRf9PUQP7PREVMgl2g6Wu28pe2QYbbyLwCNgIBX_qWHAV8CSHgyRBShGOX8fTrEOH5KQHS14d4mRiVfyuZoEuW6PIz9zAjTHlZAszeoQwgHKIO2tqu0iU1gQla7E1RYJNAyuzi4jkgk/s72-w1078-h540-c/blogpost%20best%20image.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-3799262910810249539</guid><pubDate>Mon, 31 Aug 2026 09:33:00 +0000</pubDate><atom:updated>2026-09-12T14:09:55.934+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Must Read</category><category domain="http://www.blogger.com/atom/ns#">Tuning</category><title>Oracle Indexes: Fix Slow SQL Without Overdoing It</title><description>&lt;div style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium; font-weight: normal;&quot;&gt;A SQL query running for 8 seconds may not create panic during testing. In production, the same query can become a real incident when it runs thousands of times from an application, report, or batch process.&lt;/span&gt;&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;I have seen queries drop from seconds to milliseconds after adding one correct index. I have also seen OLTP systems become slower because every column was indexed without understanding the workload. Both situations are common.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Indexes are powerful, but they are not free. They reduce unnecessary reads for SELECT queries, but they add cost to INSERT, UPDATE, DELETE, storage, statistics gathering, and maintenance. A good DBA does not create indexes blindly. A good DBA checks the SQL pattern, data volume, selectivity, execution plan, and write workload before touching production.&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Why Indexes Matter in Production&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;When Oracle does not have a useful access path, it may scan the entire table. For a small lookup table, that may be acceptable. For a large transaction table, it can mean high logical reads, CPU pressure, slow application response, and unnecessary I/O.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The real question is not whether an index exists. The real question is whether the index matches how the application searches the data.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A query filtering by &lt;code style=&quot;font-family: courier;&quot;&gt;customer_id&lt;/code&gt; needs a different indexing approach from a report filtering by &lt;code style=&quot;font-family: courier;&quot;&gt;status&lt;/code&gt;, &lt;code style=&quot;font-family: courier;&quot;&gt;region&lt;/code&gt;, and &lt;code style=&quot;font-family: courier;&quot;&gt;payment_mode&lt;/code&gt;. Similarly, a query using &lt;code style=&quot;font-family: courier;&quot;&gt;UPPER(name)&lt;/code&gt; may not benefit from a normal index on &lt;code style=&quot;font-family: courier;&quot;&gt;name&lt;/code&gt;.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;B-tree Indexes: The Normal Choice for OLTP&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;B-tree indexes are the default and most commonly used Oracle index type. In most OLTP systems, this is where DBAs should start.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;They work well for columns with many distinct values, such as order IDs, customer IDs, email addresses, account numbers, transaction IDs, and date columns. These indexes are useful for equality searches, range scans, joins, and primary key lookups.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For example, if an application frequently searches orders by customer, a simple B-tree index can reduce unnecessary table reads.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; *
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; orders
&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; customer_id = 10045;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;CREATE&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;INDEX&lt;/span&gt; idx_orders_customer_id &lt;span style=&quot;color: #ff79c6;&quot;&gt;ON&lt;/span&gt; orders(customer_id);&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For queries that regularly filter by multiple columns, a composite index may be better than multiple single-column indexes.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;CREATE&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;INDEX&lt;/span&gt; idx_orders_customer_status
&lt;span style=&quot;color: #ff79c6;&quot;&gt;ON&lt;/span&gt; orders(customer_id, order_status);&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Column order matters in composite indexes. If the application usually searches by &lt;code style=&quot;font-family: courier;&quot;&gt;customer_id&lt;/code&gt; first, then &lt;code style=&quot;font-family: courier;&quot;&gt;customer_id&lt;/code&gt; should usually be the leading column. Index design should follow real SQL patterns, not assumptions.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Bitmap Indexes: Useful, But Not for Every System&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Bitmap indexes are useful for columns with very few distinct values, such as status, gender, active flag, region, or processed flag. They can perform very well in reporting systems and data warehouses where queries combine multiple low-cardinality filters.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;CREATE&lt;/span&gt; BITMAP &lt;span style=&quot;color: #ff79c6;&quot;&gt;INDEX&lt;/span&gt; bix_orders_status
&lt;span style=&quot;color: #ff79c6;&quot;&gt;ON&lt;/span&gt; orders(order_status);&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The problem starts when bitmap indexes are created on busy OLTP tables. Concurrent DML can suffer because bitmap locking can affect a range of rows, not just one row. If many sessions are inserting or updating at the same time, this can become a blocking issue.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;My practical rule is simple: bitmap indexes belong mostly to read-heavy reporting or warehouse-style workloads. On a hot transaction table, think twice before using them.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Function-Based Indexes: When SQL Changes the Column&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;One common production issue is that the index exists, but Oracle still does not use it as expected. Many times, the reason is that the SQL applies a function on the column.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For example, an index on &lt;code style=&quot;font-family: courier;&quot;&gt;name&lt;/code&gt; may not help much if the application searches using &lt;code style=&quot;font-family: courier;&quot;&gt;UPPER(name)&lt;/code&gt;. Oracle is not searching the raw column anymore. It is searching the result of the function.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; *
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; employees
&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; UPPER(name) = &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;JOHN&#39;&lt;/span&gt;;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;CREATE&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;INDEX&lt;/span&gt; idx_emp_upper_name &lt;span style=&quot;color: #ff79c6;&quot;&gt;ON&lt;/span&gt; employees(UPPER(name));&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Function-based indexes are useful when the application SQL cannot be changed quickly. But do not create them for every function you see. They still add storage and DML overhead.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For date columns, rewriting the predicate is often better than creating another function-based index. Instead of using &lt;code style=&quot;font-family: courier;&quot;&gt;TRUNC(order_date)&lt;/code&gt; in the WHERE clause, use a date range when possible.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; order_date &amp;gt;= &lt;span style=&quot;color: #ff79c6;&quot;&gt;DATE&lt;/span&gt; &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;2026-07-05&#39;&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;AND&lt;/span&gt;   order_date &amp;lt;  &lt;span style=&quot;color: #ff79c6;&quot;&gt;DATE&lt;/span&gt; &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;2026-07-06&#39;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Invisible Indexes: Safer Testing Before Dropping&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Invisible indexes are helpful when you want to test whether an index can be removed. The index remains in the database and continues to be maintained, but the optimizer normally ignores it.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;INDEX&lt;/span&gt; idx_orders_status INVISIBLE;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;INDEX&lt;/span&gt; idx_orders_status VISIBLE;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This is safer than dropping an index immediately. Some indexes are used only during month-end reports, audit jobs, quarterly reconciliation, or batch processing. A short observation window can give the wrong conclusion.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;However, remember that invisible indexes are still maintained during DML. If the goal is to reduce write overhead, the benefit comes only after the index is dropped.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Checking Index Usage Without Guesswork&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Before removing an index, monitor its usage and review the workload. Oracle provides index usage monitoring, but the result should be interpreted carefully.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;INDEX&lt;/span&gt; idx_orders_status MONITORING USAGE;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; index_name, used, start_monitoring &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; v$object_usage;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;INDEX&lt;/span&gt; idx_orders_status NOMONITORING USAGE;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Do not monitor for one quiet day and drop the index. A rarely used index may still protect an important business job. The safer approach is to monitor, review SQL history, make the index invisible, observe a full business cycle, and then decide.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Oracle vs PostgreSQL Indexing View&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle and PostgreSQL both use B-tree indexes as the normal default, but the operational handling differs.&lt;/p&gt;

&lt;ul&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle supports B-tree, bitmap, function-based, invisible, domain, reverse key, compressed, and other index options.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;PostgreSQL supports B-tree, Hash, GiST, SP-GiST, GIN, and BRIN indexes.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle bitmap indexes are physical index structures. PostgreSQL may use bitmap scans during execution, but that is not the same as creating an Oracle bitmap index.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;PostgreSQL DBAs commonly use &lt;code style=&quot;font-family: courier;&quot;&gt;CREATE INDEX CONCURRENTLY&lt;/code&gt; to reduce blocking during index creation.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle DBAs may use online index creation where available and licensed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The common lesson is the same in both databases: indexing is workload-driven. The database engine can only help if the index design matches the query pattern.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Common Failure Scenarios&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;1. Index Exists, But Query Still Scans the Table&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This usually happens because of stale statistics, poor selectivity, function usage on the column, datatype conversion, or the optimizer deciding that a full scan is cheaper.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;2. Too Many Indexes on a Hot Table&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Every insert or update becomes more expensive because Oracle must maintain multiple indexes. This is painful on audit, transaction, session, queue, and event tables.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;3. Bitmap Index on OLTP Table&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Bitmap indexes can create blocking problems in concurrent DML workloads. They may look attractive because the column has few values, but the workload type matters more.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;4. Wrong Composite Index Order&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A composite index is not automatically useful. The leading column should match how the SQL filters data. Poor column order can make the index less effective.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;5. Index Dropped Too Quickly&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;An index may not be used during normal daytime workload but may be critical during month-end or batch processing. Dropping it without a proper observation window can create a delayed production issue.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Mini Case Study: Query Slowed Down After Data Growth&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A customer order search was running fine for years. Later, the same SQL started taking several seconds during peak time. The application team said the query had not changed, and they were right. The table had changed.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The table grew from a few million rows to hundreds of millions of rows. Existing single-column indexes were no longer enough for the actual search pattern. The SQL usually filtered by customer and order status together.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; customer_id = :b1
&lt;span style=&quot;color: #ff79c6;&quot;&gt;AND&lt;/span&gt;   order_status = :b2;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;CREATE&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;INDEX&lt;/span&gt; idx_orders_customer_status &lt;span style=&quot;color: #ff79c6;&quot;&gt;ON&lt;/span&gt; orders(customer_id, order_status)
ONLINE;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;After testing and refreshing statistics, logical reads dropped sharply and the query became stable again. The lesson was simple: data growth exposes weak index design. A query that behaves well at 5 million rows may become expensive at 200 million rows.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;DBA Insights From Production&lt;/h2&gt;

&lt;ul&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Do not create indexes only because a query is slow. First check the execution plan and row selectivity.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Review existing indexes before adding new ones. Duplicate and overlapping indexes are common in old systems.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Be careful with bitmap indexes on transactional tables.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For date filters, try range predicates before creating function-based indexes.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Use invisible indexes when testing index removal.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Monitor index usage across a real business cycle, not only during normal office hours.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Treat indexes like production code. They need review, testing, monitoring, and cleanup.&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;FAQs&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Why is Oracle not using my index?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Common reasons include stale statistics, poor selectivity, function usage on the column, datatype mismatch, bind variable behavior, or the optimizer estimating that a full table scan is cheaper.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Should every foreign key be indexed?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Not blindly, but many OLTP systems benefit from indexing foreign keys, especially when parent rows are deleted or updated, or when joins frequently use the foreign key column.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;When should bitmap indexes be avoided?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Avoid bitmap indexes on tables with frequent concurrent inserts, updates, or deletes. They are usually better for reporting, warehouse, or read-heavy workloads.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Is a composite index better than two single-column indexes?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Sometimes yes. If the SQL always filters by two columns together, one well-designed composite index can be better than two independent indexes. The leading column is important.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;How long should index usage be monitored before dropping?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Monitor long enough to include daily, weekly, month-end, batch, reporting, and audit workloads. A short monitoring window can miss rarely used but important indexes.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Indexes can fix slow SQL quickly, but they can also become hidden production debt. A good index reduces unnecessary reads and gives Oracle a better path to the data. A poor index adds storage, write overhead, maintenance effort, and sometimes confusion during troubleshooting.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For most OLTP workloads, B-tree indexes are the practical default. Bitmap indexes should be handled carefully and are usually better suited for read-heavy reporting systems. Function-based indexes are useful when SQL applies expressions to columns, but rewriting the predicate may be cleaner. Invisible indexes are useful when cleaning up doubtful indexes safely.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The best indexing decisions come from real workload evidence. Check the execution plan, data distribution, table growth, existing indexes, and DML volume. Do not add indexes emotionally, and do not drop them casually.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Review your top SQL regularly, clean up duplicate indexes carefully, test changes in a controlled way, and monitor the impact after every release. Index tuning is not a one-time task. It is part of healthy production database maintenance.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1en9lsGFWAd7iNXXRIE61_iRLYc28OEQFoLz9lM4J5ZRVYj8wwfR8S_PI6q19lJTOabbCBBx_9GwgL_U74Fw7wXqdcCwHbFnZGHNYuEIG1oz2RB-t6in6fhvJkVLzRjgSNyPjwcG7EmrAyebVcw2_2O3_UgPw5FcwfhJnMfSwM1XI_3AUJvBDfNNk0CQ/s1536/6.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1024&quot; data-original-width=&quot;1536&quot; height=&quot;497&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1en9lsGFWAd7iNXXRIE61_iRLYc28OEQFoLz9lM4J5ZRVYj8wwfR8S_PI6q19lJTOabbCBBx_9GwgL_U74Fw7wXqdcCwHbFnZGHNYuEIG1oz2RB-t6in6fhvJkVLzRjgSNyPjwcG7EmrAyebVcw2_2O3_UgPw5FcwfhJnMfSwM1XI_3AUJvBDfNNk0CQ/w747-h497/6.png&quot; width=&quot;747&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
</description><link>https://oracle-dba-help.blogspot.com/2026/08/oracle-indexes-fix-slow-sql-without.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1en9lsGFWAd7iNXXRIE61_iRLYc28OEQFoLz9lM4J5ZRVYj8wwfR8S_PI6q19lJTOabbCBBx_9GwgL_U74Fw7wXqdcCwHbFnZGHNYuEIG1oz2RB-t6in6fhvJkVLzRjgSNyPjwcG7EmrAyebVcw2_2O3_UgPw5FcwfhJnMfSwM1XI_3AUJvBDfNNk0CQ/s72-w747-h497-c/6.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-7160292956694353537</guid><pubDate>Sat, 22 Aug 2026 13:50:00 +0000</pubDate><atom:updated>2026-08-29T21:51:48.422+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">23ai</category><category domain="http://www.blogger.com/atom/ns#">26ai</category><category domain="http://www.blogger.com/atom/ns#">AI</category><category domain="http://www.blogger.com/atom/ns#">Core DBA</category><title>The Oracle DBA Role in the AI Era - See how Oracle AI Database 26ai, Autonomous AI Database and MAA are reshaping the DBA role across reliability, security and enterprise AI</title><description>&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Database automation has removed plenty of manual effort, but it has not removed operational accountability. Oracle can now automate provisioning, patching, backup, scaling, and parts of performance management. At the same time, applications are becoming more distributed, security boundaries are expanding, and AI workloads are placing new demands on enterprise data.&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This has changed the DBA role rather than eliminated it. The focus is moving from performing every database task manually to selecting the right Oracle capability, defining safe operating boundaries, and proving that the complete service can meet its availability, recovery, security, performance, and cost objectives.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The modern Oracle DBA is no longer responsible only for an instance. The responsibility now extends across the application-to-data path, including cloud services, AI access, identity, networking, observability, and recovery dependencies.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Autonomous Does Not Mean Unmanaged&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle Autonomous AI Database demonstrates how far routine database administration has progressed. Provisioning, tuning, patching, monitoring, backup, and scaling can be automated, allowing teams to spend less time maintaining infrastructure and more time improving the service built on top of it.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The important production questions, however, remain with the database and platform teams:&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;Does the selected deployment model meet the application’s availability requirement?&lt;/li&gt;
  &lt;li&gt;Are automatic scaling limits based on measured demand or optimistic estimates?&lt;/li&gt;
  &lt;li&gt;Can the database be restored within the agreed recovery time?&lt;/li&gt;
  &lt;li&gt;Are wallets, identities, private endpoints, and encryption keys available during recovery?&lt;/li&gt;
  &lt;li&gt;Will the application reconnect correctly after a role transition?&lt;/li&gt;
  &lt;li&gt;Are automated backups being periodically restored and validated?&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Automation changes how an operation is executed. It does not prove that the result satisfies the business requirement. A successful backup job is not the same as a tested recovery, and an available database endpoint does not guarantee that the application can reach it.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Oracle’s Reliability Stack Still Needs DBA Judgement&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle has a mature set of products for mission-critical availability, but each addresses a different failure model.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;strong&gt;Oracle Real Application Clusters&lt;/strong&gt; provides instance-level availability and scale-out within a cluster. &lt;strong&gt;Oracle Active Data Guard&lt;/strong&gt; maintains physical standby databases for disaster recovery, data protection, and eligible read workload offloading. &lt;strong&gt;Oracle GoldenGate&lt;/strong&gt; supports logical replication, migrations, and real-time data integration across Oracle and non-Oracle platforms.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;strong&gt;Oracle Zero Data Loss Autonomous Recovery Service&lt;/strong&gt; adds database-aware backup protection, recovery validation, and an option for real-time redo protection. For demanding consolidation and performance requirements, &lt;strong&gt;Oracle Exadata&lt;/strong&gt; provides an engineered platform in which Oracle Database, compute, storage, and networking are designed to operate together.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;These technologies should not be treated as interchangeable checkboxes. RAC does not replace regional disaster recovery. GoldenGate does not automatically replace a physical standby. A standby database does not replace protected backups because corruption, accidental changes, or security incidents may also be replicated.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle Maximum Availability Architecture helps organize these capabilities into validated availability and recovery patterns. The DBA’s contribution is translating business expectations into the appropriate architecture and then rehearsing the failure paths that matter.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Oracle AI Database Brings AI Closer to Enterprise Data&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;AI introduces another change to the DBA role. Application teams increasingly need semantic search, retrieval-augmented generation, natural-language access, and controlled agent interaction with business data.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle AI Database 26ai supports this through capabilities such as AI Vector Search and Select AI. Vector embeddings can be stored alongside relational, JSON, text, spatial, and graph data instead of forcing every AI use case onto a separate specialist database.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This matters because enterprise searches rarely depend on similarity alone. A support assistant might search product documentation semantically, but the results may also need to be filtered by customer, product version, geography, entitlement, and data-classification rules. Oracle can combine those business filters with vector similarity processing close to the governed source data.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Select AI and Natural-Language Queries&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle Select AI can translate natural-language requests into SQL and support retrieval-augmented generation over private data. This can make enterprise information more accessible without requiring every user to understand the underlying schema.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Natural-language access does not remove the need for database controls. Generated SQL still consumes resources, accesses protected objects, and may return sensitive information. Production adoption therefore requires least-privilege access, approved schemas, auditing, workload controls, and testing against ambiguous requests.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The DBA does not need to become a data scientist to support these workloads. However, the role should understand vector indexes, embedding dimensions, similarity metrics, data-refresh behaviour, and the performance effect of combining vector search with conventional SQL predicates.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;AI Agents Need Database Guardrails&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle’s Select AI Agent framework and Autonomous AI Database MCP Server can provide controlled ways for compatible agents to use defined database tools. This creates useful possibilities for analytics, support applications, and assisted operations.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;It also introduces a new class of service account. An agent should receive only the tools and data required for its purpose. Read-only access should be the default where possible, destructive actions should require explicit controls, and every operation should remain attributable through auditing.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Valid SQL is not automatically safe SQL. The same principle applies whether a statement comes from an application, a human administrator, or an AI agent.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;One Platform, Several Data Models&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;One practical strength of Oracle AI Database is its converged design. Relational data, JSON documents, vectors, spatial data, and graph relationships can be managed within the same platform. This can reduce the number of separate systems required for an application and, with that, the number of security models, backup processes, monitoring stacks, and integration pipelines.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;strong&gt;JSON-Relational Duality&lt;/strong&gt; allows applications to access the same underlying data as relational tables or JSON documents. &lt;strong&gt;True Cache&lt;/strong&gt; provides an automatically maintained, transactionally consistent cache for read-intensive applications. &lt;strong&gt;SQL Firewall&lt;/strong&gt; can help identify and block unauthorized SQL activity based on approved SQL patterns.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Using one database for every workload is not automatically the correct design. The decision should still consider scalability, operational isolation, skills, licensing, service availability, and cost. The benefit is that Oracle gives architects the option to consolidate compatible data requirements without immediately introducing another specialist platform.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWHu3ClohsIFIEOl5ihnQJ3E6W6fuTPBIcfaVEIDyD9hJ5BrbQL1PQusV3-RT4GntV7y67ldZmBR238YqmPe8rkhxISRB2ngkyzGPyfy02tu65XOBFzMmuxPcitIDIkVi01jGKhdYAUsx4pd00JQcsMTKgVBe43ggZiN_FP-p-iOLFVc-UVKTnrCAoL8U/s1800/oracle-ai-application-production-stack.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1050&quot; data-original-width=&quot;1800&quot; height=&quot;590&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWHu3ClohsIFIEOl5ihnQJ3E6W6fuTPBIcfaVEIDyD9hJ5BrbQL1PQusV3-RT4GntV7y67ldZmBR238YqmPe8rkhxISRB2ngkyzGPyfy02tu65XOBFzMmuxPcitIDIkVi01jGKhdYAUsx4pd00JQcsMTKgVBe43ggZiN_FP-p-iOLFVc-UVKTnrCAoL8U/w1009-h590/oracle-ai-application-production-stack.png&quot; width=&quot;1009&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;A Practical Oracle AI Scenario&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Consider an internal support assistant that must answer questions using customer records, product documentation, operational procedures, and recent transaction information.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;AI Vector Search could locate relevant documents by meaning, while relational predicates restrict the results by business unit, customer entitlement, geography, and data classification. Select AI could provide natural-language interaction, and approved agent tools could retrieve specific operational information.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The database may run on Autonomous AI Database or Exadata, depending on control, deployment, and workload requirements. RAC or the service’s built-in availability architecture can protect against local failures. Active Data Guard or Autonomous Data Guard can provide standby protection, while Recovery Service protects backups. GoldenGate may be introduced when selected data must be replicated to another platform.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Although this is presented as an AI project, its production readiness depends on familiar DBA questions:&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;Which data is the agent permitted to retrieve?&lt;/li&gt;
  &lt;li&gt;How are source documents refreshed, retained, and removed?&lt;/li&gt;
  &lt;li&gt;Are vector data and indexes included in the recovery design?&lt;/li&gt;
  &lt;li&gt;How will similarity searches affect database resources during peak periods?&lt;/li&gt;
  &lt;li&gt;Can generated SQL bypass an application-level security rule?&lt;/li&gt;
  &lt;li&gt;What happens to the complete service during database failover?&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The AI feature may be new, but the requirement for controlled access, measurable performance, and tested recovery is not.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;A Modern Oracle DBA Responsibility Map&lt;/h2&gt;

&lt;table style=&quot;border-collapse: collapse; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal; width: 100%;&quot;&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Operational Area&lt;/th&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Oracle Capability&lt;/th&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;DBA Decision or Validation&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Routine Operations&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Autonomous AI Database&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Define scaling limits, maintenance expectations, backup policies, connectivity, and service ownership.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Local Availability&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Oracle RAC and Exadata&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Validate workload suitability, application continuity, service placement, and cluster failure behaviour.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Disaster Recovery&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Active Data Guard or Autonomous Data Guard&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Select the protection mode, measure transport and apply lag, test role transitions, and validate application recovery.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Backup Protection&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Zero Data Loss Autonomous Recovery Service&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Set retention policies, protect recovery credentials, test restores, and confirm the achievable recovery point.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;AI Search&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;AI Vector Search&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Choose the vector design, index strategy, similarity metric, data-refresh process, and workload controls.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Natural-Language Access&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Select AI&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Restrict schema access, audit generated SQL, protect sensitive data, and test ambiguous requests.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Real-Time Integration&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Oracle GoldenGate&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Define consistency expectations, conflict handling, replication scope, monitoring, and recovery procedures.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;The Multicloud DBA Boundary&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle Database services are no longer limited to a single cloud strategy. Oracle Database@Azure, Oracle Database@Google Cloud, and Oracle Database@AWS allow organizations to place Oracle database services closer to applications running in their chosen hyperscaler.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The database service may be managed on Oracle infrastructure, but the complete application can still depend on another provider’s compute, networking, identity, monitoring, and storage services. Incident ownership and disaster-recovery runbooks must reflect that split.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A successful database switchover is only technical completion. Operational success means the application has reconnected, dependent services are working, monitoring has followed the new primary, and the business transaction has been validated.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;What DBAs Should Build Next&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The strongest path forward is not to abandon traditional Oracle knowledge. It is to combine that foundation with a wider operating view.&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;Keep performance, recovery, transaction knowledge current.&lt;/li&gt;
  &lt;li&gt;Learn how Autonomous AI Database changes operational ownership.&lt;/li&gt;
  &lt;li&gt;Understand where RAC, Data Guard, GoldenGate, Recovery Service, and Exadata fit.&lt;/li&gt;
  &lt;li&gt;Build practical knowledge of vectors, RAG, Select AI, and agent security.&lt;/li&gt;
  &lt;li&gt;Treat identity, certificates, networks, and key management as database dependencies.&lt;/li&gt;
  &lt;li&gt;Automate repeatable work like pre-checks, logging, exception handling, and safe recovery paths.&lt;/li&gt;
  &lt;li&gt;Measure performance and cloud consumption instead of relying only on provisioned capacity.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;&lt;b&gt;Good architecture in any environment or estate,- comes from selecting the smallest combination that meets the required performance, availability, security, recovery, and cost objectives., and later evaluating it and exploring &amp;amp; expanding it more&lt;/b&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Frequently Asked Questions&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Will Autonomous AI Database replace Oracle DBAs?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;It reduces routine administration, but architecture, recovery validation, workload design, security, integration, governance, and business service requirements still need qualified ownership., so keep learning and exploring the Oracle Learnings and Certifications.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Is AI Vector Search a separate Oracle database?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;No. AI Vector Search is integrated with Oracle AI Database, allowing vector similarity processing to be combined with relational and other supported data searches.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Does an AI agent need special database controls?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Yes. Agent access should follow least-privilege principles, use approved tools, remain auditable, and require stronger controls for any operation that can change production data or configuration.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Are RAC and Data Guard alternatives to each other?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;No. RAC primarily addresses availability and scalability within a cluster, while Data Guard maintains standby databases for disaster recovery and data protection. Critical systems commonly use both for different failure scenarios.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle has automated many tasks that once defined daily database administration, but the DBA role has moved toward higher-value decisions. Autonomous AI Database reduces routine effort. RAC, Active Data Guard, GoldenGate, Recovery Service, Exadata, and Oracle MAA support demanding availability and recovery requirements. Oracle AI Database 26ai adds a practical foundation for vector search, natural-language access, and governed AI applications.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The responsibility is therefore broader than keeping an instance online. The modern Oracle DBA must connect database behaviour with application continuity, security, cloud dependencies, AI access, recovery, and cost. The next practical step is to review one existing workload and confirm whether its architecture, automation, and recovery tests prove the business outcome rather than merely showing that individual components are healthy.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Official References&lt;/h2&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.oracle.com/database/features/&quot; target=&quot;_blank&quot;&gt;Oracle AI Database features&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.oracle.com/autonomous-database/&quot; target=&quot;_blank&quot;&gt;Oracle Autonomous AI Database&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.oracle.com/database/technologies/maximum-availability-architecture/&quot; target=&quot;_blank&quot;&gt;Oracle Maximum Availability Architecture&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Relevant Oracle Learning and Certifications&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;DBAs who want to build skills around Oracle AI Database, autonomous operations, vector search, agentic AI, multicloud architecture, and availability can consider the following Oracle University learning paths and certifications.&lt;/p&gt;

&lt;table style=&quot;border-collapse: collapse; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal; width: 100%;&quot;&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Priority&lt;/th&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Oracle Certification or Learning Path&lt;/th&gt;
      &lt;th style=&quot;background-color: #e06666; border: 1px solid rgb(153, 153, 153); color: white; padding: 10px; text-align: left;&quot;&gt;Relevant Learning&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;1&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;a href=&quot;https://mylearn.oracle.com/ou/learning-path/become-an-oci-agentic-ai-foundations-associate/163239&quot; target=&quot;_blank&quot;&gt;Agentic AI Foundations Associate&lt;/a&gt;&lt;br /&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;1Z0-1157-26&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Introduces AI agents, agentic patterns, MCP, LangChain, OCI Enterprise AI, and the use of Oracle AI Database in agent-driven solutions.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;2&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;a href=&quot;https://mylearn.oracle.com/ou/learning-path/become-an-oracle-ai-vector-search-professional/144854&quot; target=&quot;_blank&quot;&gt;Oracle AI Vector Search Professional&lt;/a&gt;&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Covers vector fundamentals, embeddings, similarity searches, vector indexes, retrieval-augmented generation, and Select AI.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;3&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;a href=&quot;https://mylearn.oracle.com/ou/learning-path/become-an-oracle-autonomous-ai-database-professional/163045&quot; target=&quot;_blank&quot;&gt;Oracle Autonomous AI Database Professional&lt;/a&gt;&lt;br /&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;1Z0-931-26&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Focuses on provisioning, scaling, patching, backup, security, performance management, and the operational lifecycle of Autonomous AI Database.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;4&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;a href=&quot;https://mylearn.oracle.com/ou/learning-path/become-an-agentic-ai-for-oracle-ai-database-professional/163163&quot; target=&quot;_blank&quot;&gt;Agentic AI for Oracle AI Database Professional&lt;/a&gt;&lt;br /&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;1Z0-1159-26&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Provides advanced learning on agentic workflows, Select AI Agent, MCP integration, database tools, and governed access to enterprise data.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;5&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;a href=&quot;https://education.oracle.com/ouexam-pexam_1z0-1147/pexam_1Z0-1147&quot; target=&quot;_blank&quot;&gt;Oracle AI Database@Azure Architect Professional&lt;/a&gt;&lt;br /&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;1Z0-1147&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Validates skills in designing, deploying, connecting, and managing Oracle Database services within Microsoft Azure environments.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;6&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;&lt;a href=&quot;https://education.oracle.com/ouexam-pexam_1z0-076/pexam_1Z0-076&quot; target=&quot;_blank&quot;&gt;Oracle Database 19c: Data Guard Administration&lt;/a&gt;&lt;br /&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;1Z0-076&lt;/code&gt;&lt;/td&gt;
      &lt;td style=&quot;border: 1px solid rgb(153, 153, 153); padding: 10px; text-align: left;&quot;&gt;Strengthens practical knowledge of standby databases, redo transport, apply services, protection modes, role transitions, and disaster recovery.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Suggested Learning Sequence&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For an Oracle DBA moving toward data, cloud, and AI reliability responsibilities, the following sequence provides a useful progression:&lt;/p&gt;

&lt;ol style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;Build the agentic AI foundation.&lt;/li&gt;
  &lt;li&gt;Learn vector embeddings, similarity search, and RAG through Oracle AI Vector Search.&lt;/li&gt;
  &lt;li&gt;Develop operational knowledge of Autonomous AI Database.&lt;/li&gt;
  &lt;li&gt;Move into database-native agentic workflows and MCP integration.&lt;/li&gt;
  &lt;li&gt;Add Oracle Database@Azure or another relevant multicloud specialization.&lt;/li&gt;
  &lt;li&gt;Continue strengthening traditional availability skills through Data Guard and Oracle MAA.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Build Hands-On Skills with Oracle AI Database 26ai Free&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Certification learning becomes more valuable when it is supported by practical testing. &lt;a href=&quot;https://www.oracle.com/database/free/&quot; target=&quot;_blank&quot;&gt;Oracle AI Database 26ai Free&lt;/a&gt; provides a suitable environment for experimenting with vector data types, embeddings, similarity queries, JSON-Relational Duality, SQL Firewall, and other 26ai capabilities.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A useful learning exercise is to create a small document-search application, store embeddings with business metadata, perform semantic searches with relational filters, and then evaluate indexing, security, backup, and performance behaviour from a DBA perspective.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Upcoming Oracle Learning&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle University has announced an Exadata Database Service professional-level certification planned for October 2026. This should be particularly relevant to DBAs working with Exadata cloud deployments, consolidation, performance, and mission-critical database services.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle&#39;s Foundations learning and certification remain available without charge. Professional-level learning paths generally require paid access under Oracle University’s 2026 model. Certification titles are now evergreen, although individual exam codes may continue to contain release identifiers. Review the &lt;a href=&quot;https://blogs.oracle.com/oracleuniversity/oci-certification-learning-paths-and-exams-2026-updates-now-available&quot; target=&quot;_blank&quot;&gt;Oracle University 2026 certification update&lt;/a&gt; and the corresponding &lt;a href=&quot;https://mylearn.oracle.com/&quot; target=&quot;_blank&quot;&gt;MyLearn page&lt;/a&gt; before scheduling an exam.&lt;/p&gt;
</description><link>https://oracle-dba-help.blogspot.com/2026/11/the-oracle-dba-role-in-ai-era-see-how.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWHu3ClohsIFIEOl5ihnQJ3E6W6fuTPBIcfaVEIDyD9hJ5BrbQL1PQusV3-RT4GntV7y67ldZmBR238YqmPe8rkhxISRB2ngkyzGPyfy02tu65XOBFzMmuxPcitIDIkVi01jGKhdYAUsx4pd00JQcsMTKgVBe43ggZiN_FP-p-iOLFVc-UVKTnrCAoL8U/s72-w1009-h590-c/oracle-ai-application-production-stack.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-5568484228925327279</guid><pubDate>Sun, 16 Aug 2026 10:26:00 +0000</pubDate><atom:updated>2026-09-21T20:10:18.556+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Core DBA</category><category domain="http://www.blogger.com/atom/ns#">Must Read</category><title>Oracle Key Vault: DBA Guide for TDE Keys and scenarios</title><description>&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: bold; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium; font-weight: normal;&quot;&gt;A database backup can finish successfully and still fail during recovery.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;That usually sounds strange until encryption enters the picture. RMAN backup is available, archive logs are available, Data Guard is in sync, but during restore someone asks the real question: where is the TDE wallet or master key?&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;This is where many production environments become risky. TDE wallets are present on database servers, Java keystores are owned by middleware teams, SSH keys are copied between hosts, certificates are renewed manually, and old wallet backups are kept in folders nobody wants to touch.&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Oracle Key Vault helps reduce this spread by centralizing the management of TDE master keys, Oracle wallets, Java keystores, certificates, credential files, SSH keys, and other secrets. For a DBA, the value is not only security. It is also recoverability, auditability, controlled access, and cleaner operations during patching, migration, Data Guard switchover, and disaster recovery.&lt;/span&gt;&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Add Blogger image here: Oracle Key Vault centralized key management diagram--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Why Key Management Becomes a DBA Problem&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Encryption may start as a security requirement, but the operational impact often lands with the DBA team.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A few common production situations are very familiar:&lt;/p&gt;

&lt;ul&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A TDE wallet was created on the primary database server but was never validated on the standby.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A database restore completed, but encrypted tablespaces could not be opened.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A RAC node was rebuilt, but the Oracle Key Vault endpoint client was missed.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A certificate expired and the issue appeared during a maintenance window.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Audit asked who accessed or rotated a key, and the answer was scattered across tickets and server logs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle Key Vault brings these security objects under central control. Instead of each database server becoming its own small vault, OKV becomes the controlled repository where access, lifecycle, backup, and reporting can be managed properly.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The important production point is this: once a database depends on external key management, key availability becomes part of database availability.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;How Oracle Key Vault Fits with TDE&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle Transparent Data Encryption protects data at rest. Oracle Key Vault does not replace TDE. It manages the keys and security objects used by TDE.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;In a typical setup, the database server is enrolled as an Oracle Key Vault endpoint. That endpoint gets access to the required virtual wallet or security objects. The database can then access its TDE master encryption keys through the OKV client configuration.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For modern Oracle databases, the two parameters DBAs should pay attention to are &lt;code style=&quot;font-family: courier;&quot;&gt;WALLET_ROOT&lt;/code&gt; and &lt;code style=&quot;font-family: courier;&quot;&gt;TDE_CONFIGURATION&lt;/code&gt;. Older environments may still have wallet locations configured through &lt;code style=&quot;font-family: courier;&quot;&gt;sqlnet.ora&lt;/code&gt;, especially after upgrades or migrations, so it is worth checking the actual configuration before making assumptions.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SHOW&lt;/span&gt; parameter wallet_root
&lt;span style=&quot;color: #ff79c6;&quot;&gt;SHOW&lt;/span&gt; parameter tde_configuration

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SET&lt;/span&gt; lines 200 &lt;span style=&quot;color: #ff79c6;&quot;&gt;COL&lt;/span&gt; wallet_type &lt;span style=&quot;color: #ff79c6;&quot;&gt;FOR&lt;/span&gt; a20 &lt;span style=&quot;color: #ff79c6;&quot;&gt;COL&lt;/span&gt; status &lt;span style=&quot;color: #ff79c6;&quot;&gt;FOR&lt;/span&gt; a20 &lt;span style=&quot;color: #ff79c6;&quot;&gt;COL&lt;/span&gt; keystore_mode &lt;span style=&quot;color: #ff79c6;&quot;&gt;FOR&lt;/span&gt; a20 &lt;span style=&quot;color: #ff79c6;&quot;&gt;COL&lt;/span&gt; wrl_parameter &lt;span style=&quot;color: #ff79c6;&quot;&gt;FOR&lt;/span&gt; a60

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; con_id,
wallet_type,
status,
keystore_mode,
wrl_parameter &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; v$encryption_wallet &lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; con_id;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; tablespace_name,
encrypted &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; dba_tablespaces &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; encrypted = &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;YES&#39;&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; tablespace_name;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER SYSTEM SET&lt;/span&gt; wallet_root=&lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;/u01/app/oracle/admin/PRODDB/wallet&#39;&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;SCOPE&lt;/span&gt;=spfile;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SHUTDOWN IMMEDIATE&lt;/span&gt;; &lt;span style=&quot;color: #ff79c6;&quot;&gt;STARTUP&lt;/span&gt;;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER SYSTEM SET&lt;/span&gt; tde_configuration=&lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;KEYSTORE_CONFIGURATION=OKV&#39;&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;SCOPE&lt;/span&gt;=both;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;In some environments, you may see values such as &lt;code style=&quot;font-family: courier;&quot;&gt;OKV|FILE&lt;/code&gt; or &lt;code style=&quot;font-family: courier;&quot;&gt;FILE|OKV&lt;/code&gt;. Do not treat these as random alternatives. They are commonly seen during migration or dual-keystore designs. Always verify the Oracle version, current wallet state, and whether the database is using united or isolated keystore mode in a multitenant setup.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;The Endpoint Check DBAs Should Not Skip&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The database view gives one side of the story. The endpoint check gives another.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle Key Vault uses endpoint software on the database or application server. The command-line utility &lt;code style=&quot;font-family: courier;&quot;&gt;okvutil&lt;/code&gt; is one of the quickest ways to confirm whether the endpoint can talk to OKV and access the assigned security objects.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #04ff00; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;export &lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;OKV_HOME=/u01/app/oracle/okv
&lt;/span&gt;&lt;span style=&quot;color: #04ff00; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;export &lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;PATH=$OKV_HOME/bin:$PATH

okvutil list

grep -i server $OKV_HOME/conf/okvclient.ora
ls -l $OKV_HOME/conf

nslookup okv-vip.example.com
nc -vz okv-vip.example.com 5696

grep -Ei &quot;ORA-283|ORA-284|TDE|OKV|PKCS|wallet|keystore&quot; 
$ORACLE_BASE/diag/rdbms/*/*/trace/alert*.log&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;If &lt;code style=&quot;font-family: courier;&quot;&gt;okvutil list&lt;/code&gt; fails, do not immediately recreate wallets. Start with simple checks. Is &lt;code style=&quot;font-family: courier;&quot;&gt;OKV_HOME&lt;/code&gt; correct? Is &lt;code style=&quot;font-family: courier;&quot;&gt;okvclient.ora&lt;/code&gt; present? Was the endpoint enrolled? Can the host reach the OKV server or VIP? Was the endpoint certificate replaced? Did the database move to another Oracle home?&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For RAC, validate from every node. A common operational miss is checking only node 1. Everything looks healthy until a service relocates or an instance restarts on node 2.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;High Availability: Central Control Needs Strong Design&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Centralizing keys improves governance, but it also introduces a dependency that must be designed properly.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A running database may continue during a temporary OKV issue depending on cache behavior and whether the required key is already available. But that does not mean the design is safe. The real test is a database restart, PDB open, standby open read-only, key rotation, or restore to another host.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For critical databases, OKV should be included in the same operational checklist as Data Guard, RAC, backup, and monitoring.&lt;/p&gt;

&lt;ul&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;OKV high availability or cluster design&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;OKV backup and restore testing&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Endpoint configuration on all RAC nodes&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Standby endpoint access&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Firewall and DNS validation from primary and DR sites&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Certificate expiry monitoring&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Key rotation testing in lower environments&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A DR test should not be marked successful only because redo apply worked. If TDE is enabled, encrypted data access after role transition must also be tested.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;RAC, Data Guard, GoldenGate and Hybrid Estates&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle Key Vault is simple to understand in a single database setup. It becomes more interesting in a real enterprise estate.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;In RAC, every node must have a working OKV endpoint configuration. Service relocation, node restart, or instance failover can expose node-specific issues.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;In Data Guard, the standby must be able to access the required TDE keys. A standby can be perfect from a redo apply perspective but still fail after promotion if key access was never validated.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;In GoldenGate environments, wallets, certificates, database credentials, and encrypted source or target data can all become part of the security chain. OKV helps reduce unmanaged local copies, but endpoint access and operational ownership must be planned properly.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;In hybrid or multi-cloud setups, the difficult questions are often outside the database. Can the DR site reach OKV? Does DNS resolve correctly after failover? Are firewall rules open from all database subnets? Who owns certificate renewal? Is OKV monitored by both security and operations teams?&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Oracle vs PostgreSQL: Same Goal, Different Model&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle has a strong database-native TDE model, and Oracle Key Vault integrates closely with that ecosystem.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;PostgreSQL is different. Community PostgreSQL usually follows a layered security model. DBAs commonly combine SSL/TLS, SCRAM authentication, &lt;code style=&quot;font-family: courier;&quot;&gt;pgcrypto&lt;/code&gt; for specific column-level encryption use cases, OS or storage-level encryption, cloud KMS, or external vault solutions. Some PostgreSQL vendors provide their own TDE features, but it is not the same operational model as Oracle TDE with OKV.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SHOW&lt;/span&gt; ssl;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; pid,
ssl,
version,
cipher &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; pg_stat_ssl &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; ssl = &lt;span style=&quot;color: #8be9fd;&quot;&gt;true&lt;/span&gt;;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;CREATE EXTENSION IF NOT EXISTS&lt;/span&gt; pgcrypto;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; pgp_sym_encrypt(&lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;sensitive-value&#39;&lt;/span&gt;, &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;do-not-hardcode-this-key&#39;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The PostgreSQL example above is only to show the capability. In production, encryption keys should not be hardcoded inside SQL, scripts, or application configuration files. Key ownership, rotation, and auditability must be designed properly.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Common Failure Scenarios&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Most OKV-related issues are not mysterious. They usually come from one missed endpoint step, one wrong permission, one network rule, or one assumption that was never tested.&lt;/p&gt;

&lt;ul&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Database restart fails because the keystore cannot be opened.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Standby opens after failover but encrypted tablespaces are not accessible.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;RAC node 1 works, but node 2 fails after service relocation.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;OKV endpoint was re-enrolled, but the database server still has old configuration files.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Firewall or DNS changes break OKV connectivity from the DR site.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Key rotation was performed without validating standby, restore, and application behaviour.&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;A Case Study about: Data Guard Failover and Missing Key Access&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A TDE-enabled Oracle database was protected by Data Guard. Redo transport was healthy, apply lag was under control, and the standby looked ready for DR.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;During a failover test, the standby was promoted successfully. The database opened, but application testing failed when encrypted data was accessed.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The root cause was not Data Guard. The standby host did not have proper OKV endpoint access to the required virtual wallet. The team had validated replication but had not validated TDE key access from the standby server.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The fix was to enroll the standby correctly as an OKV endpoint, grant access to the required virtual wallet, validate endpoint connectivity, check wallet status from the database, and test encrypted data access again after role transition.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The lesson is simple: for encrypted databases, Data Guard readiness is not only redo apply. It also includes key availability.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2yaTeN4qL5rPMnuwKw4dN_qJtXbMkmCNMzqd653XviU7C4M1Wbg19HPiAgOupfsWE7TkgOOfvk_27dbRuszfATdZ0x8Qcmif84eotNk3adKk8Wymh_L3Hs56fVVcELmwY_A7sDvVtpYxvRR1KfRRvdWUzDfb9jiVj_oXdDjg4jdSBFcfqOPX9cWjeVSE/s1672/Nikhilkotak%20Image%20Jun%201,%202026,%2007_08_33%20PM.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;941&quot; data-original-width=&quot;1672&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2yaTeN4qL5rPMnuwKw4dN_qJtXbMkmCNMzqd653XviU7C4M1Wbg19HPiAgOupfsWE7TkgOOfvk_27dbRuszfATdZ0x8Qcmif84eotNk3adKk8Wymh_L3Hs56fVVcELmwY_A7sDvVtpYxvRR1KfRRvdWUzDfb9jiVj_oXdDjg4jdSBFcfqOPX9cWjeVSE/w640-h360/Nikhilkotak%20Image%20Jun%201,%202026,%2007_08_33%20PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;DBA Insights from Production&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The most dangerous encryption issue is the one discovered during recovery.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A database can run for months without anyone noticing that a standby endpoint is wrong, a wallet backup is outdated, a RAC node cannot reach OKV, or a restore host does not have the correct access. These issues surface during patching, failover, restore, or migration, exactly when pressure is highest.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;My practical recommendations are:&lt;/p&gt;

&lt;ul&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Add OKV checks to database health check scripts.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Validate endpoint connectivity from every RAC node.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Include OKV validation in Data Guard switchover and failover drills.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Test encrypted tablespace access after restore.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Track certificate expiry and endpoint re-enrollment.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Do not rotate keys in production without a tested rollback and communication plan.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Document ownership between DBA, security, Unix, network, and cloud teams.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle Key Vault gives control, but only when the operational process around it is strong.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Quick Takeaways&lt;/h2&gt;

&lt;ul&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle Key Vault reduces wallet and key sprawl, but it must be included in availability planning.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;WALLET_ROOT&lt;/code&gt; and &lt;code style=&quot;font-family: courier;&quot;&gt;TDE_CONFIGURATION&lt;/code&gt; are key parameters for modern Oracle TDE setup.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;okvutil list&lt;/code&gt; is a simple but powerful endpoint validation command.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;RAC nodes, standby servers, and restore hosts must all be checked separately.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Data Guard readiness is incomplete without TDE key access validation.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;PostgreSQL security usually needs a layered design rather than one OKV-style model.&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;FAQs&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;1. Does Oracle Key Vault replace TDE?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;No. TDE encrypts the database data. Oracle Key Vault centrally manages the keys and security objects used by TDE.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;2. Will OKV slow down every SQL query?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Normally, no. OKV is more relevant during key access, startup, keystore open, key rotation, migration, and recovery operations. It is not called for every row read.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;3. What should I check first during an OKV issue?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Start with &lt;code style=&quot;font-family: courier;&quot;&gt;v$encryption_wallet&lt;/code&gt; from the database and &lt;code style=&quot;font-family: courier;&quot;&gt;okvutil list&lt;/code&gt; from the database server. These two checks quickly separate database-side and endpoint-side issues.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;4. Is OKV mandatory for Data Guard?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;No, not in every design. But if the primary database uses OKV-managed TDE keys, the standby must also be able to access the required keys.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;5. How is PostgreSQL different?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle has native TDE integration with OKV. PostgreSQL commonly uses TLS, &lt;code style=&quot;font-family: courier;&quot;&gt;pgcrypto&lt;/code&gt;, storage encryption, application-level encryption, external vaults, or cloud KMS depending on the requirement.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle Key Vault solves a real production problem: too many keys, wallets, certificates, and secrets spread across too many systems.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For Oracle DBAs, the biggest benefit is not only central storage. It is controlled access, audit support, cleaner key lifecycle operations, and reduced recovery risk. When TDE is used across RAC, Data Guard, GoldenGate, and hybrid environments, this becomes even more important.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;At the same time, OKV should not be treated as a black box owned only by the security team. Once Oracle databases depend on it, DBAs need to understand endpoint configuration, TDE parameters, standby access, certificate dependency, and what happens during failover or restore.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The best time to test key access is not during a failed recovery. It is during planned validation.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Review your encrypted databases. Check where the keys live. Confirm who can access them. Validate OKV from all nodes. Test standby and restore scenarios. Add OKV checks to your operational runbooks.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Encryption protects data, but key management protects the recovery path.&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-S8lIniN4BCrPTFcA5E6Z5MDbRvGm2_8EoQ2GFxT7oTlP1ZGyeJKRTVtYRG300iG0XcL-bfaoMWf7VTvswAZCAuPCTfxeWov7JZrpxjIbAAKqsFBJaoLZFEWdC990v6yd03DNYmgWEvMprlL075BvrUlWXOgh2kYdmQXd9MWwf28nCfW9MLZLcQib4bs/s1672/Nikhilkotak%20Image%20Jun%201,%202026,%2006_56_01%20PM.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;941&quot; data-original-width=&quot;1672&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-S8lIniN4BCrPTFcA5E6Z5MDbRvGm2_8EoQ2GFxT7oTlP1ZGyeJKRTVtYRG300iG0XcL-bfaoMWf7VTvswAZCAuPCTfxeWov7JZrpxjIbAAKqsFBJaoLZFEWdC990v6yd03DNYmgWEvMprlL075BvrUlWXOgh2kYdmQXd9MWwf28nCfW9MLZLcQib4bs/w640-h360/Nikhilkotak%20Image%20Jun%201,%202026,%2006_56_01%20PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Have you ever seen a restore, switchover, or migration delayed because the wallet or encryption key was missing?&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Share your experience below. These are the production lessons that are rarely visible in architecture diagrams.&lt;/p&gt;
</description><link>https://oracle-dba-help.blogspot.com/2026/08/oracle-key-vault-dba-guide-for-tde-keys.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2yaTeN4qL5rPMnuwKw4dN_qJtXbMkmCNMzqd653XviU7C4M1Wbg19HPiAgOupfsWE7TkgOOfvk_27dbRuszfATdZ0x8Qcmif84eotNk3adKk8Wymh_L3Hs56fVVcELmwY_A7sDvVtpYxvRR1KfRRvdWUzDfb9jiVj_oXdDjg4jdSBFcfqOPX9cWjeVSE/s72-w640-h360-c/Nikhilkotak%20Image%20Jun%201,%202026,%2007_08_33%20PM.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-4093675496964180869</guid><pubDate>Sun, 09 Aug 2026 13:15:00 +0000</pubDate><atom:updated>2026-09-21T20:10:47.074+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Must Read</category><title>Sometimes It Is Not One Big Problem. It Is Everything Running in the Background.</title><description>&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;After more than 12 years of working with production databases, I have learned that performance problems do not always begin with one terrible query.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Sometimes it is several smaller things happening together. One session is using slightly more CPU, another is holding a lock, a background job is running longer than expected, and storage latency has quietly increased. None of them looks disastrous alone, but together they make the whole system struggle.&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Stress can build in much the same way.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;We usually search for one obvious reason when we feel exhausted: a difficult project, a production incident, financial pressure, or a problem at home.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;But sometimes there is no single cause. It is the late-night message we answered, the lunch we skipped, the conversation we kept replaying, the water we forgot to drink, and the sleep we sacrificed because one task was still pending&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Each one appears manageable. Together, they become a collection of background processes that nobody remembered to stop.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;The Small Things That Keep Us Switched On&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Lesson 1: Work Never Completely Ends&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Anyone working in production support knows that some situations cannot wait. If a critical database is unavailable, “Let us check tomorrow morning” is unlikely to be accepted as a recovery plan.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;But not every email is an incident. Not every Teams message is an escalation. And not every sentence beginning with “quick question” will actually be quick.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;When work follows us into every evening, the laptop may be closed, but the mind remains connected. We continue thinking about tomorrow’s change, an unresolved ticket, or the possibility that another message might arrive.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Effectively, the brain remains on call—usually without claiming the allowance.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;There needs to be a reasonable difference between being responsible and being permanently available.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Lesson 2: We Postpone the Basics First&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;During a busy day, lunch is often treated as an optional dependency.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;We plan to eat after the next meeting. Then another call starts, a ticket is escalated, and lunch finally happens at 4:30 PM. That is not necessarily intermittent fasting. Sometimes it is simply poor calendar management.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Water, movement, and sleep are handled in much the same way. The body may tolerate this for a while, which can make us believe everything is fine. However, inadequate sleep can affect attention, mood, and emotional regulation, making ordinary problems feel harder the following day.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;No productivity application can fully compensate for repeatedly ignoring the basics—not even the one with the attractive dashboard.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Lesson 3: Some Meetings Continue in Our Heads&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;We have all attended a meeting that officially ended at 3:00 PM but continued in our mind until bedtime.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Perhaps someone spoke unfairly. Maybe an important question remained unanswered. We replay the discussion and prepare several excellent responses—unfortunately, all of them arrive four hours too late.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;It is unrealistic to expect every emotion to disappear when a meeting ends. A more practical approach is to write down what happened, decide whether an action is required, and set a time to deal with it.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Otherwise, a 30-minute conversation can occupy mental storage for the rest of the day.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Lesson 4: Notifications Create Invisible Work&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;One notification does not seem stressful. The problem is the repeated switching&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;You are reviewing a document when a Teams message appears. Then an email arrives, the phone vibrates, and somebody requests a “small update” in another channel. By evening, you have been active for nine hours but are not entirely sure what you completed.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Research suggests that notifications can interrupt attention even when we do not open them. Turning off unnecessary alerts does not mean becoming unreachable. It means deciding which applications genuinely deserve permission to interrupt you.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;If five applications are all marked as urgent, perhaps none of them understands the meaning of urgent.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Lesson 5: Sitting All Day Does Not Help&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;DBAs can spend several hours in the same chair, particularly during an incident, production change, or troubleshooting call.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;At some point, the chair knows more about the shift schedule than the family does.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Movement does not have to mean a full gym session. A short walk after lunch, standing during a call, or stepping away from the screen between meetings can break a long period of sitting.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A ten-minute walk will not resolve chronic stress or fix the execution plan. It can, however, give the mind a useful pause.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Lesson 6: Not Every Energy Dip Is a Blood-Sugar Problem&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Tiredness, irritability, and poor concentration are frequently blamed on a “blood-sugar crash.” That explanation is often too simple.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The same symptoms may be related to poor sleep, dehydration, irregular meals, stress, medication, or an underlying health condition. An afternoon slump alone is not enough to conclude that someone has hypoglycaemia.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Regular, balanced meals are a sensible starting point. If fatigue, dizziness, or other unexplained symptoms continue, speak with a qualified medical professional. Google, a smartwatch, and one motivational video do not constitute a clinical team.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Lesson 7 Connection Matters More Than We Admit&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;When work becomes intense, personal time is often the first item removed from the calendar.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;We postpone meeting friends, speak less with family, and remain half-connected to the phone even when we are with people; just in case the world ends while we are having dinner.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Supportive relationships cannot remove difficult circumstances, but they can make those circumstances easier to manage. Sometimes a relaxed conversation with someone we trust is more useful than another hour spent trying to optimise ourselves.&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Recovery May Begin with Subtraction&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;When a database is overloaded, we do not always solve the problem by adding more resources. Sometimes we stop an unnecessary job, reduce repeated calls, correct an inefficient query, or remove work that should never have been running.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The same principle can apply to us.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Recovery may not begin with another tracking application, a complicated morning routine, or ten new habits that eventually become eleven new sources of guilt.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;It may begin with something much simpler:&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Turn off one unnecessary notification.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Decline one meeting that does not need to happen.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Eat lunch without looking at a screen.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Leave one genuinely non-urgent message until tomorrow.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Allow an empty space in the calendar to remain empty.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The objective is not to eliminate every source of stress. Some pressure is unavoidable, particularly in roles carrying operational responsibility. The problem begins when pressure becomes continuous and recovery is repeatedly postponed.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;We spend a great deal of time monitoring the health of our systems. Occasionally, we should check what has been running in our own background for too long.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Not every alert requires a P1 response—but please understand the alert before muting it and going for coffee.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Stay healthy.&lt;/p&gt;
</description><link>https://oracle-dba-help.blogspot.com/2026/08/sometimes-it-is-not-one-big-problem-it.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-215442533149586931</guid><pubDate>Sun, 09 Aug 2026 09:44:00 +0000</pubDate><atom:updated>2026-08-09T17:44:00.206+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Core DBA</category><category domain="http://www.blogger.com/atom/ns#">Interview Questions</category><category domain="http://www.blogger.com/atom/ns#">Must Read</category><title>Oracle Redo Logs: Sizing Without Guesswork</title><description>&lt;h2 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: medium; font-weight: normal;&quot;&gt;Redo log problems rarely start with a clean error message. They usually show up as slow commits, archive destinations filling faster than expected, Data Guard apply lag, or batch jobs that suddenly take longer during month-end. By the time someone checks the alert log, the database may already be switching logs too frequently, checkpointing aggressively, or waiting for archiving to catch up.&lt;/span&gt;&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;A common reaction is to increase redo log size and move on. Sometimes that is required, but it is not always the real fix. Redo log sizing controls how frequently Oracle switches logs. It does not reduce the amount of redo generated by bad SQL, unnecessary indexes, row-by-row commits, or poorly designed batch jobs.&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;This post looks at Oracle redo log sizing from a production DBA angle. We will check log switch frequency, estimate redo generation rate, review MTTR guidance, discuss common failure scenarios, and compare the idea briefly with PostgreSQL WAL pressure.&lt;/span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Add Blogger image here: Redo flow diagram showing User Session -&gt; Redo Buffer -&gt; LGWR -&gt; Online Redo Logs -&gt; ARCH -&gt; Archive Destination -&gt; Data Guard Standby--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Why Redo Log Sizing Matters in Production&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Every committed change in Oracle must be protected by redo. LGWR writes redo records to the online redo logs, and in ARCHIVELOG mode, those logs are archived after switching. This is normal database behavior, but it becomes painful when the redo infrastructure is not sized for the workload.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;When redo logs are too small, Oracle switches logs more often. Frequent log switches can increase checkpoint activity, put pressure on archiver processes, and expose slow storage or archive destinations. On a Data Guard setup, the same problem can also show up as transport or apply lag.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;When redo logs are too large without thought, crash recovery behavior may not match business expectations. So the target is not simply “make redo logs huge”. The target is to size them based on workload, recovery requirement, and operational behavior.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;The First Check: How Often Are Logs Switching?&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Before touching redo log size, check the current switch pattern. I normally start with hourly switch frequency and then compare it against known business activity. A switch every 10 to 15 minutes during normal OLTP workload is usually comfortable. A switch every minute during regular workload needs investigation. During a heavy batch window, faster switching may be acceptable only if checkpointing, archiving, and standby apply are keeping up.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; thread#,
       group#,
       ROUND(bytes/1024/1024) &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; size_mb,
       members,
       archived,
       status
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; v$log
&lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; thread#, group#;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; thread#,
TO_CHAR(first_time, &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;YYYY-MM-DD HH24&#39;&lt;/span&gt;) &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; switch_hour,
COUNT(*) &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; switch_count &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; v$log_history &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; first_time &amp;gt;= SYSDATE - 7 &lt;span style=&quot;color: #ff79c6;&quot;&gt;GROUP BY&lt;/span&gt; thread#, TO_CHAR(first_time, &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;YYYY-MM-DD HH24&#39;&lt;/span&gt;) &lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; switch_hour, thread#;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; group#,
type,
member,
status &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; v$logfile &lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; group#, member;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;In RAC, check each thread separately. If thread 1 switches every few minutes but thread 2 is quiet, the issue may be workload imbalance rather than redo sizing alone. Services, application connection pools, or batch jobs may be pinned heavily to one instance.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Size Redo Logs Based on Peak Redo Rate&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Average redo generation is useful for capacity planning, but it is not enough for sizing redo logs. Production incidents usually happen during peak load: month-end processing, large data correction jobs, ETL runs, release deployments, or index maintenance.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The below query uses archived logs to estimate redo generation rate. Run it for the busiest window, not during a quiet period.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; thread#,
       sequence#,
       first_time,
       next_time,
       ROUND(blocks * block_size / 1024 / 1024, 2) &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; size_mb,
       ROUND((next_time - first_time) * 86400) &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; seconds_taken,
       ROUND(
         (blocks * block_size / 1024 / 1024) /
         NULLIF((next_time - first_time) * 86400, 0),
         2
       ) &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; mb_per_sec
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; v$archived_log
&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; first_time &amp;gt;= TO_DATE(&lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;2026-08-08 09:00:00&#39;&lt;/span&gt;, &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;YYYY-MM-DD HH24:MI:SS&#39;&lt;/span&gt;)
&lt;span style=&quot;color: #ff79c6;&quot;&gt;AND&lt;/span&gt;   first_time &amp;lt;  TO_DATE(&lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;2026-08-09 12:00:00&#39;&lt;/span&gt;, &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;YYYY-MM-DD HH24:MI:SS&#39;&lt;/span&gt;)
&lt;span style=&quot;color: #ff79c6;&quot;&gt;AND&lt;/span&gt;   dest_id = 1
&lt;span style=&quot;color: #ff79c6;&quot;&gt;AND&lt;/span&gt;   blocks &amp;gt; 0
&lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; first_time, thread#;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A simple sizing formula is:&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;Redo log size = peak redo MB/sec x desired switch interval in seconds&lt;/code&gt;&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For example, if peak redo generation is 40 MB/sec and you want roughly 10-minute switches, the estimated log size is:&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;40 x 600 = 24000 MB&lt;/code&gt;&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;That does not automatically mean you should create 24 GB logs everywhere. It means the workload is heavy enough that you must validate redo size, archive throughput, Data Guard capacity, and recovery expectations together.&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Add Blogger image here: Redo sizing decision chart showing Peak Redo Rate -&gt; Desired Switch Interval -&gt; Redo Log Size -&gt; Validate MTTR/Data Guard/Archive--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Use MTTR Advice, But Keep DBA Judgement&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle provides recovery-related advice through &lt;code style=&quot;font-family: courier;&quot;&gt;V$INSTANCE_RECOVERY&lt;/code&gt;. The column &lt;code style=&quot;font-family: courier;&quot;&gt;OPTIMAL_LOGFILE_SIZE&lt;/code&gt; can help you understand whether the current redo log size fits the configured recovery target.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;This is useful, but it should not be treated as the only answer. MTTR is mainly about crash recovery time. Runtime behavior also depends on workload, checkpoint activity, I/O, archive speed, and standby apply capacity.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-weight: normal;&quot;&gt;SHOW PARAMETER fast_start_mttr_target
SHOW PARAMETER statistics_level

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; target_mttr,
estimated_mttr,
ckpt_block_writes,
optimal_logfile_size &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; v$instance_recovery;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER SYSTEM SET&lt;/span&gt; statistics_level = &lt;span style=&quot;color: #8be9fd;&quot;&gt;TYPICAL&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;SCOPE&lt;/span&gt;=BOTH;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER SYSTEM SET&lt;/span&gt; fast_start_mttr_target = 300 &lt;span style=&quot;color: #ff79c6;&quot;&gt;SCOPE&lt;/span&gt;=BOTH;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;If &lt;code style=&quot;font-family: courier;&quot;&gt;OPTIMAL_LOGFILE_SIZE&lt;/code&gt; is consistently higher than your current redo log size, that is a strong signal to review redo sizing. Still, test the change during a controlled window and confirm that recovery objectives are acceptable.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Redo Pressure Often Comes from Application Design&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;DBAs often get asked to fix redo growth from the database side, but many redo problems are created by application behavior. Oracle is doing what it is supposed to do: protecting changes. The question is whether the application is asking Oracle to protect too many unnecessary changes.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Too many indexes on write-heavy tables&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Every insert, update, or delete may also modify indexes. A table with many indexes can generate much more redo than expected. Before dropping anything, review index usage carefully and consider invisible indexes for controlled testing.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Delete and insert instead of merge&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Some batch jobs delete old rows and insert fresh rows because it is easy to code. From a redo and undo perspective, that can be expensive. If most rows already exist, a controlled &lt;code style=&quot;font-family: courier;&quot;&gt;MERGE&lt;/code&gt; or targeted update may generate less pressure.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Updating unchanged columns&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;ORM-generated SQL sometimes updates every column even when only one value changed. This can increase redo, undo, row locking, buffer activity, and standby apply workload. For critical batch jobs, review the generated SQL instead of assuming the database parameter is wrong.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; owner,
       table_name,
       COUNT(*) &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; index_count
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; dba_indexes
&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; owner &lt;span style=&quot;color: #ff79c6;&quot;&gt;NOT IN&lt;/span&gt; (&lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;SYS&#39;&lt;/span&gt;, &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;SYSTEM&#39;&lt;/span&gt;)
&lt;span style=&quot;color: #ff79c6;&quot;&gt;GROUP BY&lt;/span&gt; owner, table_name
&lt;span style=&quot;color: #ff79c6;&quot;&gt;HAVING&lt;/span&gt; COUNT(*) &amp;gt; 10
&lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; index_count &lt;span style=&quot;color: #ff79c6;&quot;&gt;DESC&lt;/span&gt;;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER INDEX&lt;/span&gt; app_owner.idx_orders_old &lt;span style=&quot;color: #ff79c6;&quot;&gt;INVISIBLE&lt;/span&gt;;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;MERGE INTO&lt;/span&gt; customer_stage t &lt;span style=&quot;color: #ff79c6;&quot;&gt;USING&lt;/span&gt; customer_stage_new s &lt;span style=&quot;color: #ff79c6;&quot;&gt;ON&lt;/span&gt; (t.customer_id = s.customer_id) &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHEN MATCHED THEN&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;UPDATE SET&lt;/span&gt; t.status = s.status,
t.updated_at = SYSTIMESTAMP &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; NVL(t.status, &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;X&#39;&lt;/span&gt;) &amp;lt;&amp;gt; NVL(s.status, &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;X&#39;&lt;/span&gt;) &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHEN NOT MATCHED THEN&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;INSERT&lt;/span&gt; (customer_id, status, updated_at) &lt;span style=&quot;color: #ff79c6;&quot;&gt;VALUES&lt;/span&gt; (s.customer_id, s.status, SYSTIMESTAMP);&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH9F4Mp-grgbVjGoI8jxdKfA9TRMrNsKMFVl731_BcPxCBYAXmPmuKVcNoucrwuTOufgR-TE72wd8gs4nJEtLjYkf7ZM5ia6kcRgONmwx4IQgBAqulHlNoKk0k3ROwdxtGdJ2FezCYFcXbHpiHW-d0s1I6fA_1zjL1T4gOxd3dLOPTuGtikNDTT-B90Ms/s1491/nikhilk.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1055&quot; data-original-width=&quot;1491&quot; height=&quot;434&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH9F4Mp-grgbVjGoI8jxdKfA9TRMrNsKMFVl731_BcPxCBYAXmPmuKVcNoucrwuTOufgR-TE72wd8gs4nJEtLjYkf7ZM5ia6kcRgONmwx4IQgBAqulHlNoKk0k3ROwdxtGdJ2FezCYFcXbHpiHW-d0s1I6fA_1zjL1T4gOxd3dLOPTuGtikNDTT-B90Ms/w613-h434/nikhilk.png&quot; width=&quot;613&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Commit Frequency Is Not Just a Coding Style&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Row-by-row commits are still common in old batch scripts. They look safe because each row is committed quickly, but they can create unnecessary LGWR activity and poor throughput. On the other hand, one huge commit may create restartability and rollback problems. The right commit size depends on business logic, restart design, and workload volume.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For bulk processing, commit in controlled batches where the business process allows it. Do not change commit logic only for performance without confirming functional requirements.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;DECLARE
  l_count NUMBER := 0;
BEGIN
  FOR r IN (&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; id, status &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; source_table) LOOP

```
&lt;span style=&quot;color: #ff79c6;&quot;&gt;UPDATE&lt;/span&gt; target_table
   &lt;span style=&quot;color: #ff79c6;&quot;&gt;SET&lt;/span&gt; status = r.status
 &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; id = r.id;

l_count := l_count + 1;

IF l_count &amp;gt;= 5000 THEN
  COMMIT;
  l_count := 0;
END IF;
```

END LOOP;

COMMIT;
END;
/&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Resizing Redo Logs Safely&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle does not simply resize an existing redo log group. The usual production approach is to add new larger groups, switch logs until old groups become inactive, and then drop the old groups. In RAC, do this per thread.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Before dropping any group, confirm it is not current and not required for recovery. Also remember Data Guard: standby redo logs should normally be sized consistently with online redo logs.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; thread#,
       group#,
       ROUND(bytes/1024/1024) &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; size_mb,
       status,
       archived
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; v$log
&lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; thread#, group#;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER DATABASE ADD LOGFILE THREAD&lt;/span&gt; 1 &lt;span style=&quot;color: #ff79c6;&quot;&gt;SIZE&lt;/span&gt; 4G; &lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER DATABASE ADD LOGFILE THREAD&lt;/span&gt; 1 &lt;span style=&quot;color: #ff79c6;&quot;&gt;SIZE&lt;/span&gt; 4G; &lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER DATABASE ADD LOGFILE THREAD&lt;/span&gt; 1 &lt;span style=&quot;color: #ff79c6;&quot;&gt;SIZE&lt;/span&gt; 4G;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER SYSTEM SWITCH LOGFILE&lt;/span&gt;; &lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER SYSTEM CHECKPOINT&lt;/span&gt;;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;DROP&lt;/span&gt; -- Do not run until the group is inactive and safe &lt;span style=&quot;color: #ff79c6;&quot;&gt;ALTER DATABASE DROP LOGFILE GROUP&lt;/span&gt; 3;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; group#,
thread#,
ROUND(bytes/1024/1024) &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; size_mb,
status &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; v$standby_log &lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; thread#, group#;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Common Failure Scenarios&lt;/h2&gt;

&lt;ul&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Frequent log switches during normal workload: redo logs may be too small, or redo generation may have increased due to application changes.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Archive destination fills quickly: check redo generation rate, archive backup frequency, FRA size, and retention policy.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Data Guard lag during batch jobs: check primary redo rate, standby redo log size, network throughput, and MRP apply speed.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;High &lt;code style=&quot;font-family: courier;&quot;&gt;log file sync&lt;/code&gt;: investigate commit frequency, LGWR latency, and storage performance.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;High &lt;code style=&quot;font-family: courier;&quot;&gt;log file switch completion&lt;/code&gt;: check checkpoint pressure, archiving speed, and redo log size.&lt;/li&gt;
&lt;/ul&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; event,
       total_waits,
       ROUND(time_waited_micro/1000000, 2) &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; time_waited_sec
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; v$system_event
&lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; event &lt;span style=&quot;color: #ff79c6;&quot;&gt;IN&lt;/span&gt; (
       &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;log file sync&#39;&lt;/span&gt;,
       &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;log file parallel write&#39;&lt;/span&gt;,
       &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;log file switch completion&#39;&lt;/span&gt;,
       &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;log file switch (checkpoint incomplete)&#39;&lt;/span&gt;,
       &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;log file switch (archiving needed)&#39;&lt;/span&gt;
)
&lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; time_waited_sec &lt;span style=&quot;color: #ff79c6;&quot;&gt;DESC&lt;/span&gt;;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; dest_id,
status,
destination,
error &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; v$archive_dest &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; status &amp;lt;&amp;gt; &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;INACTIVE&#39;&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; dest_id;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; name,
value,
unit,
time_computed &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; v$dataguard_stats &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; name &lt;span style=&quot;color: #ff79c6;&quot;&gt;IN&lt;/span&gt; (&lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;transport lag&#39;&lt;/span&gt;, &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;apply lag&#39;&lt;/span&gt;, &lt;span style=&quot;color: #8be9fd;&quot;&gt;&#39;apply finish time&#39;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Oracle Redo and PostgreSQL WAL: Same Pain, Different Knobs&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle redo and PostgreSQL WAL both protect database changes for recovery, but DBAs manage them differently. Oracle DBAs think in terms of redo log groups, members, threads, archiving, and standby redo logs. PostgreSQL DBAs deal with WAL segments, checkpoints, archiving, replication slots, and &lt;code style=&quot;font-family: courier;&quot;&gt;pg_wal&lt;/code&gt; growth.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;In Oracle, redo log size directly affects switch frequency. In PostgreSQL, WAL segment size is normally fixed at cluster initialization, so day-to-day tuning is usually around checkpoint settings, archiving, replication slots, and workload behavior.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;-- PostgreSQL WAL checks

SHOW wal_segment_size;
SHOW checkpoint_timeout;
SHOW max_wal_size;
SHOW min_wal_size;
SHOW archive_mode;
SHOW archive_command;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; wal_records,
wal_fpi,
pg_size_pretty(wal_bytes) &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; wal_generated &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; pg_stat_wal;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; slot_name,
active,
pg_size_pretty(pg_wal_lsn_diff(pg_current_wal_lsn(), restart_lsn)) &lt;span style=&quot;color: #ff79c6;&quot;&gt;AS&lt;/span&gt; retained_wal &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; pg_replication_slots;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;!--Add Blogger image here: Oracle Redo vs PostgreSQL WAL comparison with two lanes and labels--&gt;
&lt;/div&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;DBA Lessons from Production&lt;/h2&gt;

&lt;ul&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;If redo logs are resized on primary, review standby redo logs too.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Frequent log switches are not always a storage issue. Check SQL design and commit behaviour.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Unused indexes on write-heavy tables can silently increase redo volume.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Archive log backup performance matters. Bigger redo logs create bigger archived logs.&lt;/li&gt;
  &lt;li style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For Data Guard, monitor both transport lag and apply lag. They are not the same problem.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Mini Case Study: Data Guard Lag After a Batch Load&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A production database started showing 40 to 50 minutes of Data Guard apply lag during a monthly batch. The primary database was still running, so the first assumption was network slowness between primary and standby.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The actual issue was a mix of small redo logs and a batch job that deleted and reinserted large data sets. The target table also had several indexes that were no longer useful for current reporting. During the batch, one RAC thread was switching logs almost every minute.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The fix was not one single change. Redo logs and standby redo logs were resized after checking peak redo rate. The batch logic was changed from delete/insert to a controlled merge for most rows. Two unused indexes were tested as invisible before being dropped. After that, standby lag still appeared during the peak, but it recovered in minutes instead of staying behind for almost an hour.&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLg8XrUgZ6O3St_vjaGlGTFpISipvb0y4E-4TtiYp4vGT3oIiRJlTSIDG1uezqAN-iKT_e8QGKJHU_35ITG2BUVqkMh54GaPG3vPOvPLzmE8wzy6gJCiUwAUuKqy1-RUAozJXf8Lkh0JN3aErrr971g47qu24cQrkkvXNhnIJhDi4UgHDs54zG5YQHJgE/s1672/2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;941&quot; data-original-width=&quot;1672&quot; height=&quot;358&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLg8XrUgZ6O3St_vjaGlGTFpISipvb0y4E-4TtiYp4vGT3oIiRJlTSIDG1uezqAN-iKT_e8QGKJHU_35ITG2BUVqkMh54GaPG3vPOvPLzmE8wzy6gJCiUwAUuKqy1-RUAozJXf8Lkh0JN3aErrr971g47qu24cQrkkvXNhnIJhDi4UgHDs54zG5YQHJgE/w637-h358/2.png&quot; width=&quot;637&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;FAQs&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;How do I know if redo logs are too small?&lt;/h3&gt;
&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Check log switch frequency using &lt;code style=&quot;font-family: courier;&quot;&gt;V$LOG_HISTORY&lt;/code&gt;. If switches are happening every minute during normal workload, review redo size, checkpoint waits, archive speed, and recent workload changes.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Does increasing redo log size reduce redo generation?&lt;/h3&gt;
&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;No. It reduces log switch frequency. Redo generation depends on DML volume, indexes, commit pattern, SQL design, supplemental logging, and application behavior.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Should all redo log groups be the same size?&lt;/h3&gt;
&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Yes, keeping redo log groups the same size per thread makes behavior predictable and troubleshooting easier.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;What should I check when Data Guard lag increases?&lt;/h3&gt;
&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Check redo generation rate, transport lag, apply lag, archive gaps, standby redo log size, MRP status, network throughput, and standby I/O performance.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Is PostgreSQL WAL tuning the same as Oracle redo tuning?&lt;/h3&gt;
&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The recovery concept is similar, but the controls are different. Oracle DBAs manage redo log groups and switch frequency. PostgreSQL DBAs usually manage WAL pressure through checkpoints, archiving, replication slots, and workload design.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Redo log sizing is not a cosmetic database setting. It affects commit performance, checkpoint behaviour, archiving, recovery, and Data Guard stability. If redo logs are too small, the database may spend too much time switching and checkpointing. If they are sized without considering recovery objectives, the design may not match operational expectations.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The best approach is simple: measure first, change later. Start with log switch frequency, then calculate redo generation rate during peak workload. Review &lt;code style=&quot;font-family: courier;&quot;&gt;V$INSTANCE_RECOVERY&lt;/code&gt;, wait events, archive destinations, and Data Guard lag. After that, look at the application side. Index count, batch logic, commit frequency, and unnecessary updates often explain more than redo log size alone.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For Oracle DBAs, redo tuning is a mix of database configuration and workload discipline. For PostgreSQL DBAs, WAL pressure tells a similar story with different knobs. In both cases, the write path exposes the truth. Review it before the next batch window, migration, or month-end run exposes it for you.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig-k9kHKb3w3uGS7yQJpJxneFjCVZo-msi_ArXhc_5Owo3oD0fSt63T6clp7RO-RNEikAWIXAC14Wwnir8wzaBU-uYAFg4QvuMe5lYPPof7tX7psLQt_n_TZy_2OaNQZdlWrrL7pHdKhDzG9K15qRyC_MeiR3bOY9y60fkI7JGbRBO1uXYsSAhvWPN0f8/s1672/3.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;941&quot; data-original-width=&quot;1672&quot; height=&quot;424&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig-k9kHKb3w3uGS7yQJpJxneFjCVZo-msi_ArXhc_5Owo3oD0fSt63T6clp7RO-RNEikAWIXAC14Wwnir8wzaBU-uYAFg4QvuMe5lYPPof7tX7psLQt_n_TZy_2OaNQZdlWrrL7pHdKhDzG9K15qRyC_MeiR3bOY9y60fkI7JGbRBO1uXYsSAhvWPN0f8/w754-h424/3.png&quot; width=&quot;754&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;&lt;b&gt;Sources :&lt;/b&gt; &lt;/span&gt;&lt;a href=&quot; https://docs.oracle.com/en/database/oracle/oracle-database/26/tdppt/redo-log-size.html&quot; style=&quot;font-weight: normal;&quot; target=&quot;_blank&quot;&gt;Oracle Docs&lt;/a&gt;&lt;span style=&quot;color: #e06666; font-weight: normal;&quot;&gt;&amp;nbsp; /&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://asktom.oracle.com/ords/asktom.search?tag=redo-log-switches-200106&quot; style=&quot;font-weight: normal;&quot; target=&quot;_blank&quot;&gt;AskTom&lt;/a&gt;&lt;/p&gt;
</description><link>https://oracle-dba-help.blogspot.com/2026/09/oracle-redo-logs-sizing-without.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH9F4Mp-grgbVjGoI8jxdKfA9TRMrNsKMFVl731_BcPxCBYAXmPmuKVcNoucrwuTOufgR-TE72wd8gs4nJEtLjYkf7ZM5ia6kcRgONmwx4IQgBAqulHlNoKk0k3ROwdxtGdJ2FezCYFcXbHpiHW-d0s1I6fA_1zjL1T4gOxd3dLOPTuGtikNDTT-B90Ms/s72-w613-h434-c/nikhilk.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-9142708546864832186</guid><pubDate>Sat, 08 Aug 2026 12:16:00 +0000</pubDate><atom:updated>2026-08-21T12:50:11.956+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">26ai</category><category domain="http://www.blogger.com/atom/ns#">Core DBA</category><category domain="http://www.blogger.com/atom/ns#">Tuning</category><title>Oracle 26ai AWR Enhancements for DBAs</title><description>&lt;p&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&amp;nbsp;AWR used to be simple when most databases were single-instance, single-tenant, and all important workload stayed on the primary database.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;1992&quot; data-start=&quot;1966&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;That world is mostly gone.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;2285&quot; data-start=&quot;1994&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Today, one CDB may host multiple PDBs. Reporting may run on Active Data Guard. Read traffic may be pushed toward True Cache. Replication may be handled through GoldenGate or XStream. When performance breaks, the first question is no longer just “what was the top wait event on the database?”&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;
&lt;p data-end=&quot;2310&quot; data-start=&quot;2287&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;2310&quot; data-start=&quot;2287&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The better question is:&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;2409&quot; data-start=&quot;2312&quot;&gt;&lt;span data-end=&quot;2409&quot; data-start=&quot;2312&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Which container, which workload, which replica, and which component actually caused the pain?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;2618&quot; data-start=&quot;2411&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;That is where the Oracle 26ai AWR enhancements become useful. They do not magically tune the database, but they reduce one common DBA problem: missing diagnostic data from the place where the issue happened.&lt;/span&gt;&lt;/p&gt;
&lt;h2 data-end=&quot;2652&quot; data-section-id=&quot;1o5gfdd&quot; data-start=&quot;2625&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 data-end=&quot;2652&quot; data-section-id=&quot;1o5gfdd&quot; data-start=&quot;2625&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;Why AWR Needed to Change&lt;/span&gt;&lt;/h2&gt;
&lt;p data-end=&quot;2834&quot; data-start=&quot;2654&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;In older environments, AWR was often treated as a primary database diagnostic tool. You generated the report, checked DB Time, top SQL, wait events, IO stats, and moved from there.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;2900&quot; data-start=&quot;2836&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;That worked reasonably well when the primary handled everything.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;3334&quot; data-start=&quot;2902&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;But in multitenant and offloaded architectures, this approach creates blind spots. A PDB can suffer from poor SQL while the CDB-level report looks acceptable. A standby can be overloaded by reporting queries while the primary AWR shows nothing unusual. Replication can lag because of apply-side SQL, disk latency, or memory pressure, but the normal AWR report may not clearly separate replication workload from application workload.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;3534&quot; data-start=&quot;3336&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Oracle has started closing these gaps by making AWR more aligned with real deployment patterns: PDB-level diagnostics, ADG standby snapshots, True Cache visibility, and replication-focused sections.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;3783&quot; data-start=&quot;3536&quot;&gt;&lt;/p&gt;
&lt;h2 data-end=&quot;3836&quot; data-section-id=&quot;1x4vzqy&quot; data-start=&quot;3790&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigmzM9e_NiE_c0d6B0ZXlA7u2OmD6o1Ahrzb3aDfv0SAkhj-9Agc7GCeFRd9QZw0LXNa2XBdQpvB9myAx8ARamwq9uj8k0oOnAbe64z6H093BHa1idIU2c5JkZw3vfunr679iTvWyPLVZwIPMdMhnQrPbnSqslKFjx-qJZcznM04IkUogqUYOpvsvOADI/s1672/ChatGPT%20Image%20May%2024,%202026,%2008_35_20%20PM.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;941&quot; data-original-width=&quot;1672&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigmzM9e_NiE_c0d6B0ZXlA7u2OmD6o1Ahrzb3aDfv0SAkhj-9Agc7GCeFRd9QZw0LXNa2XBdQpvB9myAx8ARamwq9uj8k0oOnAbe64z6H093BHa1idIU2c5JkZw3vfunr679iTvWyPLVZwIPMdMhnQrPbnSqslKFjx-qJZcznM04IkUogqUYOpvsvOADI/w640-h360/ChatGPT%20Image%20May%2024,%202026,%2008_35_20%20PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/h2&gt;&lt;div&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h2 data-end=&quot;3836&quot; data-section-id=&quot;1x4vzqy&quot; data-start=&quot;3790&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;Oracle 26ai AWR Enhancements in Multitenant&lt;/span&gt;&lt;/h2&gt;
&lt;p data-end=&quot;3910&quot; data-start=&quot;3838&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The most useful change for many DBAs is around PDB-level AWR collection.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;4254&quot; data-start=&quot;3912&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Oracle documentation states that &lt;code data-end=&quot;3972&quot; data-start=&quot;3945&quot;&gt;AWR_PDB_AUTOFLUSH_ENABLED&lt;/code&gt; has a default value of &lt;code data-end=&quot;4002&quot; data-start=&quot;3996&quot;&gt;TRUE&lt;/code&gt;, which means automatic AWR snapshots are enabled by default for all PDBs in a CDB. Oracle also documents that automatic snapshot operations are enabled by default for a CDB and, in Oracle Database 26ai, for a PDB. &lt;span data-state=&quot;closed&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;4304&quot; data-start=&quot;4256&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;That sounds small, but operationally it matters.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;4579&quot; data-start=&quot;4306&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Earlier, a DBA could troubleshoot a PDB performance issue only to realize that PDB-level AWR was never enabled. The incident would then move into guesswork: ASH if available, SQL monitor if still present, application timestamps, OS metrics, and whatever was left in memory.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;4654&quot; data-start=&quot;4581&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Now the expectation is different. PDBs are first-class performance units.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;4670&quot; data-start=&quot;4656&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Useful checks:&lt;/span&gt;&lt;/p&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;show&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; con_name&lt;/span&gt;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; name, value&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; v$parameter&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;where&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; name &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #bd93f9;&quot;&gt;&#39;awr_pdb_autoflush_enabled&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; snap_id, dbid, instance_number, begin_interval_time, end_interval_time&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; dba_hist_snapshot&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;order&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;by&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; snap_id &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;desc&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;fetch&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;first&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ffb86c;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;rows&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;only&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;4925&quot; data-start=&quot;4672&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;4999&quot; data-start=&quot;4927&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;For a specific PDB, connect into the PDB and validate snapshot behavior:&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;5179&quot; data-start=&quot;5001&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;blockquote style=&quot;border-color: currentcolor; border-image: none; border-style: none; border-width: medium; border: none; margin: 0px 0px 0px 40px; padding: 0px;&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;5179&quot; data-start=&quot;5001&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot; style=&quot;text-align: left;&quot;&gt;&lt;code&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span class=&quot;ͼg&quot;&gt;alter&lt;/span&gt; &lt;span class=&quot;ͼg&quot;&gt;session&lt;/span&gt; &lt;span class=&quot;ͼg&quot;&gt;set&lt;/span&gt; container &lt;span class=&quot;ͼg&quot;&gt;=&lt;/span&gt; SALES_PDB;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;5179&quot; data-start=&quot;5001&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;code&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; snap_id, begin_interval_time, end_interval_time&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; dba_hist_snapshot&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;order&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;by&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; snap_id &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;desc&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;fetch&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;first&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ffb86c;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;rows&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;only&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p data-end=&quot;5455&quot; data-start=&quot;5181&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;5455&quot; data-start=&quot;5181&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The production impact is clear: when one PDB is noisy, you do not want to diagnose only from the CDB root. Consolidated environments hide problems. A batch job in one PDB can create IO pressure, CPU starvation, library cache pressure, or temp usage that hurts other tenants.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;5671&quot; data-start=&quot;5457&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;The trade-off is also real. More snapshots mean more diagnostic data. More diagnostic data means more SYSAUX usage. DBAs should monitor retention and space growth instead of assuming&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;default-enabled&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;&amp;nbsp;means&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;free.&quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; occupant_name, space_usage_kbytes&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #ffb86c;&quot;&gt;1024&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; mb&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; v$sysaux_occupants&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;where&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; occupant_name &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;like&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #bd93f9;&quot;&gt;&#39;%AWR%&#39;&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;order&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;by&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; space_usage_kbytes &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;desc&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;fetch&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;first&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ffb86c;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;rows&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;only&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;5823&quot; data-start=&quot;5673&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;6044&quot; data-start=&quot;5825&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOgqpnRrggYhDq5JT78-NlhEJcln15EIXRObGPiszUQk4scDJHaBAVsIpsbbU6aDjHttJYDduG7RsOjzdKrZ7mF6QG4N-kNrmhbfwvdteA87vnt9c5Am6m4RRUdOhiKhgRSaC7RZsoww58mrSmNl1RSuEDp43gS4CnRGd165iJyvimTuRLd6I_EDvA8Po/s1672/ChatGPT%20Image%20May%2024,%202026,%2008_36_44%20PM.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;941&quot; data-original-width=&quot;1672&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOgqpnRrggYhDq5JT78-NlhEJcln15EIXRObGPiszUQk4scDJHaBAVsIpsbbU6aDjHttJYDduG7RsOjzdKrZ7mF6QG4N-kNrmhbfwvdteA87vnt9c5Am6m4RRUdOhiKhgRSaC7RZsoww58mrSmNl1RSuEDp43gS4CnRGd165iJyvimTuRLd6I_EDvA8Po/w640-h360/ChatGPT%20Image%20May%2024,%202026,%2008_36_44%20PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p data-end=&quot;6044&quot; data-start=&quot;5825&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 data-end=&quot;6123&quot; data-section-id=&quot;6agqz5&quot; data-start=&quot;6051&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;Active Data Guard AWR: Finally Closer to Real Standby Troubleshooting&lt;/span&gt;&lt;/h2&gt;
&lt;p data-end=&quot;6316&quot; data-start=&quot;6125&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Active Data Guard is often sold as a way to offload read workload. In reality, many standby systems slowly become reporting platforms, ETL sources, dashboard backends, and ad-hoc query zones.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;6388&quot; data-start=&quot;6318&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;Then someone says: &quot;The query is slow on standby but fast on primary.&quot;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;;&quot;&gt;That is where DBAs need standby-side evidence.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;6870&quot; data-start=&quot;6438&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Oracle AI Database 26ai documents AWR for Active Data Guard with automatic snapshots at CDB root and all PDBs, and Oracle states it is enabled by default for Active Data Guard in 26ai. &lt;span data-state=&quot;closed&quot;&gt;&lt;/span&gt; Oracle’s observability blog also describes 26ai as delivering out-of-the-box AWR for ADG standby workloads, reducing older operational overhead around standby diagnostics. &lt;span data-state=&quot;closed&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;6978&quot; data-start=&quot;6872&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;This helps because standby performance problems are not always SQL tuning problems. Common causes include:&lt;/span&gt;&lt;/p&gt;
&lt;ul data-end=&quot;7178&quot; data-start=&quot;6980&quot;&gt;
&lt;li data-end=&quot;7025&quot; data-section-id=&quot;6wcku8&quot; data-start=&quot;6980&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
redo apply competing with reporting queries
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;7054&quot; data-section-id=&quot;6zkban&quot; data-start=&quot;7026&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
storage latency on standby
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;7094&quot; data-section-id=&quot;16jxrnc&quot; data-start=&quot;7055&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
stale or different optimizer behavior
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;7119&quot; data-section-id=&quot;2kah8&quot; data-start=&quot;7095&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
read consistency waits
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;7144&quot; data-section-id=&quot;ltdu4s&quot; data-start=&quot;7120&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
heavy parallel queries
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;7178&quot; data-section-id=&quot;1v97ng8&quot; data-start=&quot;7145&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
lag-sensitive application reads
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-end=&quot;7202&quot; data-start=&quot;7180&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Useful standby checks:&lt;/span&gt;&lt;/p&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; database_role, open_mode&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; v$database;&lt;/span&gt;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; name, value, unit&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; v$dataguard_stats&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;where&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; name &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color: #bd93f9;&quot;&gt;&#39;transport lag&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #bd93f9;&quot;&gt;&#39;apply lag&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;);&lt;/span&gt;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; process, status, thread&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;, sequence&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;#&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; v$managed_standby&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;order&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;by&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; process;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;7442&quot; data-start=&quot;7204&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;7705&quot; data-start=&quot;7444&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;AWR on standby gives DBAs a cleaner way to separate “bad SQL” from “standby workload pressure.” That distinction matters. Tuning the SQL may help, but if redo apply is blocked by IO or CPU saturation, the real fix is capacity, workload isolation, or scheduling.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;7958&quot; data-start=&quot;7707&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIejWKzhY5YJTEabVPU0sgMKECy4AtZvB0Q68wUgm-SeJgkgm5TS35AM0UtdkXpHpBmPcorKuJ5r19MKPELdcxS8QL-luqPrQJi1jd0pmzmu2sbtNkQXwjrUSkH4BA8oVUTJLHJbcY1nv8_Jtd5E8gpQ4kjdoNPX9smWmDfiNohLt_hlYbIMPuL6SWjNI/s1672/ChatGPT%20Image%20May%2024,%202026,%2008_40_23%20PM.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;941&quot; data-original-width=&quot;1672&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIejWKzhY5YJTEabVPU0sgMKECy4AtZvB0Q68wUgm-SeJgkgm5TS35AM0UtdkXpHpBmPcorKuJ5r19MKPELdcxS8QL-luqPrQJi1jd0pmzmu2sbtNkQXwjrUSkH4BA8oVUTJLHJbcY1nv8_Jtd5E8gpQ4kjdoNPX9smWmDfiNohLt_hlYbIMPuL6SWjNI/w640-h360/ChatGPT%20Image%20May%2024,%202026,%2008_40_23%20PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;
&lt;h2 data-end=&quot;8030&quot; data-section-id=&quot;1qo611p&quot; data-start=&quot;7965&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 data-end=&quot;8030&quot; data-section-id=&quot;1qo611p&quot; data-start=&quot;7965&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;True Cache Monitoring: Useful, But Do Not Treat Cache as Magic&lt;/span&gt;&lt;/h2&gt;
&lt;p data-end=&quot;8359&quot; data-start=&quot;8032&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Oracle True Cache is designed as an in-memory, consistent cache for Oracle Database workloads, helping offload read activity from the primary database. Oracle introduced True Cache with Oracle Database 23ai, and Oracle’s current True Cache guide is published under Oracle AI Database 26ai. &lt;span data-state=&quot;closed&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;8603&quot; data-start=&quot;8361&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;AWR support for True Cache is useful because cache layers are often dangerous when they become invisible. If the application says “database is slow,” the real issue may be cache miss behavior, routing, memory pressure, or fallback to primary.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;8690&quot; data-start=&quot;8605&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;A DBA should not only ask whether True Cache is configured. The better questions are:&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;8886&quot; data-start=&quot;8692&quot;&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Is the cache actually serving the workload?&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
Is the application falling back to primary too often?&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
Is memory sized correctly?&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
Are read-mostly SQL patterns really suitable for cache offload?&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;
&lt;p data-end=&quot;8920&quot; data-start=&quot;8888&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Useful direction for monitoring:&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;8965&quot; data-start=&quot;8922&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;blockquote style=&quot;border-color: currentcolor; border-image: none; border-style: none; border-width: medium; border: none; margin: 0px 0px 0px 40px; padding: 0px;&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;8965&quot; data-start=&quot;8922&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot; style=&quot;text-align: left;&quot;&gt;&lt;code&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;&lt;span class=&quot;ͼg&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;ͼg&quot;&gt;* &lt;/span&gt;&lt;span class=&quot;ͼg&quot;&gt;from&lt;/span&gt; v$true_cache_stat;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;8965&quot; data-start=&quot;8922&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;9151&quot; data-start=&quot;8967&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The exact columns and usefulness will depend on version and RU level, so DBAs should validate against their installed Oracle documentation and not blindly copy scripts between estates.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;9446&quot; data-start=&quot;9153&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The operational warning is simple: cache reduces pressure only when the workload matches the design. If the application sends mixed read-write behavior, uses session-specific logic heavily, or frequently misses cache, True Cache may add another diagnostic layer instead of reducing complexity.&lt;/span&gt;&lt;/p&gt;
&lt;br /&gt;&lt;h2 data-end=&quot;9743&quot; data-section-id=&quot;1gcee7n&quot; data-start=&quot;9673&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Replication Reporting: Better Visibility for GoldenGate and XStream&lt;/span&gt;&lt;/h2&gt;
&lt;p data-end=&quot;9801&quot; data-start=&quot;9745&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Replication problems are rarely explained by one metric.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;10060&quot; data-start=&quot;9803&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;GoldenGate lag may be caused by extract, pump, network, trail file IO, replicat apply SQL, locking, missing indexes, or target-side resource pressure. Traditional database AWR may show waits, but not always in a way that clearly tells the replication story.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;10336&quot; data-start=&quot;10062&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Oracle GoldenGate documentation for 26ai describes AWR report sections for replication, including Replication Top Wait Events, with foreground and background process wait events aggregated by event type and Oracle GoldenGate SQL module. &lt;span data-state=&quot;closed&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;10667&quot; data-start=&quot;10338&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;That is useful because replication workload should not be mixed blindly with application workload. A top SQL statement from Replicat has a different operational meaning from an application SQL_ID. One may require target index tuning. Another may require application tuning. Another may require changing batch size or parallelism.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;10697&quot; data-start=&quot;10669&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Typical checks still matter:&lt;/span&gt;&lt;/p&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; event, total_waits, time_waited&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; v$system_event&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;where&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; event &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;like&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #bd93f9;&quot;&gt;&#39;%GoldenGate%&#39;&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;or&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; event &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;like&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #bd93f9;&quot;&gt;&#39;%Streams%&#39;&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;order&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;by&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; time_waited &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;desc&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;10856&quot; data-start=&quot;10699&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;For database-side replication sessions:&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; sid, &lt;/span&gt;&lt;span style=&quot;color: #8be9fd; font-style: italic;&quot;&gt;serial&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;, program, module, event, wait_class, seconds_in_wait&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; v$session&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;where&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; program &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;like&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #bd93f9;&quot;&gt;&#39;%replicat%&#39;&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;or&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; program &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;like&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #bd93f9;&quot;&gt;&#39;%extract%&#39;&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;or&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; module &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;like&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #bd93f9;&quot;&gt;&#39;%GoldenGate%&#39;&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;order&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;by&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; seconds_in_wait &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;desc&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;11124&quot; data-start=&quot;10899&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;11308&quot; data-start=&quot;11126&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;AWR does not replace GoldenGate commands or Microservices UI. It complements them. DBAs still need to check trail files, checkpoints, lag, discard files, and target-side constraints.&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;11526&quot; data-start=&quot;11310&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 data-end=&quot;11575&quot; data-section-id=&quot;7co76v&quot; data-start=&quot;11533&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;New Diagnostic Views DBAs Should Notice&lt;/span&gt;&lt;/h2&gt;
&lt;p data-end=&quot;11678&quot; data-start=&quot;11577&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Oracle 26ai also adds or highlights diagnostic views that help DBAs go deeper during troubleshooting.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;11865&quot; data-start=&quot;11680&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;code data-end=&quot;11707&quot; data-start=&quot;11680&quot;&gt;DBA_HIST_SNAPSHOT_DETAILS&lt;/code&gt; displays table details for snapshots in the Workload Repository and is available starting with Oracle AI Database 26ai. &lt;span data-state=&quot;closed&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;12049&quot; data-start=&quot;11867&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;code data-end=&quot;11882&quot; data-start=&quot;11867&quot;&gt;V$SQL_HISTORY&lt;/code&gt; displays SQL statements tracked by SQL history monitoring, but it is populated only when &lt;code data-end=&quot;11993&quot; data-start=&quot;11972&quot;&gt;SQL_HISTORY_ENABLED&lt;/code&gt; is set to &lt;code data-end=&quot;12010&quot; data-start=&quot;12004&quot;&gt;TRUE&lt;/code&gt;. &lt;span data-state=&quot;closed&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;12059&quot; data-start=&quot;12051&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Example:&lt;/span&gt;&lt;/p&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; sql_id, elapsed_time, cpu_time, rows_processed&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; v$sql_history&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;order&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;by&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; elapsed_time &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;desc&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;fetch&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;first&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ffb86c;&quot;&gt;20&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;rows&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;only&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;12197&quot; data-start=&quot;12061&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;For optimizer environment investigations:&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; name, value&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; dba_hist_optimizer_env_details&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;where&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; optimizer_env_hash_value &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; :hash_value&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;order&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;by&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; name;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;12367&quot; data-start=&quot;12242&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;12583&quot; data-start=&quot;12369&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;These views are not a replacement for ASH, SQL Monitor, trace files, or execution plan history. But they give DBAs more breadcrumbs, especially when the problem has already passed and nobody captured live evidence.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;12720&quot; data-start=&quot;12585&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The limitation is retention and configuration. If SQL history is not enabled, or AWR retention is too short, you still lose visibility.&lt;/span&gt;&lt;/p&gt;

&lt;h2 data-end=&quot;12965&quot; data-section-id=&quot;hrs9az&quot; data-start=&quot;12934&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 data-end=&quot;12965&quot; data-section-id=&quot;hrs9az&quot; data-start=&quot;12934&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;Production Failure Scenarios&lt;/span&gt;&lt;/h2&gt;
&lt;h3 data-end=&quot;13009&quot; data-section-id=&quot;oefry&quot; data-start=&quot;12967&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Scenario 1: Slow Report on ADG Standby&lt;/span&gt;&lt;/h3&gt;
&lt;p data-end=&quot;13133&quot; data-start=&quot;13011&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;A reporting query runs in 3 minutes on primary but takes 25 minutes on standby. The application team blames the optimizer.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;13315&quot; data-start=&quot;13135&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;AWR on standby shows high IO waits and redo apply pressure during the same window. Data Guard stats show apply lag increasing. The SQL is not perfect, but it is not the only issue.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;13469&quot; data-start=&quot;13317&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Fix may involve moving the report window, limiting parallelism, tuning standby storage, or separating heavy reporting from redo apply-sensitive periods.&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;13469&quot; data-start=&quot;13317&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 data-end=&quot;13517&quot; data-section-id=&quot;o7b5os&quot; data-start=&quot;13471&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Scenario 2: One PDB Creates CDB-Wide Noise&lt;/span&gt;&lt;/h3&gt;
&lt;p data-end=&quot;13675&quot; data-start=&quot;13519&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;CPU spikes at CDB level, but the business impact is reported only by one application. PDB-level AWR shows a batch SQL consuming most DB time inside one PDB.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;13787&quot; data-start=&quot;13677&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Without PDB snapshots, the DBA may chase system-wide symptoms. With PDB AWR, the noisy tenant becomes visible.&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;13787&quot; data-start=&quot;13677&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 data-end=&quot;13842&quot; data-section-id=&quot;ho2xhw&quot; data-start=&quot;13789&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Scenario 3: GoldenGate Lag Misread as Network Lag&lt;/span&gt;&lt;/h3&gt;
&lt;p data-end=&quot;13985&quot; data-start=&quot;13844&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Replication lag increases. Network team finds no issue. AWR replication section shows Replicat-related wait events and top SQL on the target.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;14049&quot; data-start=&quot;13987&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Root cause: missing index on target table after schema change.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;14141&quot; data-start=&quot;14051&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Fix: create the required index, validate Replicat apply rate, and add schema drift checks.&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;14141&quot; data-start=&quot;14051&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 data-end=&quot;14198&quot; data-section-id=&quot;9kifdq&quot; data-start=&quot;14143&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Scenario 4: True Cache Does Not Reduce Primary Load&lt;/span&gt;&lt;/h3&gt;
&lt;p data-end=&quot;14291&quot; data-start=&quot;14200&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;A new True Cache deployment is expected to reduce primary reads. Primary load remains high.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;14499&quot; data-start=&quot;14293&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Cache monitoring shows many reads still going to primary due to routing and workload pattern mismatch. The fix is not “increase cache memory” blindly. The connection routing and SQL eligibility need review.&lt;/span&gt;&lt;/p&gt;

&lt;h2 data-end=&quot;14563&quot; data-section-id=&quot;1tpf387&quot; data-start=&quot;14506&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 data-end=&quot;14563&quot; data-section-id=&quot;1tpf387&quot; data-start=&quot;14506&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;Mini Case Study: The Standby Was Not Slow, It Was Busy&lt;/span&gt;&lt;/h2&gt;
&lt;p data-end=&quot;14741&quot; data-start=&quot;14565&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;A finance reporting workload was moved to an ADG standby to protect the primary OLTP system. For the first few weeks, everything looked fine. Then month-end processing started.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;14752&quot; data-start=&quot;14743&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Symptoms:&lt;/span&gt;&lt;/p&gt;
&lt;ul data-end=&quot;14862&quot; data-start=&quot;14754&quot;&gt;
&lt;li data-end=&quot;14774&quot; data-section-id=&quot;7ej9zf&quot; data-start=&quot;14754&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
reports timing out
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;14797&quot; data-section-id=&quot;do6x3r&quot; data-start=&quot;14775&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
apply lag increasing
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;14822&quot; data-section-id=&quot;4m3ei6&quot; data-start=&quot;14798&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
storage latency spikes
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;14862&quot; data-section-id=&quot;10thysq&quot; data-start=&quot;14823&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
no major issue visible in primary AWR
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-end=&quot;15085&quot; data-start=&quot;14864&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Initial assumption was bad SQL. But standby-side diagnostics showed that reporting queries and redo apply were fighting for the same IO bandwidth. A few parallel reports were consuming resources at exactly the wrong time.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;15091&quot; data-start=&quot;15087&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Fix:&lt;/span&gt;&lt;/p&gt;
&lt;ul data-end=&quot;15306&quot; data-start=&quot;15093&quot;&gt;
&lt;li data-end=&quot;15139&quot; data-section-id=&quot;2o6064&quot; data-start=&quot;15093&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
reduced parallel degree for selected reports
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;15199&quot; data-section-id=&quot;1qifthn&quot; data-start=&quot;15140&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
moved month-end report schedule away from peak redo apply
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;15255&quot; data-section-id=&quot;mj4kwb&quot; data-start=&quot;15200&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
added standby-specific AWR review after batch windows
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;15306&quot; data-section-id=&quot;1rbscmo&quot; data-start=&quot;15256&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
monitored apply lag and top standby SQL together
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-end=&quot;15315&quot; data-start=&quot;15308&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Lesson:&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;15468&quot; data-start=&quot;15317&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;A standby is not free capacity. It is a recovery system doing read workload. Treat it casually and it will remind you during the worst possible window.&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;15468&quot; data-start=&quot;15317&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 data-end=&quot;15490&quot; data-section-id=&quot;17zrkaf&quot; data-start=&quot;15475&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;DBA Insights&lt;/span&gt;&lt;/h2&gt;
&lt;p data-end=&quot;15599&quot; data-start=&quot;15492&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The biggest mistake DBAs make with AWR is treating it as a report generator instead of a diagnostic system.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;15751&quot; data-start=&quot;15601&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;AWR is only useful when snapshots exist at the right level, retention covers the incident window, and the DBA knows which workload they are analyzing.&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;15823&quot; data-start=&quot;15753&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;For Oracle 26ai AWR enhancements, I would watch these areas carefully:&lt;/span&gt;&lt;/p&gt;
&lt;ul data-end=&quot;16179&quot; data-start=&quot;15825&quot;&gt;
&lt;li data-end=&quot;15880&quot; data-section-id=&quot;wepg5n&quot; data-start=&quot;15825&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
SYSAUX growth after enabling more PDB-level snapshots
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;15936&quot; data-section-id=&quot;t69uw5&quot; data-start=&quot;15881&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
snapshot interval and retention standards across CDBs
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;16000&quot; data-section-id=&quot;12p6x0s&quot; data-start=&quot;15937&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
ADG standby AWR availability before moving reporting workload
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;16049&quot; data-section-id=&quot;z7iuch&quot; data-start=&quot;16001&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
Replicat SQL visibility during replication lag
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;16115&quot; data-section-id=&quot;1exabq6&quot; data-start=&quot;16050&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
True Cache hit behavior before claiming primary offload success
&lt;/span&gt;&lt;/li&gt;
&lt;li data-end=&quot;16179&quot; data-section-id=&quot;31idzh&quot; data-start=&quot;16116&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;
monitoring dashboards that still show only CDB-level averages
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-end=&quot;16327&quot; data-start=&quot;16181&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Averages are dangerous in multitenant systems. AWR becoming more PDB-aware is a good thing, but DBAs must update their troubleshooting habits too.&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;16327&quot; data-start=&quot;16181&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 data-end=&quot;17322&quot; data-section-id=&quot;1xvwnkw&quot; data-start=&quot;17315&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;FAQs&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-end=&quot;17379&quot; data-section-id=&quot;1al85ky&quot; data-start=&quot;17324&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Is PDB-level AWR enabled by default in Oracle 26ai?&lt;/span&gt;&lt;/h3&gt;&lt;p data-end=&quot;17560&quot; data-start=&quot;17381&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Yes. Oracle documentation states that &lt;code data-end=&quot;17446&quot; data-start=&quot;17419&quot;&gt;AWR_PDB_AUTOFLUSH_ENABLED&lt;/code&gt; defaults to &lt;code data-end=&quot;17465&quot; data-start=&quot;17459&quot;&gt;TRUE&lt;/code&gt;, enabling automatic AWR snapshots for PDBs by default. &lt;span data-state=&quot;closed&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 data-end=&quot;17609&quot; data-section-id=&quot;1hzlt3o&quot; data-start=&quot;17562&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Can I use AWR on Active Data Guard standby?&lt;/span&gt;&lt;/h3&gt;&lt;p data-end=&quot;17815&quot; data-start=&quot;17611&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Yes. Oracle 26ai supports automatic AWR snapshots for Active Data Guard at CDB root and PDB levels, and Oracle documents this as enabled by default for ADG in 26ai. &lt;span data-state=&quot;closed&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 data-end=&quot;17860&quot; data-section-id=&quot;1nl107w&quot; data-start=&quot;17817&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Does AWR replace GoldenGate monitoring?&lt;/span&gt;&lt;/h3&gt;&lt;p data-end=&quot;18066&quot; data-start=&quot;17862&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;No. AWR helps correlate database waits, SQL, and resource usage for replication workload. GoldenGate lag, trail files, checkpoints, discard files, and process health still need GoldenGate-side monitoring.&lt;/span&gt;&lt;/p&gt;&lt;h3 data-end=&quot;18129&quot; data-section-id=&quot;1dgsij1&quot; data-start=&quot;18068&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Should I increase AWR retention after these enhancements?&lt;/span&gt;&lt;/h3&gt;&lt;p data-end=&quot;18294&quot; data-start=&quot;18131&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Usually yes, but carefully. More PDB and standby snapshots can increase repository usage. Monitor SYSAUX and define retention based on your incident review window.&lt;/span&gt;&lt;/p&gt;&lt;h3 data-end=&quot;18346&quot; data-section-id=&quot;1mdcq1m&quot; data-start=&quot;18296&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Is True Cache always useful for read workload?&lt;/span&gt;&lt;/h3&gt;&lt;p data-end=&quot;18536&quot; data-start=&quot;18348&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;No. It helps when workload routing and SQL patterns fit the cache model. If the application frequently falls back to primary or uses unsuitable access patterns, the benefit may be limited.&lt;/span&gt;&lt;/p&gt;&lt;h2 data-end=&quot;18556&quot; data-section-id=&quot;8dtpi&quot; data-start=&quot;18543&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 data-end=&quot;18556&quot; data-section-id=&quot;8dtpi&quot; data-start=&quot;18543&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;Conclusion&lt;/span&gt;&lt;/h2&gt;&lt;p data-end=&quot;18724&quot; data-start=&quot;18558&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Oracle 26ai AWR enhancements make AWR more useful for how Oracle databases are actually deployed today: multitenant, replicated, standby-readable, and cache-assisted.&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;18792&quot; data-start=&quot;18726&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;For DBAs, the value is not just automation. The value is evidence.&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;19081&quot; data-start=&quot;18794&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;PDB-level snapshots help avoid CDB-level guesswork. ADG AWR helps troubleshoot where reporting queries really run. True Cache monitoring gives visibility into read offload behavior. Replication sections make GoldenGate and XStream workload easier to separate from normal application SQL.&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;19275&quot; data-start=&quot;19083&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;This is a strong improvement in Oracle’s diagnostic stack. But it still needs DBA discipline: validate snapshots, watch SYSAUX, review retention, and make sure monitoring follows the workload.&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;16327&quot; data-start=&quot;16181&quot;&gt;
















&lt;/p&gt;&lt;p data-end=&quot;19344&quot; data-start=&quot;19277&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;AWR is getting smarter. DBAs still need to ask the right questions.&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;19344&quot; data-start=&quot;19277&quot;&gt;&lt;br /&gt;&lt;/p&gt;</description><link>https://oracle-dba-help.blogspot.com/2026/08/oracle-26ai-awr-enhancements-for-dbas.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigmzM9e_NiE_c0d6B0ZXlA7u2OmD6o1Ahrzb3aDfv0SAkhj-9Agc7GCeFRd9QZw0LXNa2XBdQpvB9myAx8ARamwq9uj8k0oOnAbe64z6H093BHa1idIU2c5JkZw3vfunr679iTvWyPLVZwIPMdMhnQrPbnSqslKFjx-qJZcznM04IkUogqUYOpvsvOADI/s72-w640-h360-c/ChatGPT%20Image%20May%2024,%202026,%2008_35_20%20PM.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-422596091296947684</guid><pubDate>Sat, 25 Jul 2026 11:24:00 +0000</pubDate><atom:updated>2026-09-21T20:11:07.694+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">PostgreSQL</category><title>pg_switch_wal() in PostgreSQL: Small Command, Big Recovery Impact</title><description>&lt;p&gt;
&lt;/p&gt;&lt;h2 data-end=&quot;245&quot; data-section-id=&quot;13ax1s5&quot; data-start=&quot;230&quot;&gt;&lt;/h2&gt;&lt;p&gt;&lt;/p&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;/h1&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;A PostgreSQL database can look completely healthy until the day you try to restore it.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Backups are available. WAL archiving is enabled. The archive directory has files. Monitoring shows green. Then, during PITR, PostgreSQL throws something like:&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;code&gt;&lt;span style=&quot;color: #e06666; font-family: courier; font-size: large; font-weight: normal;&quot;&gt;could not locate required checkpoint record&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;or recovery stops before the target time because the WAL needed for that moment was never archived.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;This is where many DBAs learn an uncomfortable lesson: the WAL segment that contains the changes you need may still be sitting inside &lt;code data-end=&quot;796&quot; data-start=&quot;787&quot;&gt;pg_wal/&lt;/code&gt; as the active segment. It has not filled up yet, so the archiver has not copied it.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;On a busy system, WAL segments rotate quickly. On a quiet database, the same 16 MB segment may remain open for hours or even days.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;&lt;code data-end=&quot;1031&quot; data-start=&quot;1014&quot;&gt;&lt;br /&gt;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;&lt;code data-end=&quot;1031&quot; data-start=&quot;1014&quot;&gt;pg_switch_wal()&lt;/code&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;is the function that forces PostgreSQL to close the current WAL segment and move to the next one.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;It sounds simple. In recovery work, backup validation, and archive troubleshooting, it is extremely useful.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;550&quot; data-start=&quot;495&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;550&quot; data-start=&quot;495&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;



&lt;p data-end=&quot;1238&quot; data-start=&quot;1131&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;/h1&gt;&lt;h2 data-end=&quot;1284&quot; data-section-id=&quot;cgswuv&quot; data-start=&quot;1245&quot;&gt;&lt;span role=&quot;text&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;What &lt;code data-end=&quot;1270&quot; data-start=&quot;1253&quot;&gt;pg_switch_wal()&lt;/code&gt; Actually Does&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot; style=&quot;text-align: left;&quot;&gt;
&lt;/h1&gt;&lt;h3&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;PostgreSQL writes every change to the Write-Ahead Log before the actual data file change is considered safe. WAL is split into segment files, normally 16 MB each, stored under &lt;code data-end=&quot;1471&quot; data-start=&quot;1462&quot;&gt;pg_wal/&lt;/code&gt;.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;A typical WAL file looks like this:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;000000010000000000000019&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;That filename contains:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal;&quot;&gt;Timeline ID &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal;&quot;&gt;Log ID &amp;amp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal;&quot;&gt;Segment number&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Normally, PostgreSQL closes a WAL segment only when it becomes full.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&amp;nbsp;When you execute:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;blockquote style=&quot;border-color: currentcolor; border-image: none; border-style: none; border-width: medium; border: none; margin: 0px 0px 0px 40px; padding: 0px;&quot;&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot; style=&quot;text-align: left;&quot;&gt;&lt;/h1&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;&lt;span class=&quot;ͼg&quot;&gt;SELECT&lt;/span&gt; pg_switch_wal();&lt;/span&gt;&lt;/code&gt;&lt;/h3&gt;&lt;/blockquote&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot; style=&quot;text-align: left;&quot;&gt;&lt;/h1&gt;&lt;h3&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;PostgreSQL forces the active WAL segment to finish early and starts writing into a new segment.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Operationally, this means:&lt;/span&gt;&lt;/span&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;code&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large; font-weight: normal;&quot;&gt;Current WAL segment is closed&lt;/span&gt;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large; font-weight: normal;&quot;&gt;Remaining space is padded&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large; font-weight: normal;&quot;&gt;Next WAL segment becomes active&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large; font-weight: normal;&quot;&gt;Closed segment becomes ready for archiving&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large; font-weight: normal;&quot;&gt;Function returns the LSN where the switch happened&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/h3&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;2063&quot; data-start=&quot;1870&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;2101&quot; data-start=&quot;2065&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The return value may look like this:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;0/2B7A9C0&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;2319&quot; data-start=&quot;2307&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large; font-weight: normal;&quot;&gt;That is the LSN where the WAL switch happened.&lt;br /&gt;&lt;br /&gt;0 = upper 32 bits of the byte position  &lt;br /&gt;2B7A9C0 = lower 32 bits in hexadecimal&lt;br /&gt;&lt;br /&gt;Converting: 0x2B7A9C0 = 45,590,976 bytes, approximately 43.5 MB into the WAL stream.&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;2361&quot; data-start=&quot;2321&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;2498&quot; data-start=&quot;2363&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;With a 16 MB WAL segment size, this position falls inside the second WAL segment of that timeline range. To identify the WAL file name:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;2547&quot; data-start=&quot;2500&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;blockquote style=&quot;border-color: currentcolor; border-image: none; border-style: none; border-width: medium; border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;2547&quot; data-start=&quot;2500&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot; style=&quot;text-align: left;&quot;&gt;&lt;code&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span class=&quot;ͼg&quot;&gt;SELECT&lt;/span&gt; pg_walfile_name(&lt;span class=&quot;ͼk&quot;&gt;&#39;0/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal; white-space: normal;&quot;&gt;2B7A9C0&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span class=&quot;ͼk&quot;&gt;&#39;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/h1&gt;&lt;/blockquote&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot; style=&quot;text-align: left;&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;2547&quot; data-start=&quot;2500&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;2600&quot; data-start=&quot;2549&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;That tells you which WAL segment contains that LSN.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;2817&quot; data-start=&quot;2602&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Small detail, but useful during recovery: the returned LSN is the switch location. The file containing that LSN is the segment that was active at the time of the switch and should now become available for archiving.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/h1&gt;&lt;h3 data-end=&quot;2833&quot; data-section-id=&quot;qnlk14&quot; data-start=&quot;2819&quot;&gt;&lt;/h3&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;
&lt;/h1&gt;&lt;h2 data-end=&quot;3182&quot; data-section-id=&quot;l16dut&quot; data-start=&quot;3140&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirFqnHPtGhxg_y7-tfmeWUg-hSx7FGWujQ-Cb5TX6iPs6awZxddTecL8nRUmC0iI20xG2WdSogYb4Vv8JYCvATktDfH2euJ8mWEJQDwHZp-GQazV_pRakxLCnASCIeqxT9ZxMkZABJjY6ekPfFPjILcy0gdn45lKYNynv9ZWd3cvc_tkVwE4B4yV5J4LA/s1672/ChatGPT%20Image%20May%2024,%202026,%2007_27_00%20PM.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;941&quot; data-original-width=&quot;1672&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirFqnHPtGhxg_y7-tfmeWUg-hSx7FGWujQ-Cb5TX6iPs6awZxddTecL8nRUmC0iI20xG2WdSogYb4Vv8JYCvATktDfH2euJ8mWEJQDwHZp-GQazV_pRakxLCnASCIeqxT9ZxMkZABJjY6ekPfFPjILcy0gdn45lKYNynv9ZWd3cvc_tkVwE4B4yV5J4LA/w640-h360/ChatGPT%20Image%20May%2024,%202026,%2007_27_00%20PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 data-end=&quot;3182&quot; data-section-id=&quot;l16dut&quot; data-start=&quot;3140&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;Why DBAs Use It Before Recovery Testing&lt;/span&gt;&lt;/h2&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;
&lt;/h1&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The most practical use of &lt;code data-end=&quot;3227&quot; data-start=&quot;3210&quot;&gt;pg_switch_wal()&lt;/code&gt; is not academic. It is recovery safety.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Imagine this situation:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;10:00 - Base backup completed&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;10:15 - Application made important changes&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;10:20 - You want PITR to 10:15&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;But the database is quiet. The WAL segment containing the 10:15 changes is still open. It has not reached 16 MB. Since it is not complete, the archiver has not copied it yet.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Now your archive location looks fine, but recovery does not have the WAL required to reach 10:15.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Before running PITR tests or relying on a precise recovery target, force a WAL switch:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;&lt;span class=&quot;ͼg&quot;&gt;SELECT&lt;/span&gt; pg_switch_wal();&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Then check whether the segment arrived in the archive destination:&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;3409&quot; data-start=&quot;3294&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;3409&quot; data-start=&quot;3294&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;



&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;3808&quot; data-start=&quot;3774&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: medium; font-weight: normal;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;    archived_count,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;    last_archived_wal,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;    last_archived_time,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;    failed_count,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;    last_failed_wal,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;    last_failed_time&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; pg_stat_archiver;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;4045&quot; data-start=&quot;3878&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal;&quot;&gt;If &lt;/span&gt;&lt;code data-end=&quot;4069&quot; data-start=&quot;4050&quot; style=&quot;font-weight: normal;&quot;&gt;last_archived_wal&lt;/code&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal;&quot;&gt; does not move, do not trust your recovery setup yet.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/h1&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;A lot of backup checks only validate that a base backup exists. That is not enough. PostgreSQL recovery needs both the base backup and the required WAL chain.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Missing one WAL file can make an otherwise good backup useless.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;


&lt;h3 data-end=&quot;4363&quot; data-section-id=&quot;qnlk14&quot; data-start=&quot;4349&quot;&gt;&lt;/h3&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;
&lt;/h1&gt;&lt;h2 data-end=&quot;4685&quot; data-section-id=&quot;wshy5i&quot; data-start=&quot;4646&quot;&gt;&lt;span&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 data-end=&quot;4685&quot; data-section-id=&quot;wshy5i&quot; data-start=&quot;4646&quot;&gt;&lt;span&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;Using It to Validate Archive Command&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;
&lt;/h1&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;code data-end=&quot;4704&quot; data-start=&quot;4687&quot;&gt;pg_switch_wal()&lt;/code&gt; is also one of the fastest ways to test whether archiving is actually working.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;First check archive settings:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;SHOW archive_mode;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;SHOW archive_command;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Then force a WAL switch:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;&lt;span class=&quot;ͼg&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;SELECT&lt;/span&gt; pg_switch_wal();&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Now check archiver status:&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;4867&quot; data-start=&quot;4816&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;4867&quot; data-start=&quot;4816&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;4929&quot; data-start=&quot;4895&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/h1&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;4929&quot; data-start=&quot;4895&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: small; font-weight: normal;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;    archived_count,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;    last_archived_wal,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;    last_archived_time,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;    failed_count,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;    last_failed_wal,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;    last_failed_time&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; pg_stat_archiver;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;5126&quot; data-start=&quot;4959&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;5174&quot; data-start=&quot;5128&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;On the OS side, check the archive destination:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;5216&quot; data-start=&quot;5176&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/h1&gt;&lt;blockquote style=&quot;border-color: currentcolor; border-image: none; border-style: none; border-width: medium; border: none; margin: 0px 0px 0px 40px; padding: 0px;&quot;&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;5216&quot; data-start=&quot;5176&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot; style=&quot;text-align: left;&quot;&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;&lt;span class=&quot;ͼl&quot;&gt;ls&lt;/span&gt; &lt;span class=&quot;ͼn&quot;&gt;-ltr&lt;/span&gt; /app/postgres/arch/&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/h1&gt;&lt;/blockquote&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;5216&quot; data-start=&quot;5176&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;5290&quot; data-start=&quot;5218&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;If the archive command is correct, a new WAL file should appear shortly.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/h1&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;If not, check PostgreSQL logs. Most archive failures are boring but painful:&lt;/span&gt;&lt;/span&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Permission denied&lt;/span&gt;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Destination full&lt;/span&gt;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Wrong path&lt;/span&gt;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;NFS stale mount&lt;/span&gt;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;archive_command returns non-zero exit code&lt;/span&gt;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;File already exists&lt;/span&gt;&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;A bad archive command can sit unnoticed for a long time if nobody monitors &lt;code data-end=&quot;5597&quot; data-start=&quot;5583&quot;&gt;failed_count&lt;/code&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;This is a common DBA blind spot. People monitor database availability, replication lag, and CPU. But archiver failures are often discovered only during restore.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;That is too late.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;5506&quot; data-start=&quot;5370&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;



&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh875NHXefOrp61FraJz_yPtkNIQ50wFaOkI7mnjwAfwnMFpa1e1eWEAotgj3orfIj76tT3DdXWHj7UbNVPdrUUfORadmsJv5D_e-0livyNi6XI1SvcovH_lgFCGG8L28Os-skQxzrPSRweWmrmXz9Seq09yT2Uaf-QaH95SAnij3dsqhggsYpDWlguesI/s1448/ChatGPT%20Image%20May%2024,%202026,%2007_50_57%20PM.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1086&quot; data-original-width=&quot;1448&quot; height=&quot;480&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh875NHXefOrp61FraJz_yPtkNIQ50wFaOkI7mnjwAfwnMFpa1e1eWEAotgj3orfIj76tT3DdXWHj7UbNVPdrUUfORadmsJv5D_e-0livyNi6XI1SvcovH_lgFCGG8L28Os-skQxzrPSRweWmrmXz9Seq09yT2Uaf-QaH95SAnij3dsqhggsYpDWlguesI/w640-h480/ChatGPT%20Image%20May%2024,%202026,%2007_50_57%20PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;h3 data-end=&quot;5795&quot; data-section-id=&quot;qnlk14&quot; data-start=&quot;5781&quot;&gt;&lt;br /&gt;&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;6084&quot; data-start=&quot;6018&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;/h1&gt;&lt;h2 data-end=&quot;6133&quot; data-section-id=&quot;1bsfgyl&quot; data-start=&quot;6091&quot;&gt;&lt;span&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;The No-Op Behavior That Confuses People&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;
&lt;/h1&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;There is one nuance DBAs should remember.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;code data-end=&quot;6195&quot; data-start=&quot;6178&quot; style=&quot;font-weight: normal;&quot;&gt;pg_switch_wal()&lt;/code&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal;&quot;&gt; may do nothing if no WAL has been generated since the last switch.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;So if you run this twice:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;&lt;span class=&quot;ͼg&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;SELECT&lt;/span&gt; pg_switch_wal();&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;&lt;span class=&quot;ͼg&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;SELECT&lt;/span&gt; pg_switch_wal();&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;the second call may return the same or nearly same LSN. That does not mean PostgreSQL is broken. It means there was nothing new to switch.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal;&quot;&gt;To force WAL activity, generate some WAL first.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;For example:&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;6349&quot; data-start=&quot;6291&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;6349&quot; data-start=&quot;6291&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;

&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;TABLE&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; wal_test_tmp(id &lt;/span&gt;&lt;span style=&quot;color: #8be9fd; font-style: italic;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;);&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;DROP&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;TABLE&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; wal_test_tmp;&lt;/span&gt;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; pg_switch_wal();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;6649&quot; data-start=&quot;6554&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Or, depending on the test:&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;6725&quot; data-start=&quot;6679&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/h1&gt;&lt;blockquote style=&quot;border-color: currentcolor; border-image: initial; border-style: none; border-width: medium; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;6725&quot; data-start=&quot;6679&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;CHECKPOINT; &lt;/span&gt;&lt;/code&gt;&lt;span class=&quot;ͼg&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;font-family: courier; font-weight: normal;&quot;&gt; pg_switch_wal();&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/h1&gt;&lt;/blockquote&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;6725&quot; data-start=&quot;6679&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;7018&quot; data-start=&quot;6727&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Be careful with unnecessary forced switches on busy systems. Every switch creates a new WAL segment for archiving. If someone puts this into a frequent cron job without thinking, archive volume can increase, storage can fill faster, and backup systems may process more WAL files than needed.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;7056&quot; data-start=&quot;7020&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Useful command. Bad habit if abused.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;7056&quot; data-start=&quot;7020&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyLG03ts9OJINbByo3vDUZbYeYfkBnTBm_z2jjk4rYDqGe1tDufJ69Iel0UXapbZZ6QyJ1zptiEOs-zvC5J-q0S8xcJwFfY9Za0PF5KmdstFJS6kt8Q_MOzphYY1qdW6FAUv9Jud5esW7elulRoWAvujR4tJYR3IrlSuzoAuJ5NmFgrTLlgFvdyWwsRLs/s1448/ChatGPT%20Image%20May%2024,%202026,%2007_41_56%20PM.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1086&quot; data-original-width=&quot;1448&quot; height=&quot;480&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyLG03ts9OJINbByo3vDUZbYeYfkBnTBm_z2jjk4rYDqGe1tDufJ69Iel0UXapbZZ6QyJ1zptiEOs-zvC5J-q0S8xcJwFfY9Za0PF5KmdstFJS6kt8Q_MOzphYY1qdW6FAUv9Jud5esW7elulRoWAvujR4tJYR3IrlSuzoAuJ5NmFgrTLlgFvdyWwsRLs/w640-h480/ChatGPT%20Image%20May%2024,%202026,%2007_41_56%20PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p data-end=&quot;7056&quot; data-start=&quot;7020&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/h1&gt;&lt;h3 data-end=&quot;7072&quot; data-section-id=&quot;qnlk14&quot; data-start=&quot;7058&quot;&gt;&lt;/h3&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;
&lt;/h1&gt;&lt;h2 data-end=&quot;7272&quot; data-section-id=&quot;hrs9az&quot; data-start=&quot;7241&quot;&gt;&lt;span&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;Production Failure Scenarios&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-end=&quot;7317&quot; data-section-id=&quot;coamco&quot; data-start=&quot;7274&quot;&gt;&lt;span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;1. PITR Fails Even Though Backup Exists&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;

&lt;p data-end=&quot;7328&quot; data-start=&quot;7319&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Symptoms:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;7461&quot; data-start=&quot;7330&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1&quot;&gt;&lt;/div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;pe-11 pt-3&quot;&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Recovery starts&lt;/span&gt;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;WAL restore works for some files&lt;/span&gt;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Recovery stops before target time&lt;/span&gt;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Required checkpoint record not found&lt;/span&gt;&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;7477&quot; data-start=&quot;7463&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;Typical cause:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal;&quot;&gt;The WAL segment containing the target time was never archived.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;7553&quot; data-start=&quot;7479&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;7559&quot; data-start=&quot;7555&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;Fix:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span class=&quot;ͼg&quot; style=&quot;font-weight: normal;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt; pg_switch_wal();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;7595&quot; data-start=&quot;7561&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;7609&quot; data-start=&quot;7597&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Then verify:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: medium;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; last_archived_wal, last_archived_time&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; pg_stat_archiver;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;7689&quot; data-start=&quot;7611&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Operational lesson: never validate PostgreSQL recovery using only the presence of base backups.&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;hr data-end=&quot;7791&quot; data-start=&quot;7788&quot; /&gt;
&lt;/h1&gt;&lt;h3 data-end=&quot;7828&quot; data-section-id=&quot;1yzb5ml&quot; data-start=&quot;7793&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 data-end=&quot;7828&quot; data-section-id=&quot;1yzb5ml&quot; data-start=&quot;7793&quot;&gt;&lt;span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;2. Archive Destination Fills Up&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;
&lt;p data-end=&quot;7839&quot; data-start=&quot;7830&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Symptoms:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;7940&quot; data-start=&quot;7841&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1&quot;&gt;&lt;/div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;pe-11 pt-3&quot;&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;WAL files accumulating in pg_wal&lt;/span&gt;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;archive_command failing&lt;/span&gt;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Database disk usage increasing&lt;/span&gt;&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;7948&quot; data-start=&quot;7942&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;Check:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span class=&quot;ͼg&quot; style=&quot;font-weight: normal;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt; failed_count, last_failed_wal, last_failed_time&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;ͼg&quot; style=&quot;font-weight: normal;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt; pg_stat_archiver;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;8038&quot; data-start=&quot;7950&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;8049&quot; data-start=&quot;8040&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;OS check:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/h1&gt;&lt;blockquote style=&quot;border-color: currentcolor; border-image: initial; border-style: none; border-width: medium; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;p data-end=&quot;8049&quot; data-start=&quot;8040&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal;&quot;&gt;df &lt;/span&gt;&lt;span class=&quot;ͼn&quot; style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal;&quot;&gt;-h&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/h1&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;8096&quot; data-start=&quot;8051&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;du &lt;span class=&quot;ͼn&quot;&gt;-sh&lt;/span&gt; /home/postgres/arch/&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/h1&gt;&lt;/blockquote&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;8096&quot; data-start=&quot;8051&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;8198&quot; data-start=&quot;8098&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;If archiving is broken long enough, &lt;code data-end=&quot;8142&quot; data-start=&quot;8134&quot;&gt;pg_wal&lt;/code&gt; can grow and eventually threaten database availability.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;hr data-end=&quot;8203&quot; data-start=&quot;8200&quot; /&gt;
&lt;/h1&gt;&lt;h3 data-end=&quot;8256&quot; data-section-id=&quot;fq8hby&quot; data-start=&quot;8205&quot;&gt;&lt;span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 data-end=&quot;8256&quot; data-section-id=&quot;fq8hby&quot; data-start=&quot;8205&quot;&gt;&lt;span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;3. Standby or Backup Lag Caused by WAL Handling&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;In streaming replication or backup-heavy systems, WAL is the lifeline. If archiving is delayed, replicas or restore jobs may fall behind or fail to fetch required segments.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;    pg_current_wal_lsn(),&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;    pg_walfile_name(pg_current_wal_lsn());&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;8547&quot; data-start=&quot;8461&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;8565&quot; data-start=&quot;8549&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;For replication:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;    application_name,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #ff79c6;&quot;&gt;state&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;    sent_lsn,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;    write_lsn,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;    flush_lsn,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;    replay_lsn,&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;    sync_state&lt;/span&gt;
&lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; pg_stat_replication;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;8718&quot; data-start=&quot;8567&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;8860&quot; data-start=&quot;8720&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;code data-end=&quot;8737&quot; data-start=&quot;8720&quot;&gt;pg_switch_wal()&lt;/code&gt; will not fix a bad replica by itself. But it helps validate whether WAL generation and archiving are behaving as expected.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/h1&gt;&lt;h2 data-end=&quot;9878&quot; data-section-id=&quot;17zrkaf&quot; data-start=&quot;9863&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 data-end=&quot;9878&quot; data-section-id=&quot;17zrkaf&quot; data-start=&quot;9863&quot;&gt;&lt;span&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;DBA Insights&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;
&lt;p data-end=&quot;10029&quot; data-start=&quot;9880&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Do not treat &lt;code data-end=&quot;9910&quot; data-start=&quot;9893&quot;&gt;pg_switch_wal()&lt;/code&gt; as a magic recovery command. It does one thing: it closes the current WAL segment and makes it eligible for archiving.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;10070&quot; data-start=&quot;10031&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The real DBA work is around validation.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-end=&quot;10107&quot; data-start=&quot;10072&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Check whether archiving is enabled:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;10138&quot; data-start=&quot;10109&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/h1&gt;&lt;blockquote style=&quot;border-color: currentcolor; border-image: none; border-style: none; border-width: medium; border: none; margin: 0px 0px 0px 40px; padding: 0px;&quot;&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;10138&quot; data-start=&quot;10109&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot; style=&quot;text-align: left;&quot;&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;SHOW archive_mode;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/h1&gt;&lt;/blockquote&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;10138&quot; data-start=&quot;10109&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;10174&quot; data-start=&quot;10140&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Check whether the command is sane:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;10208&quot; data-start=&quot;10176&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/h1&gt;&lt;blockquote style=&quot;border-color: currentcolor; border-image: none; border-style: none; border-width: medium; border: none; margin: 0px 0px 0px 40px; padding: 0px;&quot;&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;10208&quot; data-start=&quot;10176&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot; style=&quot;text-align: left;&quot;&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;SHOW archive_command;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/h1&gt;&lt;/blockquote&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;10208&quot; data-start=&quot;10176&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;10249&quot; data-start=&quot;10210&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Check whether archiving is progressing:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;10345&quot; data-start=&quot;10251&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/h1&gt;&lt;blockquote style=&quot;border-color: currentcolor; border-image: initial; border-style: none; border-width: medium; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;10345&quot; data-start=&quot;10251&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span class=&quot;ͼg&quot;&gt;SELECT&lt;/span&gt; archived_count, last_archived_wal, last_archived_time &lt;/span&gt;&lt;/code&gt;&lt;span class=&quot;ͼg&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;font-family: courier; font-weight: normal;&quot;&gt; pg_stat_archiver;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/h1&gt;&lt;/blockquote&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;10345&quot; data-start=&quot;10251&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;10385&quot; data-start=&quot;10347&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Check whether failures are increasing:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;10475&quot; data-start=&quot;10387&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/h1&gt;&lt;blockquote style=&quot;border-color: currentcolor; border-image: initial; border-style: none; border-width: medium; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;10475&quot; data-start=&quot;10387&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span class=&quot;ͼg&quot;&gt;SELECT&lt;/span&gt; failed_count, last_failed_wal, last_failed_time &lt;/span&gt;&lt;/code&gt;&lt;span class=&quot;ͼg&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;font-family: courier; font-weight: normal;&quot;&gt; pg_stat_archiver;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/h1&gt;&lt;/blockquote&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;10475&quot; data-start=&quot;10387&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;10511&quot; data-start=&quot;10477&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;And always check from the OS side:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;10559&quot; data-start=&quot;10513&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute inset-x-4 top-12 bottom-4&quot;&gt;&lt;div class=&quot;pointer-events-none sticky z-40 shrink-0 z-1!&quot;&gt;&lt;div class=&quot;sticky bg-token-border-light&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/h1&gt;&lt;blockquote style=&quot;border-color: currentcolor; border-image: initial; border-style: none; border-width: medium; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;10559&quot; data-start=&quot;10513&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;&lt;span class=&quot;ͼl&quot;&gt;ls&lt;/span&gt; &lt;span class=&quot;ͼn&quot;&gt;-ltr&lt;/span&gt; /home/postgres/arch/&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/h1&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;10559&quot; data-start=&quot;10513&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;df &lt;span class=&quot;ͼn&quot;&gt;-h&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/h1&gt;&lt;/blockquote&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;10559&quot; data-start=&quot;10513&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;10589&quot; data-start=&quot;10561&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;10589&quot; data-start=&quot;10561&quot;&gt;&lt;span&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;Common mistakes I have seen:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;10915&quot; data-start=&quot;10591&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1&quot;&gt;&lt;/div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;pe-11 pt-3&quot;&gt;&lt;div class=&quot;relative z-0 flex max-w-full&quot;&gt;&lt;div class=&quot;q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼd ͼr&quot; dir=&quot;ltr&quot; id=&quot;code-block-viewer&quot;&gt;&lt;div class=&quot;cm-scroller&quot;&gt;&lt;pre class=&quot;cm-content q9tKkq_readonly m-0&quot;&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Assuming base backup success means PITR is safe&lt;br /&gt;Not monitoring pg_stat_archiver&lt;br /&gt;Forgetting quiet databases may not archive WAL quickly&lt;br /&gt;Running pg_switch_wal too frequently without storage planning&lt;br /&gt;Not testing restore until an actual incident&lt;br /&gt;Ignoring archive_command failures because the database is still online&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;p data-end=&quot;10990&quot; data-start=&quot;10917&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;The most dangerous backup system is the one that has never been restored.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p data-end=&quot;10990&quot; data-start=&quot;10917&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/h1&gt;&lt;h2 data-end=&quot;11004&quot; data-section-id=&quot;1xvwnkw&quot; data-start=&quot;10997&quot;&gt;&lt;span&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;FAQs&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h3 data-end=&quot;11053&quot; data-section-id=&quot;1lht68q&quot; data-start=&quot;11006&quot;&gt;&lt;span role=&quot;text&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Does &lt;code data-end=&quot;11032&quot; data-start=&quot;11015&quot;&gt;pg_switch_wal()&lt;/code&gt; force WAL archiving?&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 data-end=&quot;11053&quot; data-section-id=&quot;1lht68q&quot; data-start=&quot;11006&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal;&quot;&gt;Not directly. It closes the current WAL segment. Once the segment is complete, the archiver can pick it up if &lt;/span&gt;&lt;code data-end=&quot;11179&quot; data-start=&quot;11165&quot; style=&quot;font-weight: normal;&quot;&gt;archive_mode&lt;/code&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal;&quot;&gt; is enabled and &lt;/span&gt;&lt;code data-end=&quot;11212&quot; data-start=&quot;11195&quot; style=&quot;font-weight: normal;&quot;&gt;archive_command&lt;/code&gt;&lt;span style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-weight: normal;&quot;&gt; is working.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 data-end=&quot;11282&quot; data-section-id=&quot;e2ef8c&quot; data-start=&quot;11226&quot; style=&quot;text-align: left;&quot;&gt;&lt;span role=&quot;text&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 data-end=&quot;11282&quot; data-section-id=&quot;e2ef8c&quot; data-start=&quot;11226&quot; style=&quot;text-align: left;&quot;&gt;&lt;span role=&quot;text&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Why did &lt;code data-end=&quot;11255&quot; data-start=&quot;11238&quot;&gt;pg_switch_wal()&lt;/code&gt; return the same LSN twice?&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot; style=&quot;text-align: left;&quot;&gt;
&lt;/h1&gt;&lt;h3&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Most likely no WAL was generated between the two calls. Generate a small change, then run it again.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 data-end=&quot;11421&quot; data-section-id=&quot;1nye4c9&quot; data-start=&quot;11385&quot; style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Is it safe to run in production?&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot; style=&quot;text-align: left;&quot;&gt;
&lt;/h1&gt;&lt;h3&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Yes, but do not abuse it. Occasional use for backup, PITR validation, or archive testing is normal. Frequent forced switches can increase archive file count and storage pressure.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 data-end=&quot;11651&quot; data-section-id=&quot;14gklad&quot; data-start=&quot;11603&quot; style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;How do I know the switched WAL was archived?&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;
&lt;/h1&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: large;&quot;&gt;&lt;span class=&quot;ͼg&quot; style=&quot;font-weight: normal;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt; last_archived_wal, last_archived_time&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;ͼg&quot; style=&quot;font-weight: normal;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt; pg_stat_archiver;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro;&quot;&gt;Then confirm at the archive destination:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span class=&quot;ͼl&quot; style=&quot;font-weight: normal;&quot;&gt;ls&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;ͼn&quot; style=&quot;font-weight: normal;&quot;&gt;-ltr&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt; /home/postgres/arch/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;11737&quot; data-start=&quot;11659&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;11821&quot; data-start=&quot;11781&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;h3 data-end=&quot;11852&quot; data-section-id=&quot;dr9ko4&quot; data-start=&quot;11823&quot; style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Can this fix broken PITR?&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;
&lt;/h1&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;It can help if the required WAL is still in the active segment and has not yet been archived. It will not help if the WAL was already lost, deleted, or never generated.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p data-end=&quot;12022&quot; data-start=&quot;11854&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 data-end=&quot;12042&quot; data-section-id=&quot;8dtpi&quot; data-start=&quot;12029&quot;&gt;&lt;span&gt;&lt;span style=&quot;color: #e06666; font-family: Source Sans Pro; font-size: x-large;&quot;&gt;Conclusion&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;
&lt;/h1&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;code data-end=&quot;12061&quot; data-start=&quot;12044&quot;&gt;pg_switch_wal()&lt;/code&gt; is a small PostgreSQL function, but it sits right in the middle of backup confidence, WAL archiving, and PITR reliability.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;It is useful before restore testing, after important changes, and while validating archive behavior. But the command itself is only part of the story. The real discipline is checking whether the WAL segment reached the archive location and whether recovery can actually consume it.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;A good DBA does not stop at “backup completed.”&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;A good DBA asks:&lt;/span&gt;&lt;/span&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Can I restore it?&lt;/span&gt;&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Can I recover to the required time?&lt;/span&gt;&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Do I have every WAL file needed?&lt;/span&gt;&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;code style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;Did I test this before the outage?&lt;/span&gt;&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Source Sans Pro; font-size: large;&quot;&gt;That mindset saves production systems.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;



&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;12669&quot; data-start=&quot;12536&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;h-full min-h-0 min-w-0&quot;&gt;&lt;div class=&quot;border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl&quot;&gt;&lt;div class=&quot;h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback&quot;&gt;&lt;div class=&quot;pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h1 data-end=&quot;228&quot; data-section-id=&quot;gm93i2&quot; data-start=&quot;159&quot;&gt;&lt;pre class=&quot;overflow-visible! px-0!&quot; data-end=&quot;12669&quot; data-start=&quot;12536&quot;&gt;&lt;div class=&quot;relative w-full mt-4 mb-1&quot;&gt;&lt;div class=&quot;relative&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;/h1&gt;</description><link>https://oracle-dba-help.blogspot.com/2026/07/pgswitchwal-in-postgresql-small-command.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirFqnHPtGhxg_y7-tfmeWUg-hSx7FGWujQ-Cb5TX6iPs6awZxddTecL8nRUmC0iI20xG2WdSogYb4Vv8JYCvATktDfH2euJ8mWEJQDwHZp-GQazV_pRakxLCnASCIeqxT9ZxMkZABJjY6ekPfFPjILcy0gdn45lKYNynv9ZWd3cvc_tkVwE4B4yV5J4LA/s72-w640-h360-c/ChatGPT%20Image%20May%2024,%202026,%2007_27_00%20PM.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1375587508974804970.post-6322300970023778985</guid><pubDate>Sat, 18 Jul 2026 12:45:23 +0000</pubDate><atom:updated>2026-07-18T20:45:23.153+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Core DBA</category><category domain="http://www.blogger.com/atom/ns#">Must Read</category><title>The Outage Usually Begins Before the Database Fails</title><description>&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A database incident rarely begins when the monitoring system raises an alert. It usually begins weeks earlier - with an unreviewed execution plan, an ignored capacity trend, an oversized privilege, or a recovery procedure that nobody has tested.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;By the time the DBA receives the call, the database is often exposing an operational weakness that was already present. The immediate symptom may be exhausted storage, a failed deployment, excessive I/O, or a missing object, but the underlying cause is frequently a gap in engineering discipline.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;I have seen expensive Oracle platforms fail because nobody noticed that the Fast Recovery Area was growing rapidly. I have also seen relatively modest PostgreSQL environments remain stable for years because the team consistently reviewed changes, monitored capacity, controlled access, and tested recovery.&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The database technology was different, but the real difference was how the platform was operated.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;The Incident Often Starts During Deployment&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A query completing successfully in development does not mean it is ready for production. Development may contain a few thousand rows, while production contains hundreds of millions. Data distribution, bind values, stale statistics, concurrent workload, and storage latency can all influence the execution plan.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For any significant SQL change, the review should answer practical questions:&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;Which access path did the optimizer select?&lt;/li&gt;
  &lt;li&gt;How close were estimated rows to actual rows?&lt;/li&gt;
  &lt;li&gt;How much logical and physical I/O was required?&lt;/li&gt;
  &lt;li&gt;Did sorts or hash operations spill to temporary storage?&lt;/li&gt;
  &lt;li&gt;Is the plan sensitive to particular bind values?&lt;/li&gt;
  &lt;li&gt;Will the same plan remain acceptable as the table grows?&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The following examples capture runtime execution statistics in Oracle and PostgreSQL. Table and column names should be adjusted for the application being reviewed.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;-- Oracle: execute the statement and display actual row-source statistics

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; /*+ gather_plan_statistics */
order_id,
status,
created_at &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; orders &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; customer_id = :customer_id &lt;span style=&quot;color: #ff79c6;&quot;&gt;AND&lt;/span&gt; created_at &amp;gt;= :from_date;

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; * &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; TABLE(
DBMS_XPLAN.DISPLAY_CURSOR(
NULL,
NULL,
&#39;ALLSTATS LAST +PEEKED_BINDS&#39;
)
);

-- PostgreSQL: execute the query and report timing, I/O, and settings

&lt;span style=&quot;color: #ff79c6;&quot;&gt;EXPLAIN&lt;/span&gt; (ANALYZE, BUFFERS, SETTINGS) &lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; order_id,
status,
created_at &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; orders &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; customer_id = 100245 &lt;span style=&quot;color: #ff79c6;&quot;&gt;AND&lt;/span&gt; created_at &amp;gt;= &lt;span style=&quot;color: #8be9fd;&quot;&gt;DATE&lt;/span&gt; &#39;2026-07-01&#39;; &lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;EXPLAIN ANALYZE&lt;/code&gt; executes the statement; it does not merely estimate the plan. It should therefore be used carefully with slow queries and data-changing statements. Testing an &lt;code style=&quot;font-family: courier;&quot;&gt;UPDATE&lt;/code&gt; inside a transaction and issuing &lt;code style=&quot;font-family: courier;&quot;&gt;ROLLBACK&lt;/code&gt; does not protect against every possible side effect, such as external calls or non-transactional sequence changes.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;An execution-plan review should not automatically result in another index. Every additional index consumes storage, increases WAL or redo generation, and adds work to inserts, updates, and deletes. Sometimes the correct fix is refreshed statistics, a better predicate, improved partition pruning, or reducing the amount of data requested by the application.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Capacity Alerts Must Predict Failure&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Storage exhaustion remains one of the most preventable causes of database downtime. The usual problem is not the absence of monitoring, but monitoring that only reports the current percentage used.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;An Oracle Fast Recovery Area at 85% may remain stable for several weeks or fill within an hour during a large batch operation. PostgreSQL &lt;code style=&quot;font-family: courier;&quot;&gt;pg_wal&lt;/code&gt; may grow unexpectedly because archiving is failing, a replication slot is retaining WAL, or a standby is no longer consuming changes.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A useful alert should consider current utilization, growth rate, time to full, and whether space can actually be reclaimed.&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;-- Oracle: Fast Recovery Area utilization

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; name,
ROUND(space_limit / 1024 / 1024 / 1024, 2) AS limit_gb,
ROUND(space_used / 1024 / 1024 / 1024, 2) AS used_gb,
ROUND(space_reclaimable / 1024 / 1024 / 1024, 2) AS reclaimable_gb,
ROUND(space_used * 100 / NULLIF(space_limit, 0), 2) AS used_pct &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; v$recovery_file_dest;

-- Oracle: archive destinations reporting an error or unusual status

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; dest_id,
status,
destination,
error &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; v$archive_dest_status &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; status &amp;lt;&amp;gt; &#39;INACTIVE&#39; &lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; dest_id;

-- PostgreSQL: WAL archiving statistics

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; archived_count,
failed_count,
last_archived_wal,
last_archived_time,
last_failed_wal,
last_failed_time &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; pg_stat_archiver;

-- PostgreSQL primary: WAL retained by replication slots

&lt;span style=&quot;color: #ff79c6;&quot;&gt;SELECT&lt;/span&gt; slot_name,
slot_type,
active,
restart_lsn,
pg_size_pretty(
pg_wal_lsn_diff(pg_current_wal_lsn(), restart_lsn)
) AS retained_wal &lt;span style=&quot;color: #ff79c6;&quot;&gt;FROM&lt;/span&gt; pg_replication_slots &lt;span style=&quot;color: #ff79c6;&quot;&gt;WHERE&lt;/span&gt; restart_lsn &lt;span style=&quot;color: #ff79c6;&quot;&gt;IS NOT NULL&lt;/span&gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;ORDER BY&lt;/span&gt; pg_wal_lsn_diff(
pg_current_wal_lsn(),
restart_lsn
) &lt;span style=&quot;color: #ff79c6;&quot;&gt;DESC&lt;/span&gt;; &lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;These checks are only the starting point. A production control must also define warning and critical thresholds, escalation ownership, and the expected response. An alert that reaches a mailbox nobody actively monitors is not a control.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Production Access Should Limit the Damage&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;When someone accidentally drops a production table, attention naturally turns to the person who executed the command. The more useful question is why one incorrect command was allowed to become a production outage.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Human production access should normally be:&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;Assigned through named accounts rather than shared credentials&lt;/li&gt;
  &lt;li&gt;Restricted to the permissions required for the operational role&lt;/li&gt;
  &lt;li&gt;Time-bound when elevated access is requested&lt;/li&gt;
  &lt;li&gt;Audited and associated with an approved activity&lt;/li&gt;
  &lt;li&gt;Separated from emergency break-glass access&lt;/li&gt;
  &lt;li&gt;Reviewed and removed when no longer required&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;DBAs should not be exempt from these controls. Permanent unrestricted access may be convenient, but it increases the impact of a compromised credential, an incorrect connection, or a command executed in the wrong terminal.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Simple safeguards also help. Different connection aliases, shell prompts, database banners, credential locations, and terminal colors can make the production environment visually distinct. They will not replace access control, but they can interrupt the path between a human mistake and a serious incident.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;A Rollback Script Is Not a Recovery Plan&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Many change records contain a rollback section that says, “Restore the previous version.” That statement does not explain how to recover a partially completed database change.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Before approving a high-risk migration, I expect the implementation team to answer:&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;What condition will stop the implementation?&lt;/li&gt;
  &lt;li&gt;Which symptoms require rollback rather than roll-forward?&lt;/li&gt;
  &lt;li&gt;How will partially completed changes be identified?&lt;/li&gt;
  &lt;li&gt;What happens to transactions created after deployment begins?&lt;/li&gt;
  &lt;li&gt;How long will recovery take?&lt;/li&gt;
  &lt;li&gt;Who has authority to make the recovery decision?&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle DDL normally performs implicit commits, so issuing &lt;code style=&quot;font-family: courier;&quot;&gt;ROLLBACK&lt;/code&gt; will not reverse a completed &lt;code style=&quot;font-family: courier;&quot;&gt;ALTER TABLE&lt;/code&gt; or &lt;code style=&quot;font-family: courier;&quot;&gt;DROP TABLE&lt;/code&gt;. PostgreSQL supports transactional behavior for much of its DDL, but a complete deployment may still include non-transactional operations, external systems, application releases, or data transformations that cannot be reversed cleanly.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;In some cases, rolling forward is safer than attempting to restore the old state. A renamed column can usually be changed back. Data discarded by a transformation may require a backup, export, shadow table, or purpose-built reconstruction process.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;For a major migration, the recovery procedure should be rehearsed with representative data volume. The exercise should measure lock duration, implementation time, recovery time, and the point after which reversal is no longer safe.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Backup Success Does Not Prove Recoverability&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A green backup job confirms that a process completed. It does not prove that the database can be restored within the expected recovery time or to the required recovery point.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle RMAN validation and PostgreSQL backup-manifest verification are useful controls:&lt;/p&gt;

&lt;div style=&quot;background: rgb(40, 42, 54); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-family: courier; font-size: medium; font-weight: normal;&quot;&gt;# Oracle RMAN

RMAN&amp;gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;CROSSCHECK BACKUP&lt;/span&gt;;
RMAN&amp;gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;LIST EXPIRED BACKUP&lt;/span&gt;;
RMAN&amp;gt; &lt;span style=&quot;color: #ff79c6;&quot;&gt;RESTORE DATABASE VALIDATE&lt;/span&gt;;

# PostgreSQL base backup with a backup manifest

pg_verifybackup /backup/postgresql/basebackup &lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;&lt;code style=&quot;font-family: courier;&quot;&gt;RESTORE DATABASE VALIDATE&lt;/code&gt; checks whether RMAN can locate and read the backup pieces needed for restoration. It does not replace restoring the database to another host, applying the required archived redo, and opening the recovered database.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Similarly, &lt;code style=&quot;font-family: courier;&quot;&gt;pg_verifybackup&lt;/code&gt; verifies a PostgreSQL base backup against its manifest. A complete exercise must restore the files into an isolated environment, provide the required WAL, start the instance, and validate representative application data.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A useful restore drill records:&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;The recovery point that was actually achieved&lt;/li&gt;
  &lt;li&gt;Total restore and recovery time&lt;/li&gt;
  &lt;li&gt;Missing backup files, WAL, or archived redo&lt;/li&gt;
  &lt;li&gt;Required credentials, wallets, and encryption keys&lt;/li&gt;
  &lt;li&gt;Undocumented manual steps discovered during recovery&lt;/li&gt;
  &lt;li&gt;Application-level validation results&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Backups should be monitored every day. Recoverability should be demonstrated periodically.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;A Runbook Must Survive a 2 A.M. Incident&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A lengthy document stored in a knowledge portal is not automatically a useful runbook. During an incident, the on-call engineer needs a concise and tested procedure.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;A practical database runbook should contain:&lt;/p&gt;

&lt;ul style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;
  &lt;li&gt;The condition that triggers the procedure&lt;/li&gt;
  &lt;li&gt;Required access and prerequisites&lt;/li&gt;
  &lt;li&gt;Exact commands or actions&lt;/li&gt;
  &lt;li&gt;Expected output and validation checks&lt;/li&gt;
  &lt;li&gt;Stop or abort conditions&lt;/li&gt;
  &lt;li&gt;Recovery or reversal steps&lt;/li&gt;
  &lt;li&gt;Escalation contacts and ownership&lt;/li&gt;
  &lt;li&gt;Evidence that must be retained&lt;/li&gt;
  &lt;li&gt;The date the procedure was last tested&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Runbooks also expire. Hostnames change, credentials move, tools are upgraded, and support responsibilities shift between teams. Every incident, change rehearsal, and restore drill should feed corrections back into the procedure.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The most valuable runbook is not the one with the best formatting. It is the one another engineer can follow safely without depending on undocumented knowledge held by a single person.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Discipline Should Not Become Bureaucracy&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Operational controls have a cost. Applying the same approval process to a read-only diagnostic query and a destructive production migration wastes time and encourages people to find shortcuts.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The better approach is risk-based control. Low-risk and repeatable activities should be automated or pre-approved where appropriate. High-risk changes require deeper technical review, representative testing, clear abort criteria, and a rehearsed recovery path.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Emergency access should be fast enough to use during a genuine incident, while remaining controlled, temporary, and auditable. A good process reduces uncertainty and helps engineers work safely. It should not create paperwork that adds no protection.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Common Questions&lt;/h2&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Can monitoring prevent every database outage?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;No. Monitoring cannot prevent hardware faults, software defects, or every unexpected workload pattern. It can, however, detect many developing conditions early enough to avoid downtime. Capacity growth, archive failures, replication lag, backup failures, and abnormal query behavior are good examples.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Is adding an index always the safest performance fix?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;No. An index may improve one query while increasing storage usage and slowing data modifications. Check cardinality estimates, statistics, predicate design, partition pruning, and the volume of data returned before creating another index.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;How frequently should restore testing be performed?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The schedule should reflect business criticality, recovery objectives, and the rate of platform change. Quarterly testing is a reasonable starting point for many important systems, but highly critical databases may require more frequent automated restore validation.&lt;/p&gt;

&lt;h3 style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large;&quot;&gt;Should every database change have a rollback script?&lt;/h3&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Every significant change needs a recovery strategy, but that strategy may be rollback, roll-forward, restoration, failover, or a combination of approaches. Forcing every change into a simple rollback template can create false confidence.&lt;/p&gt;

&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;color: #e06666; font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: x-large;&quot;&gt;Final Thoughts&lt;/h2&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;When a database becomes unavailable, the immediate investigation naturally focuses on the technical symptom: exhausted storage, lock contention, a failed migration, or a deleted object.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The more valuable question is what allowed that condition to reach production without being detected, prevented, or contained.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Reliable database platforms are built through repeated habits: reviewing execution plans, monitoring capacity trends, controlling production access, rehearsing changes, restoring backups, and maintaining procedures that engineers actually use.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;Oracle, PostgreSQL, and other database engines provide excellent monitoring, recovery, and diagnostic capabilities. They cannot decide whether a team will apply those capabilities consistently.&lt;/p&gt;

&lt;p style=&quot;font-family: &amp;quot;Source Sans Pro&amp;quot;; font-size: large; font-weight: normal;&quot;&gt;The healthiest production environments are usually quiet, predictable, and deliberately boring. That is rarely an accident. It is the result of disciplined engineering.&lt;/p&gt;
</description><link>https://oracle-dba-help.blogspot.com/2026/07/the-outage-usually-begins-before.html</link><author>noreply@blogger.com (Nikhil Kotak)</author><thr:total>0</thr:total></item></channel></rss>