<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Bugra Parlayan | Oracle Database &amp; Exadata Blog</title>
	<atom:link href="https://www.bugraparlayan.com.tr/feed" rel="self" type="application/rss+xml" />
	<link>https://www.bugraparlayan.com.tr</link>
	<description>A technical blog</description>
	<lastBuildDate>Sun, 28 Sep 2025 14:27:17 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>

<image>
	<url>https://www.bugraparlayan.com.tr/wp-content/uploads/2020/06/cropped-plsql-32x32.jpg</url>
	<title>Bugra Parlayan | Oracle Database &amp; Exadata Blog</title>
	<link>https://www.bugraparlayan.com.tr</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Jira Service Management and OEM 24AI Test Fail</title>
		<link>https://www.bugraparlayan.com.tr/jira-service-management-and-oem-24ai.html</link>
		
		<dc:creator><![CDATA[Bugra Parlayan]]></dc:creator>
		<pubDate>Sun, 28 Sep 2025 14:24:29 +0000</pubDate>
				<category><![CDATA[Middleware]]></category>
		<category><![CDATA[Oracle Database]]></category>
		<guid isPermaLink="false">https://www.bugraparlayan.com.tr/?p=1526</guid>

					<description><![CDATA[<p>Oracle Enterprise Manager 24AI and Jira integration is explained clearly in the Oracle documents. If you see an authentication error during the integration, it is most likely related to the way you are doing the authentication. The documentation is for Jira Cloud version, so it uses the method Authorization: Basic. As you can see in &#8230;</p>
<p>The post <a rel="nofollow" href="https://www.bugraparlayan.com.tr/jira-service-management-and-oem-24ai.html">Jira Service Management and OEM 24AI Test Fail</a> appeared first on <a rel="nofollow" href="https://www.bugraparlayan.com.tr">Bugra Parlayan | Oracle Database &amp; Exadata Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Oracle Enterprise Manager 24AI and Jira integration is explained clearly in the Oracle documents. If you see an authentication error during the integration, it is most likely related to the way you are doing the authentication.</p>



<p>The documentation is for Jira Cloud version, so it uses the method Authorization: Basic. As you can see in the document, the base64 encoding is done with email + token. But if you are not using Jira Cloud (for example, the Data Center version), the authentication should be done with Authorization: Bearer.</p>



<p>Another point is that if you have not made a different configuration in Jira, you need to log in with your username, not your email address. This is because, by default, Jira uses the local user database.</p>



<p>Sample error;</p>



<p><br>ExecuteThread: &#8217;22&#8217; for queue: &#8216;weblogic.kernel.Default (self-tuning)&#8217;] ERROR framework.Method logp.269 &#8211; REST call returned an unsuccessful status: 401</p>



<p><br>ExecuteThread: &#8217;22&#8217; for queue: &#8216;weblogic.kernel.Default (self-tuning)&#8217;] ERROR framework.Method logp.269 &#8211; REST call returned an unsuccessful status: 403</p>



<p></p>



<p>Below you can see an example of creating a ticket with Curl using Authorization: Bearer. If you update the parameters according to your own configuration, you will see that a sample ticket is created in Jira.</p>



<p></p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
curl -X POST \
  -H &quot;Content-Type: application/json&quot; \
  -H &quot;Authorization: Bearer your_token&quot; \
  -d '{
        &quot;fields&quot;: {
          &quot;project&quot;: { &quot;key&quot;: &quot;BGR&quot; },
          &quot;issuetype&quot;: { &quot;name&quot;: &quot;Task&quot; },
          &quot;summary&quot;: &quot;Test Ticket from OEM&quot;,
          &quot;priority&quot;: { &quot;name&quot;: &quot;Minor&quot; },
          &quot;components&quot;: &#x5B;{ &quot;name&quot;: &quot;Jira&quot; }],
          &quot;assignee&quot;: { &quot;name&quot;: &quot;your_token_username&quot; }
        }
      }' \
  https://jira.bugraparlayan.com.tr/rest/api/2/issue
</pre></div>


<p>After this, if you change the lines in the Jira templates from Authorization: Basic to Authorization: Bearer, you can easily integrate with Jira.</p>



<p>However, this is still not enough to create tickets automatically. You also need to change other lines in the template according to your Jira setup. These lines are explained inside the template.</p>



<figure class="wp-block-image size-large"><a href="https://www.bugraparlayan.com.tr/wp-content/uploads/2025/09/image.png"><img decoding="async" width="1024" height="387" src="https://www.bugraparlayan.com.tr/wp-content/uploads/2025/09/image-1024x387.png" alt="" class="wp-image-1528" srcset="https://www.bugraparlayan.com.tr/wp-content/uploads/2025/09/image-1024x387.png 1024w, https://www.bugraparlayan.com.tr/wp-content/uploads/2025/09/image-300x113.png 300w, https://www.bugraparlayan.com.tr/wp-content/uploads/2025/09/image-768x290.png 768w, https://www.bugraparlayan.com.tr/wp-content/uploads/2025/09/image-1536x581.png 1536w, https://www.bugraparlayan.com.tr/wp-content/uploads/2025/09/image-2048x774.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>If you still have a problem, you can send me an email.</p>



<p>Ref:</p>



<p><a href="https://docs.oracle.com/en/enterprise-manager/cloud-control/enterprise-manager-cloud-control/24.1/jirac/installing-and-configuring-jira-connector.html#GUID-7C078A53-99FA-4303-B48B-F9EF0F0D6032" target="_blank" rel="noopener">https://docs.oracle.com/en/enterprise-manager/cloud-control/enterprise-manager-cloud-control/24.1/jirac/installing-and-configuring-jira-connector.html#GUID-7C078A53-99FA-4303-B48B-F9EF0F0D6032</a></p>
<p>The post <a rel="nofollow" href="https://www.bugraparlayan.com.tr/jira-service-management-and-oem-24ai.html">Jira Service Management and OEM 24AI Test Fail</a> appeared first on <a rel="nofollow" href="https://www.bugraparlayan.com.tr">Bugra Parlayan | Oracle Database &amp; Exadata Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Multi-Factor Authentication (MFA) in Oracle Database RU19.28</title>
		<link>https://www.bugraparlayan.com.tr/multi-factor-authentication-mfa-in-oracle-database-ru19-28.html</link>
		
		<dc:creator><![CDATA[Bugra Parlayan]]></dc:creator>
		<pubDate>Sat, 30 Aug 2025 16:56:38 +0000</pubDate>
				<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[certificate-based authentication]]></category>
		<category><![CDATA[Cisco Duo]]></category>
		<category><![CDATA[MFA_OMA_ACTIVATION_EMAIL]]></category>
		<category><![CDATA[MFA_OMA_IAM_DOMAIN_URL]]></category>
		<category><![CDATA[MFA_SENDER_EMAIL_ID]]></category>
		<category><![CDATA[MFA_VERIFICATION_TYPE]]></category>
		<category><![CDATA[multi-factor authentication]]></category>
		<category><![CDATA[native database users]]></category>
		<category><![CDATA[oracle mfa]]></category>
		<category><![CDATA[Oracle Mobile Authenticator]]></category>
		<category><![CDATA[pluggable database (PDB)]]></category>
		<category><![CDATA[push notifications]]></category>
		<category><![CDATA[RADIUS authentication]]></category>
		<category><![CDATA[smart cards]]></category>
		<guid isPermaLink="false">https://www.bugraparlayan.com.tr/?p=1515</guid>

					<description><![CDATA[<p>Introduction: Fortifying the Core &#8211; The Imperative of MFA for Oracle Database In the contemporary digital ecosystem, the sophistication of cyber threats necessitates a security posture that extends beyond traditional perimeter defenses. Multi-factor authentication (MFA) has emerged as a foundational pillar of modern security architecture. It operates on the principle of requiring two or more &#8230;</p>
<p>The post <a rel="nofollow" href="https://www.bugraparlayan.com.tr/multi-factor-authentication-mfa-in-oracle-database-ru19-28.html">Multi-Factor Authentication (MFA) in Oracle Database RU19.28</a> appeared first on <a rel="nofollow" href="https://www.bugraparlayan.com.tr">Bugra Parlayan | Oracle Database &amp; Exadata Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Introduction: Fortifying the Core &#8211; The Imperative of MFA for Oracle Database</h2>



<p>In the contemporary digital ecosystem, the sophistication of cyber threats necessitates a security posture that extends beyond traditional perimeter defenses. Multi-factor authentication (MFA) has emerged as a foundational pillar of modern security architecture. It operates on the principle of requiring two or more distinct verification factors to grant access, thereby creating a layered defense that significantly diminishes the risk of unauthorized entry.<sup></sup> For enterprise systems like the Oracle Database, which house an organization&#8217;s most critical data assets, implementing MFA is no longer an optional enhancement but a critical imperative for mitigating data breaches and ensuring operational integrity. &nbsp;</p>



<p>The drive towards stronger authentication is also heavily influenced by a stringent and evolving regulatory landscape. Global compliance frameworks and standards, including the Payment Card Industry Data Security Standard (PCI DSS), the European Union&#8217;s Digital Operational Resilience Act (DORA) and NIS2 Directive, and the National Institute of Standards and Technology (NIST) guidelines 800-63 and 800-53, increasingly mandate or strongly recommend robust authentication measures like MFA.<sup></sup> Oracle&#8217;s native and integrated MFA capabilities provide a direct pathway for organizations to meet these demanding compliance requirements, safeguarding sensitive data and avoiding potential penalties. &nbsp;</p>



<p>This guide provides a comprehensive, expert-level walkthrough for implementing the primary MFA architectures supported by Oracle Database. These methods offer flexibility to align with diverse enterprise security strategies and infrastructures:</p>



<ul class="wp-block-list">
<li><strong>Push Notification-Based MFA:</strong> A modern, user-friendly approach integrating with mobile applications such as Oracle Mobile Authenticator (OMA) and Cisco Duo, allowing for real-time approval or denial of login attempts.  </li>



<li><strong>Certificate-Based MFA:</strong> A highly secure method leveraging Public Key Infrastructure (PKI), where users are authenticated using a combination of a password and a digital certificate stored on a physical device like a smart card.  </li>



<li><strong>RADIUS Integration:</strong> A versatile, standards-based protocol that enables the Oracle Database to connect with a wide array of third-party authentication managers, including token-based systems and centralized identity providers.  </li>
</ul>



<p>As Oracle continues to evolve its security offerings, a strategic shift towards simplifying MFA is on the horizon. Future releases are planned to include native MFA support for local database accounts, streamlining the process for administrators and broadening the scope of protection.<sup></sup> This forward-looking development underscores Oracle&#8217;s commitment to embedding advanced security directly into the core of its database platform. &nbsp;</p>



<h2 class="wp-block-heading">Section 1: Foundational Concepts, Architecture, and Prerequisites</h2>



<p>Before embarking on the configuration of a specific MFA method, it is crucial to understand the underlying architecture, licensing landscape, and universal prerequisites. A successful implementation depends on a solid foundation of correctly configured components and a clear understanding of how they interact.</p>



<h3 class="wp-block-heading">1.1 Understanding the MFA Architecture: An Integration-Centric Model</h3>



<p>Oracle Database MFA is not a monolithic, self-contained feature. Instead, it functions as a sophisticated integration between the database and an external authentication authority. This architecture involves several key components working in concert: the Oracle Database, the Oracle Net listener, a server-side Oracle Wallet for storing secrets, and an external Identity Provider (IdP) or authentication server, such as Oracle Cloud Infrastructure (OCI) Identity and Access Management (IAM), Cisco Duo, or a RADIUS server.<sup></sup> &nbsp;</p>



<p>This integration-centric model has significant operational implications. The database effectively acts as a client to these external identity services. This is evident in the database initialization and network configuration parameters, which point to external network endpoints like <code>$MFA_DUO_API_HOST</code>, <code>$MFA_OMA_IAM_DOMAIN_URL</code>, and <code>$SQLNET.RADIUS_AUTHENTICATION</code>.<sup></sup> Consequently, a successful MFA transaction depends not only on a correctly configured database but also on a properly configured IdP, a functional email relay (SMTP) for enrollment notifications, and correctly defined network paths and firewall rules allowing communication between these systems. Troubleshooting MFA failures is therefore often a multi-disciplinary effort, requiring collaboration between database administrators, network engineers, security architects, and cloud identity administrators. &nbsp;</p>



<p>The Oracle Wallet plays a pivotal role in this architecture. It serves as the secure repository for the credentials the database uses to authenticate itself to the external IdP. These secrets can include API integration keys, client secrets, or service account passwords. Utilities such as <code>mkstore</code> and <code>orapki</code> are used to create and manage these wallets and the secrets stored within them, ensuring that sensitive authentication data is protected on the database server&#8217;s file system.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">1.2 Licensing Considerations: Navigating the Ambiguity</h3>



<p>A frequent and critical question for any new feature implementation pertains to licensing. Oracle&#8217;s primary database licensing models, Named User Plus (NUP) and Processor, are well-documented for Standard Edition 2 and Enterprise Edition.<sup></sup> However, the technical documentation detailing the configuration of MFA features for Oracle Database 19c does not explicitly state a requirement for any extra-cost options, such as the Oracle Advanced Security Option (ASO).<sup></sup> This omission is notable, as Oracle is typically explicit about features that require additional licenses. &nbsp;</p>



<p>Further reinforcing this observation, official communications regarding upcoming native MFA capabilities also lack any mention of specific licensing prerequisites.<sup></sup> This consistent absence of an explicit licensing dependency may represent a strategic decision by Oracle. By not tying this critical security feature to an additional license, Oracle lowers the barrier to adoption, making it easier for customers to secure their databases and meet the stringent compliance mandates that are increasingly prevalent in the industry.<sup></sup> Enhancing the platform&#8217;s baseline security posture makes the Oracle Database a more resilient and attractive option for enterprises. &nbsp;</p>



<p>Despite this analysis, it is imperative to recognize that official license agreements are the ultimate source of truth. Organizations should always consult their specific Oracle Master Agreement (OMA), ordering documents, and the official Database Licensing Information User Manual to ensure full compliance before deploying any new features.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">1.3 Universal Prerequisites and Server Configuration</h3>



<p>Regardless of the chosen MFA method, several universal configuration steps must be performed on the database server to prepare the environment.</p>



<ul class="wp-block-list">
<li><strong>Network Timeouts:</strong> For push notification-based methods (OMA and Duo), the database connection must remain open while waiting for the user to respond to the prompt on their mobile device. The default timeout may be too short, leading to failed login attempts. It is essential to edit the <code>sqlnet.ora</code> file on the database server and set the <code>$SQLNET.INBOUND_CONNECT_TIMEOUT</code> parameter to a value greater than 60 seconds to accommodate this delay.  </li>



<li><strong>Wallet Creation and Location:</strong> The Oracle Wallet is required to store secrets. If a wallet does not already exist in the designated location, it must be created. The <code>orapki</code> utility can be used to create a new auto-login wallet. The wallet location is specific to the container: for the CDB root, it is <code>&lt;WALLET_ROOT>/mfa</code>, and for Pluggable Databases (PDBs), it is <code>&lt;WALLET_ROOT>/&lt;PDB's guid>/mfa</code>.  </li>



<li><strong>SMTP Integration for Enrollment:</strong> Push-based MFA methods rely on email to send enrollment links to users. The database must be configured to communicate with an SMTP server. This involves setting several initialization parameters (<code>$MFA_SMTP_HOST</code>, <code>$MFA_SMTP_PORT</code>, <code>$MFA_SENDER_EMAIL_ID</code>, <code>$MFA_SENDER_EMAIL_DISPLAYNAME</code>). If the SMTP server requires authentication, the service account credentials must be securely stored in the Oracle Wallet.  </li>



<li><strong>Password File Format:</strong> A critical prerequisite for enabling MFA on administrative accounts (users with <code>SYSDBA</code>, <code>SYSOPER</code>, etc., privileges) is the format of the password file. The password file must be in the 12.2 format or later. If the file is in an older format, any attempt to add an MFA factor to a privileged user will fail. The <code>orapwd</code> utility can be used to check the format and migrate the password file if necessary.  </li>
</ul>



<p>The following table provides a consolidated reference for the key parameters involved in configuring Oracle Database MFA.</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><td>Parameter Name</td><td>File Location</td><td>Applicable MFA Methods</td><td>Description</td></tr></thead><tbody><tr><td><code>$MFA_DUO_API_HOST</code></td><td><code>init.ora</code></td><td>Cisco Duo</td><td>Specifies the API hostname for the organization&#8217;s Cisco Duo account.</td></tr><tr><td><code>$MFA_OMA_IAM_DOMAIN_URL</code></td><td><code>init.ora</code></td><td>Oracle Mobile Authenticator (OMA)</td><td>Specifies the domain URL for the OCI IAM identity domain being used.</td></tr><tr><td><code>$MFA_SMTP_HOST</code></td><td><code>init.ora</code></td><td>OMA, Cisco Duo</td><td>The hostname or IP address of the SMTP server for sending enrollment emails.</td></tr><tr><td><code>$MFA_SMTP_PORT</code></td><td><code>init.ora</code></td><td>OMA, Cisco Duo</td><td>The port number for the SMTP server (e.g., 587 for TLS).</td></tr><tr><td><code>$MFA_SENDER_EMAIL_ID</code></td><td><code>init.ora</code></td><td>OMA, Cisco Duo</td><td>The email address that will appear as the sender of enrollment notifications.</td></tr><tr><td><code>$MFA_SENDER_EMAIL_DISPLAYNAME</code></td><td><code>init.ora</code></td><td>OMA, Cisco Duo</td><td>The display name for the sender of enrollment emails.</td></tr><tr><td><code>$SQLNET.INBOUND_CONNECT_TIMEOUT</code></td><td><code>sqlnet.ora</code></td><td>OMA, Cisco Duo</td><td>End-to-end authentication timeout. Must be &gt; 60 seconds for push notifications.</td></tr><tr><td><code>$SQLNET.AUTHENTICATION_SERVICES</code></td><td><code>sqlnet.ora</code></td><td>RADIUS, Certificate</td><td>Defines the authentication methods to be used (e.g., <code>(RADIUS)</code>, <code>(TCPS)</code>).</td></tr><tr><td><code>$SQLNET.RADIUS_AUTHENTICATION</code></td><td><code>sqlnet.ora</code></td><td>RADIUS</td><td>The hostname or IP address of the primary RADIUS authentication server.</td></tr><tr><td><code>$SQLNET.RADIUS_AUTHENTICATION_PORT</code></td><td><code>sqlnet.ora</code></td><td>RADIUS</td><td>The port number for the RADIUS server (default is 1812).</td></tr><tr><td><code>$SQLNET.RADIUS_SECRET</code></td><td><code>sqlnet.ora</code></td><td>RADIUS</td><td>The full path to the file containing the shared secret for the RADIUS client.</td></tr><tr><td><code>$SQLNET.RADIUS_CHALLENGE_RESPONSE</code></td><td><code>sqlnet.ora</code></td><td>RADIUS</td><td>Must be set to <code>ON</code> to enable challenge-response for OTPs and other factors.</td></tr><tr><td><code>$WALLET_LOCATION</code></td><td><code>sqlnet.ora</code>, <code>listener.ora</code></td><td>Certificate</td><td>Specifies the directory path of the Oracle Wallet for TLS/PKI credentials.</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">Section 2: Implementing Push Notification-Based MFA</h2>



<p>Push notification MFA offers a balance of strong security and user convenience, making it a popular choice for modern applications. The Oracle Database integrates with two leading providers: Oracle Mobile Authenticator (OMA) and Cisco Duo.</p>



<h3 class="wp-block-heading">2.1 Configuration with Oracle Mobile Authenticator (OMA) and OCI IAM</h3>



<p>This method leverages an OCI IAM identity domain as the authentication authority and the OMA application for the second-factor verification.</p>



<ul class="wp-block-list">
<li><strong>Prerequisites:</strong> Before configuration, ensure you have an active OCI IAM account, the specific IAM domain URL, and have configured an application client within IAM that possesses both the <code>User Administrator</code> and <code>MFA Client</code> roles. The client ID and client secret for this application are required.  </li>



<li><strong>Step 1: Database Parameter Configuration:</strong> Set the necessary initialization parameters in the database. This includes the OMA-specific URL and the universal SMTP parameters for email notifications.   SQL<code>ALTER SYSTEM SET MFA_OMA_IAM_DOMAIN_URL = "https://idcs-xxxxxxxx.identity.oraclecloud.com"; ALTER SYSTEM SET MFA_SMTP_HOST = "smtp.your-email-provider.com"; ALTER SYSTEM SET MFA_SMTP_PORT = 587; ALTER SYSTEM SET MFA_SENDER_EMAIL_ID = "db-admin@example.com";</code></li>



<li><strong>Step 2: Securing Client Credentials in the Oracle Wallet:</strong> Use the <code>mkstore</code> utility to securely store the OCI IAM application&#8217;s client ID and secret in the server-side wallet. These credentials allow the database to authenticate to the IAM service.   Bash<code>mkstore -wrl./ -createEntry oracle.security.mfa.oma.clientid &lt;your_client_id> mkstore -wrl./ -createEntry oracle.security.mfa.oma.clientsecret &lt;your_client_secret></code></li>



<li><strong>Step 3: OCI IAM Configuration:</strong> A critical administrative step within OCI IAM is to adjust the validity period for the enrollment token. By default, the enrollment link sent to users expires in 300 seconds (5 minutes), which is often impractical. It is highly recommended to extend this period to 86,400 seconds (24 hours) via the IAM API to prevent user enrollment failures.   Bash<code>curl -X PATCH "${DOMAIN_URL}/admin/v1/AuthenticationFactorSettings/AuthenticationFactorSettings" \ -H 'Content-Type: application/json' -H "Authorization: Bearer $AUTH_TOKEN" \ -d '{"schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"],"Operations":}'</code></li>



<li><strong>Step 4: User Enrollment and Management:</strong> With the backend configured, administrators can now enable MFA for database users using SQL commands.SQL<code>-- For a new user CREATE USER jsmith IDENTIFIED BY "ComplexPassword1" AND FACTOR 'OMA_PUSH' AS 'jason.smith@example.com'; -- For an existing user ALTER USER jsmith ADD FACTOR 'OMA_PUSH' AS 'jason.smith@example.com'; </code>Executing these commands does more than modify the database user account; it triggers an identity provisioning event. The database communicates with OCI IAM to create a corresponding user account in the identity domain and dispatches an enrollment email. This tight integration creates a &#8220;dual identity&#8221; model and introduces an important lifecycle management consideration. While the database automates user creation in the IdP, the process for de-provisioning or handling changes requires a clearly defined administrative procedure to prevent orphaned accounts in the IAM system. The end-user receives an email with a QR code, which they scan with the OMA app to register their device and complete the enrollment process.  </li>
</ul>



<h3 class="wp-block-heading">2.2 Configuration with Cisco Duo</h3>



<p>This method integrates the database with the Cisco Duo security platform for second-factor authentication.</p>



<ul class="wp-block-list">
<li><strong>Prerequisites:</strong> An active Cisco Duo account is required. From the Duo administrative console, you will need to obtain three key pieces of information for the integration: the API hostname, the Integration key, and the Secret key.  </li>



<li><strong>Step 1: Database Parameter Configuration:</strong> Set the Duo-specific API host parameter along with the standard SMTP parameters in the database&#8217;s initialization file.   SQL<code>ALTER SYSTEM SET MFA_DUO_API_HOST = "api-xxxxxxxx.duosecurity.com"; ALTER SYSTEM SET MFA_SMTP_HOST = "smtp.your-email-provider.com"; ALTER SYSTEM SET MFA_SMTP_PORT = 587;</code></li>



<li><strong>Step 2: Securing Duo Credentials in the Oracle Wallet:</strong> Use the <code>mkstore</code> utility to store the Duo Integration key and Secret key in the server&#8217;s Oracle Wallet. These keys are used by the database to securely communicate with the Duo API.   Bash<code>mkstore -wrl./ -createEntry oracle.security.mfa.duo.integrationkey &lt;your_integration_key> mkstore -wrl./ -createEntry oracle.security.mfa.duo.secretkey &lt;your_secret_key></code></li>



<li><strong>Step 3: User Enrollment and Management:</strong> Administrators can enable Duo MFA for users via SQL. The process is analogous to the OMA configuration.   SQL<code>-- For a new user CREATE USER jsmith IDENTIFIED BY "ComplexPassword1" AND FACTOR 'DUO_PUSH' AS 'jason.smith@example.com'; -- For an existing user ALTER USER jsmith ADD FACTOR 'DUO_PUSH' AS 'jason.smith@example.com'; </code>Similar to the OMA integration, this command initiates the creation of the user within the Cisco Duo account if they do not already exist. An enrollment email is sent to the user, containing a link that expires after 24 hours. The same &#8220;dual identity&#8221; lifecycle management considerations apply here as with OMA. The user follows the link to register their device with the Cisco Duo mobile application.</li>
</ul>



<h2 class="wp-block-heading">Section 3: Implementing Certificate-Based MFA (PKI)</h2>



<p>Certificate-based authentication represents a highly secure, albeit more complex, form of MFA. It combines something the user knows (a password) with something the user has (a private key securely stored with a digital certificate), often on a hardware token or smart card.</p>



<h3 class="wp-block-heading">3.1 Principles of Certificate-Based Authentication</h3>



<p>This method is built on Public Key Infrastructure (PKI). It establishes a mutual Transport Layer Security (mTLS) connection, where both the client and the database server present digital certificates to prove their identities to one another.<sup></sup> The database server is configured to trust certificates issued by a specific Certificate Authority (CA). When a user connects, they present their personal certificate. The server validates the certificate against its trusted CAs and then maps the certificate&#8217;s subject Distinguished Name (DN)—for example, &nbsp;</p>



<p><code>cn=jason.smith</code>—to a specific database user account to authorize access.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">3.2 Server-Side Configuration</h3>



<ul class="wp-block-list">
<li><strong>Step 1: Configure the Listener for TCPS:</strong> The Oracle Net Listener must be configured to accept secure connections. This involves editing the <code>listener.ora</code> file to add a TCPS protocol endpoint on a dedicated port (e.g., 1522) and specifying the <code>WALLET_LOCATION</code> that holds the server&#8217;s certificate and private key.  </li>



<li><strong>Step 2: Create and Populate the Server Wallet:</strong> Using the <code>orapki</code> command-line utility, an administrator creates a server wallet, generates a Certificate Signing Request (CSR), and submits it to a trusted internal or external CA. Once the signed server certificate is received, it is imported back into the wallet along with the CA&#8217;s root and any intermediate certificates to complete the trust chain.  </li>



<li><strong>Step 3: Configure <code>sqlnet.ora</code> on the Server:</strong> The server&#8217;s <code>sqlnet.ora</code> file must be updated to specify the <code>WALLET_LOCATION</code> and to include <code>TCPS</code> in the <code>$SQLNET.AUTHENTICATION_SERVICES</code> parameter list, enabling it to process secure connections.  </li>
</ul>



<h3 class="wp-block-heading">3.3 Client-Side Configuration</h3>



<ul class="wp-block-list">
<li><strong>Step 1: Configure <code>sqlnet.ora</code> on the Client:</strong> The client machine&#8217;s <code>sqlnet.ora</code> file must also be configured. It needs a <code>WALLET_LOCATION</code> entry pointing to the directory containing the user&#8217;s personal wallet (with their certificate and private key) and must have <code>$SQLNET.AUTHENTICATION_SERVICES=(TCPS)</code>.  </li>



<li><strong>Step 2: Configure <code>tnsnames.ora</code> on the Client:</strong> A new TNS entry must be created in the client&#8217;s <code>tnsnames.ora</code> file. This entry will specify <code>PROTOCOL=TCPS</code> and the port number configured for the secure listener on the server.  </li>
</ul>



<h3 class="wp-block-heading">3.4 User Enrollment for Certificate MFA</h3>



<p>Once the client and server infrastructure is in place, administrators can associate a user&#8217;s certificate with their database account.</p>



<ul class="wp-block-list">
<li>The <code>CREATE USER</code> and <code>ALTER USER</code> commands are used with the <code>FACTOR 'CERT_AUTH'</code> clause. The <code>AS</code> clause must contain the subject DN from the user&#8217;s certificate that will be used for mapping.   SQL<code>-- For a new user CREATE USER jsmith IDENTIFIED BY "ComplexPassword1" AND FACTOR 'CERT_AUTH' AS 'cn=jason.smith'; -- For an existing user ALTER USER jsmith ADD FACTOR 'CERT_AUTH' AS 'cn=jason.smith';</code></li>
</ul>



<p>When the user connects using the secure TNS alias, they will be prompted for their password. The Oracle client will then present their certificate from the wallet. The database validates both the password and the certificate, completing the multi-factor authentication process.</p>



<h2 class="wp-block-heading">Section 4: Implementing RADIUS-Based MFA</h2>



<p>Remote Authentication Dial-In User Service (RADIUS) is a widely adopted networking protocol that provides centralized Authentication, Authorization, and Accounting (AAA) management. Integrating Oracle Database with a RADIUS server allows it to leverage existing enterprise two-factor authentication solutions, such as those based on hardware tokens, OTPs, or other third-party systems.</p>



<h3 class="wp-block-heading">4.1 RADIUS Authentication Flow</h3>



<p>The authentication process involves a coordinated exchange between multiple components. First, the user initiates a connection to the Oracle Database using their credentials. The database, acting as a RADIUS client, forwards the authentication request to the configured RADIUS server. The RADIUS server then processes the request, often by validating the first factor against a directory service like LDAP or Active Directory. If the first factor is valid, the RADIUS server issues a challenge for the second factor (e.g., &#8220;Enter your OTP&#8221;). The database relays this challenge to the user&#8217;s client. The user provides the second factor (e.g., a six-digit code from their authenticator app), which is sent back through the database to the RADIUS server for final validation. Upon successful validation, the RADIUS server sends an &#8220;Access-Accept&#8221; message, and the database grants the connection.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">4.2 Database Configuration for RADIUS</h3>



<ul class="wp-block-list">
<li><strong>Step 1: Register the Database as a RADIUS Client:</strong> In the RADIUS server&#8217;s administrative interface, the Oracle Database server must be registered as a new RADIUS client. This process typically involves providing the database server&#8217;s IP address and defining a <code>sharedSecret</code>. This secret is a pre-shared key used to encrypt communication between the database and the RADIUS server.  </li>



<li><strong>Step 2: Configure <code>sqlnet.ora</code>:</strong> The server-side <code>sqlnet.ora</code> file is the primary location for configuring the RADIUS integration. Several parameters are required :
<ul class="wp-block-list">
<li><code>$SQLNET.AUTHENTICATION_SERVICES=(RADIUS)</code>: This tells Oracle Net to use the RADIUS authentication adapter.</li>



<li><code>$SQLNET.RADIUS_AUTHENTICATION</code>: The hostname or IP address of the RADIUS server.</li>



<li><code>$SQLNET.RADIUS_AUTHENTICATION_PORT</code>: The UDP port for RADIUS authentication, typically 1812.</li>



<li><code>$SQLNET.RADIUS_SECRET</code>: The full file system path to the <code>radius.key</code> file containing the shared secret.</li>



<li><code>$SQLNET.RADIUS_CHALLENGE_RESPONSE = ON</code>: This parameter is essential for enabling the interactive challenge-response mechanism required for OTPs.</li>
</ul>
</li>



<li><strong>Step 3: Secure the Shared Secret:</strong> The shared secret obtained from the RADIUS server must be stored in a file on the database server. This file (e.g., <code>$ORACLE_HOME/network/security/radius.key</code>) should contain only the secret string. For security, its file system permissions must be restricted so that it is readable only by the Oracle software owner.  </li>
</ul>



<h3 class="wp-block-heading">4.3 User Configuration and Login Experience</h3>



<p>Since authentication is fully delegated to the external RADIUS infrastructure, database users must be created in a specific way.</p>



<ul class="wp-block-list">
<li>Users are created using the <code>IDENTIFIED EXTERNALLY</code> clause. This instructs the Oracle Database not to manage the user&#8217;s password but to rely on the external authentication service (RADIUS) to verify the user&#8217;s identity. The database username must match the username in the directory that the RADIUS server authenticates against.   SQL<code>CREATE USER user1 IDENTIFIED EXTERNALLY; GRANT CREATE SESSION TO user1;</code></li>



<li>When a user connects via a tool like SQL*Plus, they will first be prompted for their password (the first factor). If successful, an &#8220;Oracle &#8211; Challenge&#8221; window will appear, prompting for the second factor, such as an OTP. After entering the correct OTP, the login succeeds, and the user is granted a session in the database.  </li>
</ul>



<h2 class="wp-block-heading">Section 5: Administration, Auditing, and Troubleshooting</h2>



<p>Effective long-term management of MFA requires established procedures for user administration, a robust auditing strategy, and a clear understanding of how to troubleshoot common issues.</p>



<h3 class="wp-block-heading">5.1 Ongoing User Administration</h3>



<p>Day-to-day management of MFA for users is handled through standard SQL commands. The <code>ALTER USER</code> statement can be used to add, modify, or remove MFA factors. As noted previously, administrators must be mindful of the &#8220;dual identity&#8221; lifecycle. When removing an MFA factor or dropping a database user, a corresponding action may be required in the external IdP (OCI IAM or Duo) to de-provision the user and prevent orphaned accounts. While it is possible to configure MFA for database links, this is not a typical use case and should be approached with caution, as it could complicate automated scripts and processes.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">5.2 Auditing MFA Events</h3>



<p>Oracle&#8217;s unified audit trail provides comprehensive capabilities for monitoring security-related events, including MFA. When a user successfully authenticates, a standard login audit record is generated. More importantly, when a second-factor authentication attempt fails, the details of the failure are captured in the <code>additional_info</code> column of the unified audit trail view (<code>UNIFIED_AUDIT_TRAIL</code>). This allows security administrators to monitor for suspicious activity, such as repeated MFA failures for a specific user, which could indicate a compromised password or an attack in progress.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">5.3 Common Issues and Troubleshooting</h3>



<p>A structured approach to troubleshooting is essential for resolving MFA-related login problems efficiently.</p>



<ul class="wp-block-list">
<li><strong>Problem: User Enrollment Fails or Emails Are Not Received.</strong>
<ul class="wp-block-list">
<li><strong>Causes &amp; Solutions:</strong> This issue typically points to a problem in the email delivery chain. Administrators should first verify the <code>$MFA_SMTP_*</code> parameters in the <code>init.ora</code> file. If the SMTP server requires authentication, confirm that the correct credentials are stored in the Oracle Wallet. Network connectivity issues, such as firewalls blocking the SMTP port between the database server and the email relay, are also common culprits. For OMA, it is crucial to verify that the enrollment link has not expired due to the <code>jwtValidityDurationInSecs</code> setting in OCI IAM.  </li>
</ul>
</li>



<li><strong>Problem: Connection Fails with Timeout Error.</strong>
<ul class="wp-block-list">
<li><strong>Causes &amp; Solutions:</strong> The most likely cause is the <code>$SQLNET.INBOUND_CONNECT_TIMEOUT</code> parameter in <code>sqlnet.ora</code> being set too low for push notifications. This value must be greater than 60 seconds. If the parameter is set correctly, investigate potential network latency or firewall issues between the database server and the external IdP (Duo or OCI IAM) that could be delaying the API calls.  </li>
</ul>
</li>



<li><strong>Problem: User Cannot Log In / Account is Locked.</strong>
<ul class="wp-block-list">
<li><strong>Causes &amp; Solutions:</strong> This can result from multiple issues, including an incorrect password, an invalid OTP, or too many failed MFA attempts leading to an account lockout in the external IdP. A critical operational scenario is when a user loses or replaces their mobile device. Administrators must have a defined process for resetting a user&#8217;s MFA enrollment in the IdP. Proactively generating and securely distributing one-time bypass codes can provide users with an emergency access method while their device is being restored.  </li>
</ul>
</li>



<li><strong>Problem: Administrator Cannot Enable MFA for a User.</strong>
<ul class="wp-block-list">
<li><strong>Causes &amp; Solutions:</strong> While some Oracle cloud services require users to self-enroll in MFA, enabling MFA for the Oracle Database is an administrative action performed via <code>ALTER USER</code>. If this command fails, check for other prerequisites, such as ensuring the password file is in the 12.2 format for privileged users. Confusion can arise from different workflows across the Oracle ecosystem, but for the database, the DBA is in control of enrollment.  </li>
</ul>
</li>



<li><strong>Problem: RADIUS Authentication Fails.</strong>
<ul class="wp-block-list">
<li><strong>Causes &amp; Solutions:</strong> RADIUS failures often stem from configuration mismatches. Verify that the shared secret in the <code>radius.key</code> file exactly matches the one configured on the RADIUS server. Double-check the RADIUS server&#8217;s IP address or hostname and port in the <code>sqlnet.ora</code> file. Confirm that no firewalls are blocking the UDP traffic on the RADIUS port between the database server and the RADIUS server. Finally, ensure the user exists and is active in the backend directory (e.g., Active Directory) that the RADIUS server is configured to use for authentication.  </li>
</ul>
</li>
</ul>



<p>The following table lists common error codes related to MFA and provides actionable guidance for database administrators.</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><td>Error Code</td><td>Error Message</td><td>DBA Action/Resolution</td></tr></thead><tbody><tr><td><code>AUTH-3001</code></td><td>You entered an incorrect username or password.</td><td>The first authentication factor (password) failed. This is a standard password issue, not an MFA-specific problem. Advise the user to verify their password.</td></tr><tr><td><code>AUTH-3002</code></td><td>Your account is locked. Contact your system administrator.</td><td>The user&#8217;s account is locked, likely in the external IdP (OCI IAM, Duo) or backend directory (AD/LDAP) due to too many failed login attempts. The administrator must unlock the account in the respective system.</td></tr><tr><td><code>AUTH-3024</code></td><td>You aren&#8217;t authorized to access the app. Contact your system administrator.</td><td>The user&#8217;s credentials are valid, but they are not authorized by a policy in the external IdP to access the database application. Check sign-on policies in OCI IAM or Duo.</td></tr><tr><td><code>AUTH-3029</code></td><td>MFA is enabled for the user. The user must provide a second factor of authentication in addition to password authentication.</td><td>This is an informational code indicating the password was correct and the database is now waiting for the second factor. If login fails after this, troubleshoot the second-factor path (push notification, OTP, etc.).</td></tr><tr><td><code>AUTH-1002</code></td><td>The {0} authentication factor is not supported or enabled.</td><td>The MFA method the user is attempting to use has not been enabled in the IdP&#8217;s policy. The administrator needs to enable the required factor (e.g., Push, SMS) in the OCI IAM or Duo configuration.</td></tr><tr><td><code>AUTH-1007</code></td><td>Authentication failed.</td><td>This is a generic second-factor failure. It could be an incorrect OTP, a denied push notification, or a timeout. Check the IdP logs for specific details.</td></tr><tr><td><code>AUTH-1016</code></td><td>You can&#8217;t skip enrollment. 2-Step Verification is required.</td><td>A policy in the IdP requires the user to enroll in MFA, but they are attempting to bypass it. The user must complete the enrollment process.</td></tr></tbody></table></figure>



<p></p>



<h2 class="wp-block-heading">Conclusion: A Multi-Layered Security Posture for the Future</h2>



<p>The implementation of Multi-Factor Authentication is a transformative step in securing an Oracle Database environment. By moving beyond the limitations of single-factor password authentication, organizations can significantly mitigate the risks associated with compromised credentials, which remain a primary vector for data breaches. Each of the methods detailed in this guide—push notification, certificate-based, and RADIUS—provides a robust mechanism for enforcing stronger identity verification, helping organizations align with a zero-trust security philosophy and meet stringent regulatory compliance mandates.<sup></sup> &nbsp;</p>



<p>The future of Oracle Database security points towards even tighter and more seamless integration of these critical controls. The planned introduction of native MFA support for local database accounts, anticipated in the July 2025 Database Release Update (DBRU), marks a significant evolution.<sup></sup> This development will simplify the architecture by reducing the dependency on external identity providers for basic database accounts, allowing administrators to directly secure even legacy or application-specific schemas. This strategic direction demonstrates Oracle&#8217;s ongoing commitment to embedding advanced security features into the core database engine, making them more accessible and manageable for all customers. &nbsp;</p>



<p>Ultimately, adopting one of the MFA strategies outlined here is not merely a technical exercise; it is a fundamental step in building a resilient, multi-layered security posture. In an era of persistent and sophisticated threats, fortifying access to critical data platforms is an essential responsibility for every data custodian.</p>



<p><a href="https://docs.oracle.com/en/database/oracle/oracle-database/19/newft/new-features-19c-release-updates.html#GUID-307E2F26-E7B8-4FCC-927E-6CA35D608E84" target="_blank" rel="noopener">https://docs.oracle.com/en/database/oracle/oracle-database/19/newft/new-features-19c-release-updates.html#GUID-307E2F26-E7B8-4FCC-927E-6CA35D608E84</a></p>



<p><a href="https://docs.oracle.com/en/database/oracle/oracle-database/19/dbseg/part_1.html" target="_blank" rel="noopener">https://docs.oracle.com/en/database/oracle/oracle-database/19/dbseg/part_1.html</a></p>
<p>The post <a rel="nofollow" href="https://www.bugraparlayan.com.tr/multi-factor-authentication-mfa-in-oracle-database-ru19-28.html">Multi-Factor Authentication (MFA) in Oracle Database RU19.28</a> appeared first on <a rel="nofollow" href="https://www.bugraparlayan.com.tr">Bugra Parlayan | Oracle Database &amp; Exadata Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Creating an ASM Disk on Exadata FlashDisk</title>
		<link>https://www.bugraparlayan.com.tr/creating-an-asm-disk-on-exadata-flashdisk.html</link>
		
		<dc:creator><![CDATA[Bugra Parlayan]]></dc:creator>
		<pubDate>Sat, 19 Jul 2025 19:06:23 +0000</pubDate>
				<category><![CDATA[Engineered Systems]]></category>
		<category><![CDATA[ASM]]></category>
		<category><![CDATA[direct path read]]></category>
		<category><![CDATA[disk drop]]></category>
		<category><![CDATA[exadata]]></category>
		<category><![CDATA[flash cache]]></category>
		<category><![CDATA[FlashDisk]]></category>
		<category><![CDATA[performance tuning]]></category>
		<category><![CDATA[planned maintenance]]></category>
		<category><![CDATA[Temp Tablespace]]></category>
		<category><![CDATA[warm-up effect]]></category>
		<guid isPermaLink="false">https://www.bugraparlayan.com.tr/?p=1505</guid>

					<description><![CDATA[<p>Recently, we noticed performance drops at certain times on an Exadata server operating as a data warehouse (DWH). Upon analyzing AWR reports, the following wait event stood out: direct path read/write temp waits We knew this event was caused by temporary (temp) data being written to or read from disk during query execution. Although we &#8230;</p>
<p>The post <a rel="nofollow" href="https://www.bugraparlayan.com.tr/creating-an-asm-disk-on-exadata-flashdisk.html">Creating an ASM Disk on Exadata FlashDisk</a> appeared first on <a rel="nofollow" href="https://www.bugraparlayan.com.tr">Bugra Parlayan | Oracle Database &amp; Exadata Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Recently, we noticed performance drops at certain times on an Exadata server operating as a data warehouse (DWH). Upon analyzing <strong>AWR reports</strong>, the following wait event stood out:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>direct path read/write temp waits</p>
</blockquote>



<p>We knew this event was caused by temporary (temp) data being written to or read from disk during query execution. Although we had applied various SQL optimizations, they did not significantly reduce the wait times.</p>



<h3 class="wp-block-heading"><strong>Root Cause: Heavy TEMP Tablespace Usage</strong></h3>



<p>Large SQL queries in data warehouses—especially those involving operations like hash joins, sorts, and group by—require extensive use of TEMP space. In our case, the <strong>TEMP tablespace</strong> was located on <em>high-latency</em> disk groups by default, which increased IO wait times.</p>



<h3 class="wp-block-heading"><strong>Solution: Move TEMP Tablespace to FlashDisk on Exadata</strong></h3>



<p>To directly improve performance, we decided to move the TEMP tablespace to the <strong>FlashDisk</strong> layer on Exadata. This layer offers much higher IO throughput compared to traditional disks, making it particularly advantageous for handling temporary data operations.</p>



<p><br>P.S. Since we will drop and recreate the existing flash disks during this operation, there may be minor negative impacts during the process and until the flash cache warms up again. Therefore, this work should be performed during a planned and quiet maintenance window.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
dcli –g cell_group –l root cellcli -e &quot;alter flashcache all flush&quot;
dcli -g cell_group -l root cellcli -e &quot;LIST CELLDISK ATTRIBUTES name, flushstatus, flusherror&quot; | grep FD
dcli -g cell_group -l root cellcli -e drop flashcache
dcli -g cell_group -l root cellcli -e create flashcache all size=20.2875976562500T;
dcli -g cell_group -l root cellcli -e CREATE GRIDDISK ALL FLASHDISK PREFIX='FLASHTMP';

</pre></div>

<div class="wp-block-syntaxhighlighter-code "><pre class="brush: sql; title: ; notranslate">
sqlplus / as sysasm

alter system set asm_diskstring='o/*/DATA_*','o/*/RECO_*','o/*/FLASHTMP*';

CREATE diskgroup TEMPDG normal redundancy disk 'o/*/FLASHTMP*' attribute 'compatible.rdbms'='19.0.0.0.0', 'compatible.asm'='19.0.0.0.0', 'cell.smart_scan_capable'='TRUE', 'au_size'='4M';
</pre></div>

<div class="wp-block-syntaxhighlighter-code "><pre class="brush: sql; title: ; notranslate">
sqlplus &amp; as sysdba

CREATE TEMPORARY TABLESPACE TEMP_FLASH TEMPFILE '+ TEMPDG' SIZE 32G EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;

ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP_FLASH;

DROP TABLESPACE TEMP INCLUDING CONTENTS AND DATAFILES;

</pre></div><p>The post <a rel="nofollow" href="https://www.bugraparlayan.com.tr/creating-an-asm-disk-on-exadata-flashdisk.html">Creating an ASM Disk on Exadata FlashDisk</a> appeared first on <a rel="nofollow" href="https://www.bugraparlayan.com.tr">Bugra Parlayan | Oracle Database &amp; Exadata Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Oracle ORA-4031 Error: Analysis and Solutions</title>
		<link>https://www.bugraparlayan.com.tr/oracle-ora-4031-error-analysis-and-solutions.html</link>
		
		<dc:creator><![CDATA[Bugra Parlayan]]></dc:creator>
		<pubDate>Sun, 13 Jul 2025 15:23:14 +0000</pubDate>
				<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[cursor sharing]]></category>
		<category><![CDATA[fragmentation]]></category>
		<category><![CDATA[hard parse]]></category>
		<category><![CDATA[large pool]]></category>
		<category><![CDATA[library cache]]></category>
		<category><![CDATA[memory allocation]]></category>
		<category><![CDATA[ORA-04031]]></category>
		<category><![CDATA[SGA]]></category>
		<category><![CDATA[shared pool]]></category>
		<guid isPermaLink="false">https://www.bugraparlayan.com.tr/?p=1496</guid>

					<description><![CDATA[<p>Introduction: What the ORA-4031 Error Means and Why It&#8217;s Important In Oracle database management, some errors are signs of deeper, system-wide problems, not just simple mistakes. The ORA-04031: unable to allocate bytes of shared memory error is one of the most well-known and critical examples. This error message means that Oracle cannot find a large &#8230;</p>
<p>The post <a rel="nofollow" href="https://www.bugraparlayan.com.tr/oracle-ora-4031-error-analysis-and-solutions.html">Oracle ORA-4031 Error: Analysis and Solutions</a> appeared first on <a rel="nofollow" href="https://www.bugraparlayan.com.tr">Bugra Parlayan | Oracle Database &amp; Exadata Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Introduction: What the ORA-4031 Error Means and Why It&#8217;s Important</h2>



<p>In Oracle database management, some errors are signs of deeper, system-wide problems, not just simple mistakes. The <code>ORA-04031: unable to allocate bytes of shared memory</code> error is one of the most well-known and critical examples. This error message means that Oracle cannot find a large enough piece of memory in its shared memory area, known as the System Global Area (SGA).<sup></sup> It might look like a simple &#8220;out of memory&#8221; problem, but &nbsp;</p>



<p><code>ORA-04031</code> often points to bigger issues in database configuration, application design, or memory management.</p>



<p>When this error happens, it can cause slow database performance, application errors, or even stop users from connecting to the system. For a Database Administrator (DBA), it&#8217;s very important not just to fix the <code>ORA-04031</code> error for the moment, but to understand its root cause to prevent it from happening again. The error is usually a &#8220;symptom,&#8221; while the real &#8220;illness&#8221; could be memory fragmentation, bad application code, or not enough resources planned.</p>



<p>This detailed report is designed to explain all parts of the <code>ORA-04031</code> error. It will cover everything from the basic anatomy of the error, its place in Oracle&#8217;s memory structure, modern and traditional ways to diagnose it, the use of advanced tools like SQL Trace and TKPROF, quick and long-term solutions, and finally, how to prevent it. This document aims to be the ultimate guide for Oracle professionals when they face the <code>ORA-04031</code> error, helping them move from reactive problem-solving to proactive system management.</p>



<h2 class="wp-block-heading">Chapter 1: The Anatomy of the ORA-4031 Error: What It Is and Why It Happens</h2>



<p>To solve the <code>ORA-04031</code> error effectively, you first need to understand the message itself and the reasons behind it. This error is a result, and following the chain of causes that lead to it is the first step to a correct diagnosis.</p>



<h3 class="wp-block-heading">1.1. Decoding the Error Message: &#8220;unable to allocate bytes of shared memory&#8221;</h3>



<p>The <code>ORA-04031</code> error message from Oracle gives valuable clues about the source of the problem. A typical error message looks like this: <code>ORA-04031: unable to allocate 4160 bytes of shared memory ("shared pool","unknown object","sga heap(1,0)","modification ")</code>.<sup></sup> &nbsp;</p>



<p>When we break down this message, we get this key information:</p>



<ul class="wp-block-list">
<li><strong>Requested Memory Size:</strong> The <code>bytes</code> value in the message (for example, <code>4160 bytes</code>) shows the amount of memory that Oracle could not find at that moment. Whether this size is large or small gives the first clue about the problem. If even a small memory request fails, it usually points to memory fragmentation.  </li>



<li><strong>Memory Pool:</strong> This is the most important piece of information, showing which part of the SGA the error happened in. The most common values are <code>"shared pool"</code>, <code>"large pool"</code>, or <code>"java pool"</code>. This information helps the DBA focus directly on the right memory area. For example, if the error is in the   <code>"large pool"</code>, you should focus on the <code>LARGE_POOL_SIZE</code> parameter, not <code>SHARED_POOL_SIZE</code>.  </li>



<li><strong>Memory Structure Details:</strong> The extra arguments in quotes (like <code>"unknown object"</code>, <code>"sga heap(1,0)"</code>, <code>"kglseshtTable"</code>) give more technical details about what kind of memory structure Oracle was trying to allocate. This information can be valuable for advanced analysis or when working with Oracle Support.  </li>
</ul>



<p>This error message is like a report from a crime scene. It doesn&#8217;t name the culprit directly, but it gives important evidence about where and how the crime happened.</p>



<h3 class="wp-block-heading">1.2. The Victim and the Culprit: Why the Process Getting the Error is Usually Innocent</h3>



<p>A common mistake when analyzing an <code>ORA-04031</code> error is to think that the process or SQL query that received the error is the problem. However, Oracle experts and documentation make a clear distinction: the process that gets the error is usually the &#8220;victim,&#8221; not the &#8220;culprit.&#8221;<sup></sup> &nbsp;</p>



<p>Understanding this changes the entire diagnosis process. A user might get an <code>ORA-04031</code> error while running a simple <code>SELECT</code> query or an application calling a small PL/SQL block. The memory request from this process is usually very small. The problem is not the small request itself, but the fact that at that moment, there was no single piece of free space big enough in the shared pool.</p>



<p>The real culprit is usually other processes or the general behavior of the application that used up or fragmented the memory over time. For example, if hundreds of different users send similar but textually different SQL queries without using bind variables, the shared pool gets filled with thousands of small, non-reusable SQL plans. This slowly fragments the memory. Eventually, when an innocent process makes a small memory request, the <code>ORA-04031</code> error is triggered because there is no single piece of free space large enough.</p>



<p>Therefore, a DBA&#8217;s first reaction should be, &#8220;What happened to the shared pool that it can&#8217;t even handle this small request?&#8221; instead of &#8220;What&#8217;s wrong with this query?&#8221; This perspective shifts the investigation from a single query to the memory usage habits of the entire system, greatly increasing the chance of finding the true root cause.</p>



<h3 class="wp-block-heading">1.3. The Main Causes: Not Enough Memory, Fragmentation, and Application Errors</h3>



<p>The main reasons behind the <code>ORA-04031</code> error can be grouped into a few main categories <sup></sup>: &nbsp;</p>



<ul class="wp-block-list">
<li><strong>Insufficient Sizing:</strong> This is the simplest and most obvious reason. The memory pool sizes set in the database startup parameters (<code>init.ora</code> or <code>spfile</code>), like <code>SHARED_POOL_SIZE</code>, <code>LARGE_POOL_SIZE</code>, or <code>JAVA_POOL_SIZE</code>, might be too low for the current workload. If you are using Automatic Memory Management (AMM/ASMM), the overall   <code>SGA_TARGET</code> or <code>MEMORY_TARGET</code> parameters being too small can also cause this.</li>



<li><strong>Memory Fragmentation:</strong> This is the most common and hardest cause to diagnose. In this scenario, there might be enough total free memory in the shared pool, but it&#8217;s broken into small, scattered pieces. When Oracle requests a single 4 KB piece of memory, even if there&#8217;s 100 MB of total free space, the request will fail if the largest single free piece is only 2 KB. The number one cause of fragmentation is applications sending literal SQL queries without using bind variables.  </li>



<li><strong>Application Design Flaws:</strong> This category is the root of fragmentation.
<ul class="wp-block-list">
<li><strong>Using Literal SQL:</strong> Queries like <code>SELECT * FROM employees WHERE id = 101;</code> and <code>SELECT * FROM employees WHERE id = 102;</code> are seen by Oracle as two completely different queries, and each gets its own space in the shared pool. If a structure with bind variables like <code>SELECT * FROM employees WHERE id = :p_id;</code> was used instead, the query would be &#8220;parsed&#8221; once, and the same plan would be reused for thousands of different <code>id</code> values. This is the key to using the shared pool efficiently.  </li>



<li><strong>Too Much Dynamic SQL:</strong> Applications that constantly generate different SQL texts cause a similar effect.</li>
</ul>
</li>



<li><strong>Oracle Bugs or Memory Leaks:</strong> Although less common, there might be a software bug in the Oracle version or a specific feature you are using. This bug could cause memory not to be released properly after use (a memory leak), which can lead to the shared pool running out of space over time. This should be considered, especially if the error happens repeatedly after certain operations (like an RMAN backup or DDL operations). That&#8217;s why checking for known bugs on My Oracle Support (MOS) is a standard step when investigating the problem.  </li>
</ul>



<h2 class="wp-block-heading">Chapter 2: The Heart of the Error: Oracle Memory Architecture and SGA Components</h2>



<p>To fully understand the <code>ORA-04031</code> error, you need to know about Oracle&#8217;s memory architecture, especially the System Global Area (SGA) and its components. This error is a memory allocation problem that happens in the shared memory pools within the SGA. Therefore, knowing what these pools do and how they work is essential for diagnosis and solution.</p>



<h3 class="wp-block-heading">2.1. System Global Area (SGA): The Database&#8217;s Shared Memory Area</h3>



<p>The System Global Area (SGA) is a group of shared memory structures that contain data and control information for an Oracle database instance. The SGA is used by all server and background processes together.<sup></sup> The SGA is allocated when a database instance starts and is released when it shuts down. This area aims to minimize disk I/O operations by keeping critical data that directly affects database performance in memory. &nbsp;</p>



<p>The SGA is made up of several main components <sup></sup>: &nbsp;</p>



<ul class="wp-block-list">
<li><strong>Database Buffer Cache:</strong> Stores copies of data blocks read from data files.</li>



<li><strong>Redo Log Buffer:</strong> Temporarily holds &#8220;redo&#8221; entries that record changes made to the database.</li>



<li><strong>Shared Pool:</strong> Caches program data and shared SQL areas. This is where the <code>ORA-04031</code> error happens most often.</li>



<li><strong>Large Pool:</strong> An optional area used for large memory allocations.</li>



<li><strong>Java Pool:</strong> Used to store Java code and data within the JVM.</li>



<li><strong>Fixed SGA:</strong> An internal area that contains general information about the state of the database.</li>
</ul>



<h3 class="wp-block-heading">2.2. Shared Pool: Where the Error Happens Most Often</h3>



<p>The Shared Pool is one of the most complex and dynamic components of the SGA. Almost every operation in the database touches this area.<sup></sup> When a SQL query is run, Oracle accesses this pool. That&#8217;s why the vast majority of &nbsp;</p>



<p><code>ORA-04031</code> errors occur in this pool. The main sub-components of the Shared Pool are:</p>



<ul class="wp-block-list">
<li><strong>Library Cache:</strong> This is where executable SQL and PL/SQL code is cached. This is the main battleground for <code>ORA-04031</code>. When a SQL query is run for the first time, Oracle parses it, creates the best execution plan, and stores this plan in the Library Cache. This is called a <strong>&#8220;hard parse&#8221;</strong> and is expensive in terms of CPU and memory. If the same SQL query is run again later, Oracle reuses the existing plan from the Library Cache. This is called a <strong>&#8220;soft parse&#8221;</strong> and is much more efficient. The use of literal SQL, one of the main causes of   <code>ORA-04031</code>, makes every query unique, eliminating the possibility of a &#8220;soft parse&#8221; and causing constant &#8220;hard parses,&#8221; which fills up the Library Cache.</li>



<li><strong>Data Dictionary Cache:</strong> Holds metadata about database objects (tables, indexes, users, etc.). It&#8217;s also known as the row cache. Oracle frequently accesses this cache during SQL parsing.  </li>



<li><strong>Reserved Pool:</strong> This is a special area within the Shared Pool, set aside for large memory allocations. Oracle usually tries to satisfy memory requests larger than 5 KB from this reserved pool. The purpose of this mechanism is to prevent large memory requests from fragmenting the main part of the Shared Pool. A DBA can control the size of this area with the   <code>SHARED_POOL_RESERVED_SIZE</code> startup parameter. When analyzing an <code>ORA-04031</code> error, it&#8217;s important to know if the error occurred in the Reserved Pool or the general area of the Shared Pool.</li>
</ul>



<h3 class="wp-block-heading">2.3. Large Pool and Java Pool: Other Potential Error Spots</h3>



<p>The <code>ORA-04031</code> error message clearly states that the problem is not always in the Shared Pool; it can sometimes be in other SGA components like the Large Pool or Java Pool.<sup></sup> &nbsp;</p>



<ul class="wp-block-list">
<li><strong>Large Pool:</strong> This is an optional memory area, and its purpose is to hold large memory allocations that are not suitable for the Shared Pool. The most important difference between the Large Pool and the Shared Pool is that it does not have an LRU (Least Recently Used) mechanism. Memory allocated here stays until it is released by the session that requested it. This prevents fragmentation for large objects. The main scenarios where the Large Pool is used are :
<ul class="wp-block-list">
<li><strong>Recovery Manager (RMAN):</strong> Uses large amounts of memory for I/O buffers during backup and restore operations.</li>



<li><strong>Parallel Query:</strong> Memory buffers for messaging between parallel processes are kept here.</li>



<li><strong>Shared Server:</strong> Memory allocations for the User Global Area (UGA) are made from the Large Pool. If the <code>ORA-04031</code> error message contains the phrase <code>"large pool"</code>, the solution is to directly increase the <code>LARGE_POOL_SIZE</code> parameter.  </li>
</ul>
</li>



<li><strong>Java Pool:</strong> This pool is used to store all session-specific Java code and data inside the Oracle Java Virtual Machine (JVM). Even if a DBA does not use Java code directly, Oracle may use Java for some internal operations. So, this pool is always present. If the error message specifies   <code>"java pool"</code>, the problem is caused by an insufficient <code>JAVA_POOL_SIZE</code> parameter, and its value should be increased.</li>
</ul>



<h2 class="wp-block-heading">Chapter 3: Diagnosis and Analysis: Finding the Source of the Problem</h2>



<p>When you encounter an <code>ORA-04031</code> error, it&#8217;s key to follow a systematic diagnosis process without panicking to correctly identify the source of the problem. This process includes both modern automatic tools provided by Oracle and manual analysis methods based on a DBA&#8217;s experience.</p>



<h3 class="wp-block-heading">3.1. First Steps: Checking the Alert Log and Trace Files</h3>



<p>As with any critical database issue, the first place to look is the database&#8217;s <code>alert.log</code> file. Oracle records important events, errors, and structural changes in this file.</p>



<ul class="wp-block-list">
<li>If the <code>ORA-04031</code> error was triggered by a background process (like <code>DM00</code>, <code>SMON</code>), the error and related details are written to the <code>alert.log</code>. This log entry usually also includes the location of a trace file (<code>.trc</code>) created at the time of the error. This trace file provides invaluable information about the process state and a memory dump at the time of the error.  </li>



<li>However, if the error was received by a user process, there may be no record in the <code>alert.log</code>. This once again confirms the &#8220;victim and culprit&#8221; paradigm. The error is reported to the end-user or application but may not leave a trace in the database logs. Therefore, not finding anything in the   <code>alert.log</code> doesn&#8217;t mean there&#8217;s no problem; it just means the diagnosis needs to shift in another direction.</li>
</ul>



<h3 class="wp-block-heading">3.2. Oracle&#8217;s Modern Solution: Autonomous Health Framework (AHF) and MOS Troubleshooting Tool</h3>



<p>Oracle offers powerful tools to simplify and automate the diagnosis of complex errors like <code>ORA-04031</code>. This modern approach saves time and minimizes human error, especially in emergencies.<sup></sup> &nbsp;</p>



<ul class="wp-block-list">
<li><strong>Autonomous Health Framework (AHF):</strong> AHF is a set of tools that autonomously monitors database system health and proactively detects problems. For the <code>ORA-04031</code> error, AHF can create a special diagnostic package called a Service Request Data Collection (SRDC). In the past, a DBA had to manually collect many different pieces of data like the <code>alert.log</code>, trace files, and AWR reports for Oracle Support. AHF automates this process with a single command. Running the following command as the Oracle user on the server where the error occurred is enough:   <code>$ tfactl diagcollect -srdc ora4031</code> AHF will ask for the time of the error and the database name, then collect all relevant diagnostic data, including from the operating system, database, and cluster software, and package it into a <code>.zip</code> file.  </li>



<li><strong>My Oracle Support (MOS) Troubleshooting Tool:</strong> The diagnostic package created by AHF can be uploaded to the <code>ORA-04031</code> troubleshooting tool on the MOS portal. This web-based tool analyzes the uploaded data, compares signatures from logs and memory dumps with known errors and issues in Oracle&#8217;s vast knowledge base. As a result of the analysis, the tool usually provides a specific patch, a configuration change recommendation, or a document related to a known bug that will solve the problem. If the tool cannot find a solution, a new Service Request (SR) can be created for Oracle Support with a single click from the same interface, and all the collected diagnostic data is automatically attached to the request.  </li>
</ul>



<h3 class="wp-block-heading">3.3. In-Depth Analysis with V$ Dynamic Performance Views</h3>



<p>While automatic tools are powerful, an experienced DBA uses Oracle&#8217;s dynamic performance views (V$ views) to understand and analyze the problem themselves. These views provide real-time information about the database&#8217;s memory structures.</p>



<ul class="wp-block-list">
<li><code>V$SGASTAT</code>: This view shows the overall memory usage of the SGA and the distribution within the pools. A simple query like <code>SELECT POOL, NAME, BYTES FROM V$SGASTAT ORDER BY BYTES DESC;</code> can quickly show which pool and which type of memory allocations within the pool are taking up the most space. The size of the   <code>"free memory"</code> row, in particular, gives an idea of the total free space in the pool.</li>



<li><code>V$SHARED_POOL_RESERVED</code>: This is the most critical view for understanding whether the cause of the <code>ORA-04031</code> error is <strong>fragmentation or insufficient space</strong>. The columns in this view provide detailed information about the health of the reserved pool.  </li>



<li><code>V$LIBRARYCACHE</code>: This view measures the effectiveness of the Library Cache. A high value in the <code>RELOADS</code> column indicates that SQL or PL/SQL objects are being kicked out of the cache and reloaded too frequently. This is often a sign that the shared pool is too small for the workload.  </li>



<li><code>V$SHARED_POOL_ADVICE</code>: This advisor view provides an estimate of how the library cache hit ratio and parse times would be affected if the <code>SHARED_POOL_SIZE</code> parameter were set to different values. This offers a data-driven approach when deciding to resize the shared pool.  </li>
</ul>



<p>The table below summarizes the most important columns in the <code>V$SHARED_POOL_RESERVED</code> view and their meaning in diagnosing <code>ORA-04031</code>.</p>



<h4 class="wp-block-heading">Table 1: Meanings and Interpretation of <code>V$SHARED_POOL_RESERVED</code> Columns</h4>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><td>Column</td><td>Meaning and Interpretation</td></tr></thead><tbody><tr><td><code>REQUEST_FAILURES</code></td><td>The total number of times a memory request could not be met and an <code>ORA-04031</code> error was generated. A value greater than zero indicates an active memory allocation problem in the system.<sup></sup> &nbsp;</td></tr><tr><td><code>LAST_FAILURE_SIZE</code></td><td>The size in bytes of the last failed memory request. This value is key to understanding the root of the problem. Whether this size is larger or smaller than the <code>_shared_pool_reserved_min_alloc</code> parameter determines if the problem is fragmentation or a general lack of space.<sup></sup> &nbsp;</td></tr><tr><td><code>REQUEST_MISSES</code></td><td>The number of requests that caused an object to be flushed from the LRU (Least Recently Used) list because no space was found in the free list. A high value indicates heavy pressure on the pool and that Oracle is constantly kicking out objects to make space.<sup></sup> &nbsp;</td></tr><tr><td><code>FREE_SPACE</code></td><td>The total amount of free space in the Reserved Pool in bytes. A high value here might suggest that the problem is not a lack of total free space, but likely fragmentation.<sup></sup> &nbsp;</td></tr><tr><td><code>AVG_FREE_SIZE</code></td><td>The average size of a free memory chunk in the Reserved Pool. If this value is significantly smaller than <code>LAST_FAILURE_SIZE</code>, it is strong evidence that the memory is broken into small pieces and fragmentation is high.<sup></sup> &nbsp;</td></tr></tbody></table></figure>



<p>Using this data, a critical distinction can be made about the nature of the problem. If <code>REQUEST_FAILURES</code> is greater than zero and <code>LAST_FAILURE_SIZE</code> is small (for example, smaller than the default value of the <code>_shared_pool_reserved_min_alloc</code> parameter, which is about 4400 bytes), this indicates that the system cannot allocate even a small block of memory. This is the clearest sign of severe memory fragmentation.<sup></sup> The solution is not to increase the memory size, but to fix the application behavior (usually the use of literal SQL) that is causing the fragmentation. &nbsp;</p>



<p>Conversely, if <code>LAST_FAILURE_SIZE</code> is large, this indicates that the application legitimately needs large blocks of memory, but the space allocated by <code>SHARED_POOL_RESERVED_SIZE</code> is insufficient to meet these demands. In this scenario, the solution is to increase the <code>SHARED_POOL_RESERVED_SIZE</code> and therefore the <code>SHARED_POOL_SIZE</code> parameters.<sup></sup> This simple but powerful distinction allows the DBA to focus their efforts in the right direction. &nbsp;</p>



<h2 class="wp-block-heading">Chapter 4: Root Cause Analysis: Finding Performance Bottlenecks with SQL Trace and TKPROF</h2>



<p>While <code>V$</code> views tell us &#8220;what&#8221; and &#8220;where&#8221; the problem is (an <code>ORA-04031</code> error is happening in the shared pool due to fragmentation), tools like SQL Trace and TKPROF help us answer the &#8220;why&#8221; question. These tools are used to identify the destructive application behaviors, especially the SQL queries that use the shared pool inefficiently, leading to the <code>ORA-04031</code> error.</p>



<h3 class="wp-block-heading">4.1. What are SQL Trace and TKPROF? Their Role in ORA-04031 Analysis</h3>



<ul class="wp-block-list">
<li><strong>SQL Trace:</strong> A mechanism in Oracle that allows collecting detailed performance statistics for SQL queries run in a specific session or across the entire system. When enabled, it writes data for each SQL query&#8217;s parse, execute, and fetch phases—such as CPU time, elapsed time, disk reads, and logical reads—to a <code>.trc</code> (trace) file.  </li>



<li><strong>TKPROF (Transient Kernel Profiler):</strong> A command-line utility that turns the raw and hard-to-read <code>.trc</code> files produced by SQL Trace into a summarized and formatted report that is easy for humans to understand.  </li>
</ul>



<p>Although <code>ORA-04031</code> is not directly a performance problem (like a slow query), it is often a side effect of habits that lead to poor performance. TKPROF reports are invaluable for revealing the biggest culprit of shared pool fragmentation: SQL queries that are &#8220;hard parsed&#8221; frequently and not reused.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">4.2. Step-by-Step Guide to Activating SQL Trace and Creating a TKPROF Report</h3>



<p>The following steps can be followed to trace a problematic application session:</p>



<ol start="1" class="wp-block-list">
<li><strong>Enable Tracing:</strong> In modern Oracle versions (10g and later), it is recommended to use the <code>DBMS_MONITOR</code> package for this. This provides more flexible and centralized control. After finding the SID and SERIAL# of the problematic session from   <code>V$SESSION</code>, tracing can be started with this command:SQL<code>EXEC DBMS_MONITOR.SESSION_TRACE_ENABLE(session_id => :sid, serial_num => :serial, waits => TRUE, binds => TRUE); </code>Setting the <code>waits</code> and <code>binds</code> parameters to <code>TRUE</code> collects additional information about wait events and bind variable values, allowing for a richer analysis. Alternatively, the <code>ALTER SESSION SET SQL_TRACE = TRUE;</code> command can be used from within the session itself.  </li>



<li><strong>Run the Application:</strong> After tracing is enabled, the user or application is expected to perform the actions that cause the error. During this time, all SQL activities are recorded in the trace file.</li>



<li><strong>Disable Tracing:</strong> It is very important to turn off tracing after the process is complete, otherwise it will unnecessarily consume disk space and create a performance load.SQL<code>EXEC DBMS_MONITOR.SESSION_TRACE_DISABLE(session_id => :sid, serial_num => :serial);</code></li>



<li><strong>Create a TKPROF Report:</strong> The trace file is located in the <code>USER_DUMP_DEST</code> (or <code>DIAGNOSTIC_DEST</code> in 11g and later) directory on the database server. A report is generated by running the <code>tkprof</code> command on this file:Bash<code>tkprof &lt;trace_file_name.trc> &lt;report_file_name.txt> explain=user/pass sort=(prscnt,exeela,fchela) sys=no </code>The <code>sort</code> parameter here makes the report sort the SQL queries by specific criteria (e.g., parse count <code>prscnt</code>, execute time <code>exeela</code>), which brings the most problematic queries to the top.  </li>
</ol>



<h3 class="wp-block-heading">4.3. Interpreting the TKPROF Report: Finding High &#8220;Parse&#8221; Counts and Resource-Hungry SQL</h3>



<p>The TKPROF report dedicates a section to each SQL query in the traced session. The most critical part for <code>ORA-04031</code> analysis is the statistics table provided for each query:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: sql; title: ; notranslate">
call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        1      0.00       0.00          0          0          0           0
Execute   1000      0.10       0.09          0        120          5        1000
Fetch     1000      0.05       0.04          0       2000          0        1000
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total     2001      0.15       0.13          0       2120          5        2000

</pre></div>


<p>The red flag that points to the root cause of <code>ORA-04031</code> in this table is the relationship between the numbers in the <code>Parse</code> and <code>Execute</code> columns. In a well-designed application that uses bind variables, a SQL query is parsed once (<code>Parse count = 1</code>) and executed thousands of times (<code>Execute count = 1000s</code>). This shows that the shared pool is being used efficiently.</p>



<p>However, if a table like the one below is seen in the TKPROF report, it indicates a serious problem:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse     1000      0.80       0.95          0          0          0           0
Execute   1000      0.10       0.09          0        120          5        1000
...

</pre></div>


<p>Here, the fact that the <strong><code>Parse count</code> (1000) is equal to the <code>Execute count</code> (1000)</strong> is definitive proof that this query is being &#8220;hard parsed&#8221; again every time it is executed. This shows that the application is not using bind variables and is sending a textually new query to Oracle each time. This behavior quickly fills up the shared pool, causes fragmentation, and eventually sets the stage for an <code>ORA-04031</code> error. Queries that show this pattern in a TKPROF report are the number one targets for correction.</p>



<h3 class="wp-block-heading">4.4. Identifying Non-Shared SQL: <code>V$SQLAREA</code> and the Literal SQL Problem</h3>



<p>It&#8217;s not always possible or practical to get a trace file. Fortunately, the <code>V$SQLAREA</code> view, which reflects the current state of the Library Cache in the shared pool, allows for the same analysis in real-time. This view contains one row for each unique SQL query in the shared pool.</p>



<p>An application using literal SQL fills <code>V$SQLAREA</code> with queries like these:</p>



<ul class="wp-block-list">
<li><code>SELECT * FROM T WHERE C = 'A'</code></li>



<li><code>SELECT * FROM T WHERE C = 'B'</code></li>



<li><code>SELECT * FROM T WHERE C = 'C'</code></li>
</ul>



<p>These three queries take up space as different rows with different <code>SQL_ID</code>s in <code>V$SQLAREA</code>. To group such similar queries, Oracle creates a signature called <code>FORCE_MATCHING_SIGNATURE</code>. This signature represents the structure of the query, ignoring the literal values. This way, queries with the same structure but different literals can be identified.</p>



<p>The table below provides practical SQL queries that can be used to identify non-shareable (literal) SQL queries and the problems they cause, using the <code>V$SQLAREA</code> view.</p>



<h4 class="wp-block-heading">Table 2: Queries to Detect Literal SQLs Using <code>V$SQLAREA</code></h4>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><td>Purpose</td><td>SQL Query</td><td>Interpretation</td></tr></thead><tbody><tr><td><strong>Find Queries That Are Parsed Frequently</strong></td><td><code>SELECT executions, parsing_schema_name, sql_text FROM v$sqlarea WHERE executions &lt; 5 AND parsing_schema_name NOT IN ('SYS', 'SYSTEM') ORDER BY sql_text;</code></td><td>This query lists queries that have been run very few times (<code>&lt; 5</code>), meaning they are not being reused. Seeing many very similar queries in the result list (only differing in the values in the <code>WHERE</code> clause) is a sign of literal SQL usage.<sup></sup> &nbsp;</td></tr><tr><td><strong>Count How Many Different Versions of the Same Query Exist</strong></td><td><code>SELECT COUNT(*), force_matching_signature FROM v$sqlarea GROUP BY force_matching_signature HAVING COUNT(*) &gt; 20 ORDER BY COUNT(*) DESC;</code></td><td>This query uses <code>force_matching_signature</code> to group structurally identical queries and counts how many different versions are in each group. A high number (e.g., <code>&gt; 20</code>) indicates that the SQL structure is being run constantly with different literals, polluting the shared pool. This directly points to one of the most common causes of <code>ORA-04031</code>.</td></tr></tbody></table></figure>



<p>The results of these queries show the DBA which application or schema is polluting the shared pool the most and provide a clear roadmap on where to focus correction efforts.</p>



<h2 class="wp-block-heading">Chapter 5: Solution Strategies: Quick Fixes and Permanent Solutions</h2>



<p>When dealing with an <code>ORA-04031</code> error, solutions should be considered in a hierarchy. Some solutions are temporary &#8220;band-aids&#8221; that quickly get the system running again, others treat the symptoms of the problem, and the most effective ones are permanent &#8220;cures&#8221; that eliminate the root cause of the disease. A DBA&#8217;s job is to choose the right solution for the situation and aim for permanent solutions in the long run.</p>



<h3 class="wp-block-heading">5.1. Temporary Solutions: Getting the System Up and Running Quickly (Band-Aids)</h3>



<p>These solutions are used to immediately stop the <code>ORA-04031</code> errors that are interrupting the system&#8217;s operation. However, since they do not solve the underlying problem, the error is likely to reappear shortly after.</p>



<ul class="wp-block-list">
<li><code>ALTER SYSTEM FLUSH SHARED_POOL;</code>: This command instantly clears all reloadable objects (SQL plans, PL/SQL packages, etc.) from the Shared Pool. This temporarily frees up space by merging fragmented memory, allowing new memory requests to be met.
<ul class="wp-block-list">
<li><strong>Warnings:</strong> This command should be used with care. Flushing the shared pool causes all SQL queries run after that moment to be &#8220;hard parsed&#8221; again. This can lead to a sudden spike in CPU usage and a drop in performance right after the command is run. Also, if the system is already suffering from a severe memory shortage, this command itself might not even work and could cause errors like   <code>ORA-01012: not logged on</code>. This is a temporary fix that only buys time until the next database restart, rather than solving the problem.  </li>
</ul>
</li>



<li><strong>Restarting the DB:</strong> This is the most definitive but most disruptive temporary solution. Restarting the database completely clears and rebuilds the entire SGA (and therefore the Shared Pool). This definitely gets rid of the   <code>ORA-04031</code> problem, but it causes the database to be out of service for a while. Needing to restart frequently is a clear sign that there is a serious underlying problem and that a reactive management approach is being used.</li>
</ul>



<h3 class="wp-block-heading">5.2. Permanent Configuration Solutions: Optimizing Memory Management (Symptom Treatment)</h3>



<p>These solutions are aimed at treating the symptoms of the error. Even if they don&#8217;t solve the underlying application problem, they can help the database cope better with the issue, delaying or preventing the error from occurring.</p>



<ul class="wp-block-list">
<li><strong>Increasing Pool Sizes:</strong> The most common first reaction to an <code>ORA-04031</code> error is to increase the size of the relevant memory pool. Depending on the pool mentioned in the error message, the following commands can be used :
<ul class="wp-block-list">
<li><code>ALTER SYSTEM SET SHARED_POOL_SIZE = '500M' SCOPE=BOTH;</code></li>



<li><code>ALTER SYSTEM SET LARGE_POOL_SIZE = '100M' SCOPE=BOTH;</code></li>



<li><code>ALTER SYSTEM SET SHARED_POOL_RESERVED_SIZE = '50M' SCOPE=BOTH;</code> This approach can be effective, especially in systems with legitimately high memory needs or mild fragmentation. However, if the main problem is severe fragmentation, increasing the pool size is just like &#8220;getting a bigger trash can&#8221;; the problem isn&#8217;t solved, its appearance is just delayed.  </li>
</ul>
</li>



<li><strong>Automatic Memory Management (AMM/ASMM):</strong> This is one of the most recommended approaches for modern Oracle databases. Instead of manually setting parameters like <code>SHARED_POOL_SIZE</code> and <code>DB_CACHE_SIZE</code>, Oracle is allowed to manage these pools dynamically.
<ul class="wp-block-list">
<li><strong>ASMM (Automatic Shared Memory Management):</strong> Enabled by setting the <code>SGA_TARGET</code> parameter. Oracle dynamically shifts memory between SGA components (Shared Pool, Buffer Cache, etc.) based on the workload. For example, when pressure on the Shared Pool increases, it can take memory from the Buffer Cache to grow the Shared Pool.</li>



<li><strong>AMM (Automatic Memory Management):</strong> Enabled by setting the <code>MEMORY_TARGET</code> parameter. This goes a step beyond ASMM by managing both SGA and PGA (Program Global Area) memory from a single pool. Automatic management significantly reduces the risk of <code>ORA-04031</code> because Oracle can proactively expand the relevant pool as soon as it feels memory pressure.  </li>
</ul>
</li>
</ul>



<h3 class="wp-block-heading">5.3. Root Cause Solutions: Improvements at the Application and Code Level (The Cure)</h3>



<p>These strategies solve the problem at its core and are the most important steps for long-term database health.</p>



<ul class="wp-block-list">
<li><strong>The Power of Bind Variables:</strong> The ultimate and most correct solution for <code>ORA-04031</code> errors caused by fragmentation is to ensure that applications use bind variables.  <ul><li><strong>Bad Practice (Literal SQL):</strong>SQL<code>// This code causes a new hard parse in every loop. for (int i=0; i&lt;1000; i++) { statement.executeQuery("SELECT * FROM products WHERE product_id = " + i); }</code></li><li><strong>Good Practice (Bind Variable):</strong>Java<code>// This code is parsed once, executed 1000 times. PreparedStatement pstmt = connection.prepareStatement("SELECT * FROM products WHERE product_id =?"); for (int i=0; i&lt;1000; i++) { pstmt.setInt(1, i); ResultSet rs = pstmt.executeQuery(); }</code></li></ul>This change dramatically reduces the load on the shared pool, prevents fragmentation, and improves overall database performance.</li>



<li><code>DBMS_SHARED_POOL.KEEP</code>: This Oracle package is used to &#8220;pin&#8221; frequently used and large PL/SQL packages, procedures, or SQL queries in the shared pool. A pinned object cannot be kicked out of the pool by the LRU algorithm and always stays in memory. This ensures that critical application code is always quickly accessible and prevents the fragmentation that could be caused by constantly reloading these objects. This is a targeted optimization technique, especially for large and complex PL/SQL-based applications. However, it should be used carefully, as pinning too much can leave insufficient space for new SQLs, leading to an   <code>ORA-04031</code> error.  </li>
</ul>



<h2 class="wp-block-heading">Chapter 6: Preventive Measures and Best Practices</h2>



<p>While solving the <code>ORA-04031</code> error is important, the ideal situation is to prevent this error from ever happening. This requires a shift from reactive responses to a proactive management philosophy. The following best practices provide a framework for maintaining the health of the database memory and minimizing the risk of <code>ORA-04031</code>.</p>



<h3 class="wp-block-heading">6.1. Proactive Memory Management and Regular Monitoring</h3>



<p>Instead of waiting for a problem to occur, it is crucial to regularly monitor the state of the database memory. This allows for the early detection of potential issues and intervention before they grow.</p>



<ul class="wp-block-list">
<li><strong>Regular Reporting:</strong> Use automated scripts to regularly collect data (e.g., daily or weekly) from views mentioned in Chapter 3, such as <code>V$SGASTAT</code>, <code>V$SHARED_POOL_RESERVED</code>, and <code>V$LIBRARYCACHE</code>. Tracking trends over time can show that memory usage is increasing or that fragmentation is slowly building up.</li>



<li><strong>Using Advisor Views:</strong> Periodically check advisor views like <code>V$SHARED_POOL_ADVICE</code> to assess whether the current shared pool size is still optimal for the workload.  </li>



<li><strong>AWR/Statspack Reports:</strong> Regularly analyze Automatic Workload Repository (AWR) or Statspack reports. The &#8220;Library Cache Activity&#8221; and &#8220;Memory Allocation&#8221; sections in these reports contain valuable information about high hard parse rates or memory issues.</li>
</ul>



<h3 class="wp-block-heading">6.2. Coding Standards: Creating a Culture of Avoiding Literal SQL</h3>



<p>Organizational processes are as important as technical solutions. Preventing the use of literal SQL, the most common cause of <code>ORA-04031</code> errors, requires collaboration between DBAs and development teams.</p>



<ul class="wp-block-list">
<li><strong>Developer Training:</strong> Provide regular training to development teams on what bind variables are, why they are important, and how to use them. Explain with concrete examples how the shared pool works and the negative impact of literal SQLs on the database.</li>



<li><strong>Code Review Processes:</strong> Include checks for database interactions in code review processes. Ensure that new code accessing the database uses bind variables.</li>



<li><strong>Static Code Analysis Tools:</strong> Use tools that automatically scan code that generates database queries to detect the use of literal SQL.</li>
</ul>



<p>This is a cultural change that prevents the problem at its source—in the application code—rather than trying to solve it at the database level.</p>



<h3 class="wp-block-heading">6.3. The Importance of Keeping the Database Version and Patches Up to Date</h3>



<p>In new database versions and regularly released patches (Release Updates &#8211; RU), Oracle continuously improves memory management algorithms and fixes known memory leaks or bugs.</p>



<ul class="wp-block-list">
<li><strong>Checking for Known Bugs:</strong> When an <code>ORA-04031</code> error is encountered, a standard step is to research known bugs for the used database version on My Oracle Support (MOS). The problem might be a known bug, and the solution could be as simple as applying a patch.  </li>



<li><strong>Regular Patching Strategy:</strong> Keeping databases up to date not only closes security vulnerabilities but also proactively protects against many known bugs that can cause such performance and stability issues. For example, it is known that Oracle 11g is more resilient to shared pool fragmentation than 10g.  </li>
</ul>



<p>These preventive measures make <code>ORA-04031</code> a rare event, allowing database administrators to spend their time on strategic improvements rather than firefighting.</p>



<h2 class="wp-block-heading">Chapter 7: Advanced Analysis: Diving Deep into Fragmentation with X$KSMSP</h2>



<p>While standard <code>V$</code> views are sufficient to diagnose most <code>ORA-04031</code> scenarios, sometimes it is necessary to go deeper into the problem and see the memory map of the shared pool in the finest detail. At this point, Oracle&#8217;s internal and undocumented <code>X$</code> tables come into play. <code>X$KSMSP</code> is one of the most powerful and dangerous of these tables.</p>



<h3 class="wp-block-heading">7.1. X$KSMSP: What It Is and Why It Should Be Used with Caution</h3>



<p><code>X$</code> tables are the raw data structures on which <code>V$</code> views are based. <code>X$KSMSP</code> (Kernel Services Memory Sga Pool) is a table that lists every single memory chunk in the shared pool heap. Each row contains the address, size, and status (<code>free</code>, <code>recreatable</code>, <code>freeable</code>, etc.) of a memory chunk.<sup></sup> This allows the shared pool to be examined as if under a microscope. &nbsp;</p>



<p>However, this power comes at a price. Querying the <code>X$KSMSP</code> table requires intensive access to the latches that protect the shared pool itself. A query run against this table on a busy production system can cause serious contention on the shared pool latches. This can worsen the existing memory problem and negatively affect the overall performance of the system. Therefore, many experts warn that querying <code>X$KSMSP</code> on a live production system is a &#8220;very bad idea.&#8221;<sup></sup> &nbsp;</p>



<p>This is a high-risk, high-reward diagnostic tool. Its use should be limited to the following situations:</p>



<ul class="wp-block-list">
<li>When all other diagnostic methods have been exhausted and the nature of the problem cannot be understood.</li>



<li>Ideally, in a test or development environment where the problem can be reproduced.</li>



<li>If it must be used in production, at a time when the system load is at its lowest or during a controlled maintenance window. Heeding these warnings is a sign of a mature and risk-aware database management approach.</li>
</ul>



<h3 class="wp-block-heading">7.2. Observing and Interpreting Memory Fragmentation Using X$KSMSP</h3>



<p>The power of <code>X$KSMSP</code> lies in visualizing the distribution of free memory in the shared pool. A query like the one below provides a clear picture of the fragmentation level by grouping free memory chunks by their size <sup></sup>: &nbsp;</p>



<p>SQL</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
SELECT
  ksmchcom AS chunk_comment,
  CASE
    WHEN ksmchsiz &amp;lt; 1024 THEN '00: &amp;lt; 1KB'
    WHEN ksmchsiz BETWEEN 1024 AND 4095 THEN '01: 1KB-4KB'
    WHEN ksmchsiz BETWEEN 4096 AND 8191 THEN '02: 4KB-8KB'
    ELSE '03: &gt; 8KB'
  END AS chunk_size_bucket,
  COUNT(*) AS chunk_count,
  SUM(ksmchsiz) AS total_bytes,
  TRUNC(AVG(ksmchsiz)) AS avg_bytes
FROM
  x$ksmsp
WHERE
  ksmchcls = 'free'
GROUP BY
  ksmchcom,
  CASE
    WHEN ksmchsiz &amp;lt; 1024 THEN '00: &amp;lt; 1KB'
    WHEN ksmchsiz BETWEEN 1024 AND 4095 THEN '01: 1KB-4KB'
    WHEN ksmchsiz BETWEEN 4096 AND 8191 THEN '02: 4KB-8KB'
    ELSE '03: &gt; 8KB'
  END
ORDER BY
  1, 2;

</pre></div>


<p>Interpreting the output of this query is key to diagnosing fragmentation:</p>



<ul class="wp-block-list">
<li><strong>A Healthy Pool:</strong> The output shows a significant number (<code>chunk_count</code>) and total size (<code>total_bytes</code>) of free memory chunks, especially in the large-sized groups (<code>> 8KB</code>). The number of chunks in the small-sized groups is lower.</li>



<li><strong>A Fragmented Pool:</strong> In the output, the total amount of free memory (<code>total_bytes</code>) may be high, but a large portion of this memory is concentrated in very small-sized groups (<code>&lt; 1KB</code>, <code>1KB-4KB</code>). The <code>chunk_count</code> is very high in small groups, while there are either none or very few in the large-sized groups (<code>> 8KB</code>).</li>
</ul>



<p>This output definitively proves that the cause of the <code>ORA-04031</code> error is not a lack of total free memory, but a lack of <strong>contiguous</strong> free memory. This confirms the findings from the <code>V$SHARED_POOL_RESERVED</code> view and reveals, without a doubt, that the root of the problem is memory fragmentation.</p>



<h2 class="wp-block-heading">Conclusion: Moving from Reactive Solutions to Proactive Management</h2>



<p>The <code>ORA-04031: unable to allocate bytes of shared memory</code> error is one of the most instructive problems in the Oracle database ecosystem. Behind a simple error message lie deep lessons about memory management, application design, and system monitoring philosophies. At the end of this comprehensive analysis, a few key conclusions emerge for dealing with and preventing this error.</p>



<p>The first and most important lesson is to internalize the <strong>&#8220;Victim and Culprit&#8221; paradigm</strong>. The fact that the process receiving the error is usually innocent, and the real culprit is a systemic behavior that consumes or fragments memory over time, channels diagnostic efforts in the right direction. This perspective takes DBAs out of the narrow scope of analyzing a single query and directs them to question the memory usage habits and application architecture of the entire system.</p>



<p>Secondly, it should be understood that solutions must be evaluated in a hierarchy. Emergency interventions like the <code>ALTER SYSTEM FLUSH SHARED_POOL</code> command or restarting the database are temporary band-aids that stop the bleeding but do not heal the wound. Configuration changes, such as increasing pool sizes or enabling Automatic Memory Management (AMM/ASMM), treat the symptoms and give the system more resilience. But the real and permanent &#8220;cure&#8221; is possible by getting to the root of the problem. For the vast majority of <code>ORA-04031</code> errors caused by fragmentation, this cure is to <strong>ensure the use of bind variables in the application code</strong>. This not only prevents <code>ORA-04031</code> but also reduces CPU usage, lowers &#8220;hard parse&#8221; rates, and increases overall database performance and scalability.</p>



<p>In conclusion, the <code>ORA-04031</code> error is rarely just a database configuration problem. It is often a mirror reflecting the quality and design of the applications running on it. To effectively combat this error, database administrators must move from a reactive &#8220;firefighting&#8221; mode to a proactive &#8220;system health management&#8221; mode. This transition includes practices such as regular monitoring, establishing coding standards in close collaboration with development teams, keeping the database up to date, and effectively using the modern diagnostic and management tools offered by Oracle. The ultimate goal is to turn <code>ORA-04031</code> from a moment of crisis into an opportunity to continuously improve the overall health and stability of the database ecosystem.</p>
<p>The post <a rel="nofollow" href="https://www.bugraparlayan.com.tr/oracle-ora-4031-error-analysis-and-solutions.html">Oracle ORA-4031 Error: Analysis and Solutions</a> appeared first on <a rel="nofollow" href="https://www.bugraparlayan.com.tr">Bugra Parlayan | Oracle Database &amp; Exadata Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Best Practices for Very Large Database (VLDB) Backup and Recovery:</title>
		<link>https://www.bugraparlayan.com.tr/best-practices-for-very-large-database-vldb-backup-and-recovery.html</link>
		
		<dc:creator><![CDATA[Bugra Parlayan]]></dc:creator>
		<pubDate>Sat, 14 Jun 2025 17:44:00 +0000</pubDate>
				<category><![CDATA[Engineered Systems]]></category>
		<category><![CDATA[archive logs]]></category>
		<category><![CDATA[backup retention]]></category>
		<category><![CDATA[differential backup]]></category>
		<category><![CDATA[full backup]]></category>
		<category><![CDATA[incremental backup]]></category>
		<category><![CDATA[point-in-time recovery]]></category>
		<category><![CDATA[recovery point objective]]></category>
		<category><![CDATA[recovery time objective]]></category>
		<category><![CDATA[restore strategy]]></category>
		<guid isPermaLink="false">https://www.bugraparlayan.com.tr/?p=1480</guid>

					<description><![CDATA[<p>1. Executive Summary Backing up and recovering Very Large Databases (VLDBs) presents a critical yet increasingly complex challenge for organizations in today&#8217;s data-driven world. With data volumes growing exponentially, traditional backup methods often fall short in meeting performance targets, Recovery Time Objectives (RTOs), and Recovery Point Objectives (RPOs). This report examines best practices in VLDB &#8230;</p>
<p>The post <a rel="nofollow" href="https://www.bugraparlayan.com.tr/best-practices-for-very-large-database-vldb-backup-and-recovery.html">Best Practices for Very Large Database (VLDB) Backup and Recovery:</a> appeared first on <a rel="nofollow" href="https://www.bugraparlayan.com.tr">Bugra Parlayan | Oracle Database &amp; Exadata Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">1. Executive Summary</h2>



<p>Backing up and recovering Very Large Databases (VLDBs) presents a critical yet increasingly complex challenge for organizations in today&#8217;s data-driven world. With data volumes growing exponentially, traditional backup methods often fall short in meeting performance targets, Recovery Time Objectives (RTOs), and Recovery Point Objectives (RPOs). This report examines best practices in VLDB backup and recovery, drawing on insights presented in Oracle MAA (Maximum Availability Architecture) blog posts, with a specific focus on Oracle&#8217;s Zero Data Loss Recovery Appliance (ZDLRA) solution.</p>



<p>The ZDLRA is a purpose-built engineered system designed to address these challenges. Its core strategies include &#8220;Incremental Forever&#8221; backups, which significantly reduce the load on production systems; real-time redo protection for near-zero data loss; and continuous recovery validation, enhancing the reliability of backups. <sup></sup> These features are tailored to meet the unique demands of VLDBs, offering substantial improvements in achieving RTO and RPO targets. Oracle&#8217;s development and promotion of a specialized hardware/software appliance like ZDLRA suggest that traditional, software-only backup methods are increasingly inadequate for the scale and criticality of modern VLDBs. This implies the problem&#8217;s complexity has reached a point where integrated hardware and software solutions offer a more effective approach than generic software tools running on general-purpose hardware. This is a significant paradigm shift in high-end backup and recovery strategies. Consequently, organizations managing VLDBs must assess whether their current backup infrastructure can realistically meet future demands or if a specialized appliance approach is becoming a necessity. &nbsp;</p>



<h2 class="wp-block-heading">2. Introduction to VLDB Backup and Recovery Challenges</h2>



<p>Very Large Databases (VLDBs) typically contain terabytes to petabytes of data and are continuously growing. The sheer size and complexity of these databases introduce unique challenges in backup and recovery processes.</p>



<ul class="wp-block-list">
<li><strong>Defining VLDBs and Their Criticality:</strong> VLDBs are central repositories for businesses&#8217; core operations, customer data, financial records, and other vital information. Therefore, any data loss or prolonged downtime in these systems can lead to severe financial losses, reputational damage, and legal repercussions. Business continuity and regulatory compliance are primary drivers for robust backup and recovery strategies for VLDBs.</li>



<li><strong>Common Pain Points:</strong>
<ul class="wp-block-list">
<li><strong>Backup Windows:</strong> Completing full backups of VLDBs within limited timeframes without an acceptable impact on production performance is extremely difficult. As database size increases, full backup times lengthen, often encroaching on business hours and negatively affecting system performance.</li>



<li><strong>Recovery Time Objectives (RTO):</strong> Restoring and recovering massive databases quickly enough to meet business needs in the event of a disaster or failure is a major hurdle. Long recovery times lead to extended business disruptions and, consequently, increased costs.</li>



<li><strong>Recovery Point Objectives (RPO):</strong> There is always a risk of significant data loss due to the time gap between backups. Even hourly or more frequent backups can lead to unacceptable data loss in high-transaction-volume systems.</li>



<li><strong>Performance Impact:</strong> Backup operations generate significant I/O (Input/Output) and CPU (Central Processing Unit) load on production database servers. This load can degrade application performance, especially during peak hours.</li>



<li><strong>Storage Costs:</strong> Managing and storing large volumes of backup data incurs substantial storage costs. Long-term retention policies and multiple backup copies further escalate these costs.</li>



<li><strong>Complexity:</strong> Managing complex backup scripts, schedules, and recovery procedures creates a significant operational burden and increases the risk of human error.</li>
</ul>
</li>
</ul>



<p>These challenges are not just technical but also economic and operational. The &#8220;pain points&#8221; are interconnected; for example, trying to shrink backup windows with traditional methods can increase the performance impact, and aggressive RPO targets can lead to higher storage costs. Because VLDBs are large, backups are inherently time-consuming. Businesses demand short RTOs and near-zero RPOs. Attempting frequent full backups on VLDBs (for RPO) exacerbates backup window and performance impact issues. Using traditional incremental backups can lead to complex and lengthy recovery processes, jeopardizing RTO. This creates a cycle of trade-offs where optimizing one aspect negatively affects another. This highlights the need for a holistic solution that addresses these interconnected challenges simultaneously, rather than in isolation, which is the rationale for an integrated system like ZDLRA.</p>



<h2 class="wp-block-heading">3. Oracle&#8217;s Zero Data Loss Recovery Appliance (ZDLRA): A Purpose-Built Solution for VLDBs (Based on Oracle MAA Blog Insights)</h2>



<p>Oracle&#8217;s Zero Data Loss Recovery Appliance (ZDLRA) is a purpose-built engineered system developed to address the challenges encountered in backing up and recovering Very Large Databases (VLDBs). This section will examine the core features of ZDLRA and its significance in VLDB protection, based on points highlighted in Oracle MAA blogs.</p>



<h3 class="wp-block-heading">3.1. Overview of the ZDLRA Approach</h3>



<p>The ZDLRA is a purpose-built engineered system developed by Oracle to centralize and optimize database backup and recovery operations, focusing on protection, efficiency, and scalability for Oracle databases. It&#8217;s crucial to emphasize that ZDLRA is not merely a software solution but a comprehensive one where hardware and software are co-engineered for optimal performance and reliability in the demanding context of VLDB protection. As stated in the Oracle MAA blog post, &#8220;ZDLRA is a purpose-built engineered system designed to maximize hardware and software to provide a highly available, zero data loss environment. It notes that software alone cannot achieve this, implying that ZDLRA&#8217;s integrated hardware and software approach is critical for meeting stringent RTO and RPO requirements.&#8221; <sup></sup> This positions ZDLRA not just as software, but as a comprehensive solution where hardware and software are co-designed for optimal performance and reliability under the demanding conditions of VLDB protection. &nbsp;</p>



<h3 class="wp-block-heading">3.2. The &#8220;Incremental Forever&#8221; Strategy for VLDBs</h3>



<p>One of ZDLRA&#8217;s most notable features is its &#8220;Incremental Forever&#8221; or &#8220;virtual full&#8221; backup strategy. This strategy fundamentally changes the backup process for VLDBs.</p>



<ul class="wp-block-list">
<li><strong>Mechanism:</strong> After an initial full (Level 0) backup, only changed data blocks are sent from the production database to the ZDLRA. The ZDLRA then synthesizes full backups (&#8220;virtual fulls&#8221;) from these incremental backups. This eliminates the overhead of taking full backups every day.</li>



<li><strong>Benefits for VLDBs:</strong>
<ul class="wp-block-list">
<li><strong>Reduced Production Impact:</strong> &#8220;This strategy reduces the processing load on production systems by only transmitting changed data during daily incremental backups.&#8221;  This minimizes I/O and CPU load on the source database, which is critical for performance-sensitive VLDBs. Traditional Level 0 + Level 1 backups are problematic for VLDBs: Level 0s are too large and impact performance; recovery from many Level 1s is slow. ZDLRA&#8217;s &#8220;Incremental Forever&#8221; sends only changed blocks <em>after the initial full backup</em>. This dramatically reduces the daily backup workload on the production database.  </li>



<li><strong>Storage Efficiency:</strong> Efficient storage of incremental data on the ZDLRA and pointer-based virtual fulls &#8220;can lead to a 10X decrease in space consumption.&#8221;  This offers a significant cost advantage, especially when dealing with large data volumes.  </li>



<li><strong>Faster Backup Completion:</strong> Daily &#8220;backups&#8221; are essentially small incremental backups, significantly shortening the backup window.</li>



<li><strong>Efficient Recovery:</strong> It &#8220;allows for more efficient recovery compared to traditional RMAN incremental-based recovery.&#8221;  Restoring a virtual full backup is similar to restoring a true full backup, without the need to sequentially apply numerous incrementals. ZDLRA takes on the task of creating &#8220;virtual full&#8221; backups from these incrementals. This means the <em>appliance</em>, not the production server, does the heavy lifting. For recovery, the database can be restored from a virtual full, which is much faster than applying a long chain of traditional incrementals. This directly improves RTO.  </li>



<li><strong>Offloading of Backup Operations:</strong> &#8220;By offloading backup compression, deletion, validation, and maintenance operations to the appliance, production systems can focus on workloads.&#8221;  This further frees up production server resources.  </li>
</ul>
</li>
</ul>



<p>This approach fundamentally changes the backup paradigm for Oracle databases. By shifting intelligence and workload from the source database to a specialized appliance, it allows production systems to dedicate their resources to business operations. It also simplifies recovery processes, reducing the potential for human error.</p>



<h3 class="wp-block-heading">3.3. Achieving Real-Time, Near-Zero Data Loss Protection (Near-Zero RPO)</h3>



<p>ZDLRA offers an innovative approach to minimizing the Recovery Point Objective (RPO).</p>



<ul class="wp-block-list">
<li><strong>Mechanism:</strong> &#8220;The Recovery Appliance uses Oracle&#8217;s real-time redo transport to deliver continuous, real-time data protection. Transactional changes (redo) are transmitted directly to the appliance, where archived redo log backups are created and stored.&#8221;  This mechanism is similar to Data Guard redo transport but specifically designed for backup and recovery assurance.  </li>



<li><strong>Benefits:</strong> &#8220;This provides immediate, zero data loss protection of all changes, and directly addresses the RPO objective of minimizing data loss.&#8221;  This means recovery can be performed up to the last committed transaction received by the ZDLRA, achieving an RPO of seconds or sub-seconds rather than hours. Traditional RPO is often tied to the frequency of archived log backups or discrete incremental data backups. For VLDBs, there can still be gaps between these discrete operations (e.g., every 15 mins, 1 hour). Real-time redo transport sends redo data <em>as it&#8217;s generated</em> (or very close to it) to the ZDLRA. The ZDLRA then archives this redo. This means that even if a failure occurs between discrete incremental data backups, the redo logs up to (or very near) the point of failure are already secured on the ZDLRA. This dramatically improves RPO beyond what traditional scheduled backups can offer, allowing for recovery with minimal or no data loss.  </li>
</ul>



<p>This feature is a game-changer for businesses with extremely low tolerance for data loss. It elevates ZDLRA from merely a backup device to a key component of a high-availability and data protection strategy, approaching disaster recovery capabilities for recent transactions. It also implies a tighter integration with the database&#8217;s transaction processing cycle.</p>



<h3 class="wp-block-heading">3.4. Ensuring Data Integrity with Continuous Recovery Validation</h3>



<p>The reliability of backups is paramount for successful recovery. ZDLRA takes a proactive approach to this.</p>



<ul class="wp-block-list">
<li><strong>Process:</strong> &#8220;The appliance performs corruption detection throughout the backup cycle to validate data consistency and immediately alerts administrators if corruption is detected. It checks all incoming and replicated backups for block-level validity. Any corrupted data is detected, recorded, and alerted, allowing administrators to take action.&#8221;   </li>



<li><strong>Benefits:</strong> &#8220;This assurance of valid data is a key component for a successful recovery, directly impacting RTO by ensuring that restored data is usable and not corrupt.&#8221;  This proactive validation prevents the discovery of corruption only at the critical moment of recovery, which could severely impact RTO and business operations. Data block corruption can occur on the primary database and, if undetected, propagate to backups. Traditional validation might happen during the backup process (e.g., RMAN <code>VALIDATE DATABASE</code>) or as a separate scheduled task, but ZDLRA makes it an intrinsic part of data ingestion. By checking blocks as they arrive and as virtual fulls are created/maintained, ZDLRA provides an early warning system. If corruption is detected in an incoming backup, administrators are alerted immediately. This allows them to address the issue on the primary database or ensure subsequent backups are clean, rather than discovering the problem months later during a critical restore. This ensures that backups stored on ZDLRA are known to be good, which is fundamental for a predictable and successful RTO.  </li>
</ul>



<p>This feature increases confidence in the backup repository. It means that when a recovery is initiated, there is a much higher certainty that the restored data will be valid and uncorrupted, reducing the risk of failed recoveries or recoveries that bring back corrupt data, which can be worse than no recovery at all. This also reduces the need for extensive manual validation efforts.</p>



<h3 class="wp-block-heading">3.5. The Significance of an Engineered System Approach for VLDBs</h3>



<p>The idea that ZDLRA is not just software but an integrated hardware and software solution is fundamental to its effectiveness in VLDB protection. &#8220;The article emphasizes that the ZDLRA is a purpose-built engineered system designed to maximize hardware and software&#8230; It states that software alone cannot achieve this.&#8221; <sup></sup> This co-engineering allows for optimizations in I/O, network traffic, storage management, and processing that would be difficult to achieve with general-purpose components. Protecting VLDBs efficiently requires high throughput for backups, fast access for restores, and robust processing for tasks like validation and virtual full creation. General-purpose hardware and backup software might not be optimally configured to work together for these specific, demanding Oracle database workloads. An engineered system allows the vendor (Oracle) to control and optimize all layers: the database-side agents, the network protocols used, the internal processing within the appliance, and the storage layout. This tight integration can lead to performance, reliability, and manageability benefits that are hard to replicate with a piecemeal approach. &nbsp;</p>



<p>The &#8220;engineered system&#8221; argument positions ZDLRA as a premium, high-performance solution where the whole is greater than the sum of its parts. It implies that Oracle has fine-tuned every component of the stack, from database interaction to storage within the appliance, for the specific task of Oracle database protection. While potentially carrying a higher upfront cost, the engineered system approach aims to deliver a lower TCO (Total Cost of Ownership) through operational efficiencies, reduced risk, and superior performance. It also signifies a single-vendor commitment to supporting the entire solution stack, potentially simplifying troubleshooting and support. This is a strategic choice for organizations where VLDB protection is a top-tier priority.</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><th>Challenge Area</th><th>Traditional Approach Pain Points</th><th>ZDLRA Solution &amp; Key Features Leveraged</th></tr><tr><td>Backup Window</td><td>Long full backups, performance impact</td><td>Incremental Forever, offloaded processing</td></tr><tr><td>RTO</td><td>Slow recovery from many incrementals, risk of corrupt backup</td><td>Virtual Full Backups, Continuous Recovery Validation</td></tr><tr><td>RPO</td><td>Data loss since last backup (hours)</td><td>Real-Time Redo Transport</td></tr><tr><td>Production Impact</td><td>High CPU/IO during backups</td><td>Incremental Forever (sends only changes), offloaded processing (compression, validation) <sup></sup></td></tr><tr><td>Storage Consumption</td><td>Multiple full backups, large incrementals</td><td>Incremental Forever (stores deltas efficiently), space-efficient virtual fulls <sup></sup></td></tr><tr><td>Backup Integrity</td><td>Corruption detected late (at restore or via periodic checks)</td><td>Continuous Recovery Validation (proactive, during backup cycle <sup></sup>)</td></tr><tr><td>Management Complexity</td><td>Complex scripting, scheduling, manual validation</td><td>Centralized appliance management, automated validation and virtual full creation</td></tr></tbody></table></figure>



<p>This table visually reinforces how ZDLRA directly addresses specific, long-standing pain points in VLDB management, making it easier to quickly grasp the benefits that would justify evaluating such a system.</p>



<h2 class="wp-block-heading">4. Key Considerations and Best Practices in ZDLRA-Centric VLDB Backup and Recovery Implementations</h2>



<p>While ZDLRA offers powerful capabilities that significantly improve VLDB backup and recovery processes, fully leveraging these capabilities requires careful planning, configuration, and adherence to operational best practices. This section will translate ZDLRA&#8217;s features into actionable considerations and best practices. Although the provided Oracle blog post summaries indicate they do not offer <em>additional</em> general best practices beyond ZDLRA itself <sup></sup>, this section will focus on <em>how best to leverage</em> ZDLRA&#8217;s capabilities and what to pay attention to <em>within the ZDLRA context</em>. &nbsp;</p>



<h3 class="wp-block-heading">4.1. Optimizing Recovery Time Objective (RTO) with ZDLRA</h3>



<ul class="wp-block-list">
<li>Leverage ZDLRA&#8217;s virtual full backups for rapid restores. This significantly shortens recovery times.</li>



<li>Ensure ZDLRA sizing is adequate to meet restore performance demands. Insufficient resources can lead to missed RTO targets.</li>



<li>Regularly test recovery scenarios to validate RTOs. ZDLRA&#8217;s &#8220;Continuous Recovery Validation&#8221;  ensures backups are valid, a prerequisite for meeting RTOs, but real-world tests confirm the entire process works as expected.  </li>
</ul>



<h3 class="wp-block-heading">4.2. Minimizing Recovery Point Objective (RPO) with ZDLRA</h3>



<ul class="wp-block-list">
<li>Implement and monitor real-time redo transport diligently. This is the primary mechanism for achieving near-zero RPO according to.  </li>



<li>Understand and meet network requirements to ensure real-time redo transport does not lag. Insufficient network bandwidth or high latency can compromise RPO targets.</li>
</ul>



<h3 class="wp-block-heading">4.3. Managing Production System Performance</h3>



<ul class="wp-block-list">
<li>While ZDLRA&#8217;s &#8220;Incremental Forever&#8221; strategy  significantly reduces production impact, confirm this by monitoring baseline database performance metrics post-implementation.  </li>



<li>Optimize network bandwidth between production databases and the ZDLRA. This is critical for the efficiency of both incremental backups and real-time redo transport.</li>
</ul>



<h3 class="wp-block-heading">4.4. Ensuring Backup Data Integrity and Reliability</h3>



<ul class="wp-block-list">
<li>Rely on ZDLRA&#8217;s &#8220;Continuous Recovery Validation&#8221; , but also understand its alerting mechanisms and integrate them into operational monitoring systems. Early warnings allow for proactive resolution of potential issues.  </li>



<li>Consider ZDLRA replication to a secondary ZDLRA for disaster recovery of the backup data itself. This ensures backups are protected even if the primary ZDLRA fails.</li>
</ul>



<h3 class="wp-block-heading">4.5. Storage Management and Efficiency within ZDLRA</h3>



<ul class="wp-block-list">
<li>Understand ZDLRA&#8217;s internal storage management, space reclamation, and how the &#8220;up to 10X decrease in space consumption&#8221;  is achieved and monitored.  </li>



<li>Plan retention policies carefully to balance recovery needs with storage capacity. Overly long retention periods can lead to unnecessary costs, while too short retention can limit recovery capabilities.</li>
</ul>



<h3 class="wp-block-heading">4.6. Network Configuration and Sizing</h3>



<ul class="wp-block-list">
<li>Emphasize the importance of dedicated, high-bandwidth, low-latency network connectivity between production databases and the ZDLRA, especially for real-time redo transport and large data transfers. The network should not be a bottleneck for backup and recovery performance.</li>
</ul>



<h3 class="wp-block-heading">4.7. Regular Testing and Validation of Recovery Procedures</h3>



<ul class="wp-block-list">
<li>Even with ZDLRA&#8217;s automation and validation, conduct periodic, full recovery drills to test the end-to-end process, human procedures, and infrastructure. This validates the entire recovery plan, not just the technology.</li>
</ul>



<p>Implementing ZDLRA is not a &#8220;set it and forget it&#8221; solution. While it automates and optimizes many aspects, careful planning, configuration, ongoing monitoring, and testing are still critical to realizing its full benefits. The &#8220;best practices&#8221; shift from managing the intricacies of RMAN scripts to managing the ZDLRA ecosystem. ZDLRA offers advanced features like &#8220;Incremental Forever,&#8221; &#8220;Real-Time Redo,&#8221; and &#8220;Continuous Validation.&#8221; These features have prerequisites and operational aspects (e.g., network for redo, monitoring alerts for validation, capacity planning for storage). Simply deploying the appliance does not guarantee optimal RTO/RPO or reliability. Administrators must understand how these features work, configure them correctly, monitor their performance, and integrate ZDLRA into broader DR and operational procedures. Regular testing is essential to confirm the entire system (database, network, ZDLRA, recovery procedures) performs as expected under pressure. The role of the Database Administrator (DBA) also evolves in this context. They may spend less time on low-level backup scripting and more on strategic data protection management for ZDLRA, capacity planning, and ensuring end-to-end recoverability of business services. Expertise specific to ZDLRA itself becomes important.</p>



<h2 class="wp-block-heading">5. Conclusion and Recommendations</h2>



<p>As presented in the Oracle MAA blog posts, the Zero Data Loss Recovery Appliance (ZDLRA) offers significant advantages in the realm of Very Large Database (VLDB) backup and recovery. These benefits include near-zero data loss through a vastly improved Recovery Point Objective (RPO), reliable Recovery Time Objective (RTO) via virtual full backups and continuous validation, reduced impact on production systems, and enhanced data integrity. <sup></sup> &nbsp;</p>



<p>As an engineered system, ZDLRA represents a strategic approach to tackling the complexities of VLDB protection. The co-engineering of hardware and software allows for performance and reliability optimizations that are difficult to achieve with general-purpose solutions. This is a critical differentiator, especially in today&#8217;s environment where data volume and transaction rates challenge traditional methods.</p>



<p>However, it must be emphasized that while ZDLRA offers powerful capabilities, successful implementation requires careful planning, a full understanding of its features, and adherence to operational best practices, particularly concerning network configuration, monitoring, and regular recovery testing. Adopting ZDLRA is not merely a technical decision but signifies a commitment to a high level of data protection and availability, driven by the critical nature of the VLDBs it protects. This is an investment that should align with the value of the data and the cost of downtime/data loss.</p>



<p>It is important to note that this report focuses on ZDLRA-centric best practices highlighted in the provided Oracle blog post summaries. A comprehensive discussion of all VLDB backup and recovery techniques, including non-ZDLRA alternatives or complementary strategies like storage snapshots or Oracle Data Guard for DR beyond backup, would require additional resources beyond the scope of the provided material.</p>



<p>In conclusion, organizations should evaluate ZDLRA as part of their overall IT strategy, considering its integration with other systems, the skills required to manage it, and its alignment with long-term data growth and protection needs. When implemented and managed correctly, ZDLRA can provide unparalleled protection and recovery assurance for VLDBs, helping businesses secure one of their most valuable assets: their data.</p>



<p>Ref:</p>



<p><a href="https://blogs.oracle.com/maa/post/very-large-database-backup-and-recovery-best-practices" target="_blank" rel="noopener">https://blogs.oracle.com/maa/post/very-large-database-backup-and-recovery-best-practices</a></p>



<p><a href="https://blogs.oracle.com/maa/post/very-large-database-backup-and-recovery-best-practices-part-2" target="_blank" rel="noopener">https://blogs.oracle.com/maa/post/very-large-database-backup-and-recovery-best-practices-part-2</a></p>



<p></p>
<p>The post <a rel="nofollow" href="https://www.bugraparlayan.com.tr/best-practices-for-very-large-database-vldb-backup-and-recovery.html">Best Practices for Very Large Database (VLDB) Backup and Recovery:</a> appeared first on <a rel="nofollow" href="https://www.bugraparlayan.com.tr">Bugra Parlayan | Oracle Database &amp; Exadata Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Analysis of Delta Push and Delta Store Mechanisms within ZDLRA</title>
		<link>https://www.bugraparlayan.com.tr/analysis-of-delta-push-and-delta-store-mechanisms-within-zdlra.html</link>
		
		<dc:creator><![CDATA[Bugra Parlayan]]></dc:creator>
		<pubDate>Wed, 04 Jun 2025 19:35:29 +0000</pubDate>
				<category><![CDATA[Engineered Systems]]></category>
		<category><![CDATA[Backup Optimization]]></category>
		<category><![CDATA[Block Change Tracking]]></category>
		<category><![CDATA[Change Tracking]]></category>
		<category><![CDATA[Delta Compression]]></category>
		<category><![CDATA[Delta Push]]></category>
		<category><![CDATA[Delta Store]]></category>
		<category><![CDATA[Incremental Forever]]></category>
		<category><![CDATA[Oracle ZDLRA]]></category>
		<category><![CDATA[Recovery Appliance]]></category>
		<category><![CDATA[RMAN Delta push]]></category>
		<guid isPermaLink="false">https://www.bugraparlayan.com.tr/?p=1475</guid>

					<description><![CDATA[<p>I. Introduction to Oracle Zero Data Loss Recovery Appliance (ZDLRA) Technology The Oracle Zero Data Loss Recovery Appliance (ZDLRA or Recovery Appliance), an engineered system specifically designed for Oracle Databases, was developed to eliminate data loss and significantly reduce the data protection workload on production database servers. Its primary goal is to protect transactions in &#8230;</p>
<p>The post <a rel="nofollow" href="https://www.bugraparlayan.com.tr/analysis-of-delta-push-and-delta-store-mechanisms-within-zdlra.html">Analysis of Delta Push and Delta Store Mechanisms within ZDLRA</a> appeared first on <a rel="nofollow" href="https://www.bugraparlayan.com.tr">Bugra Parlayan | Oracle Database &amp; Exadata Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">I. Introduction to Oracle Zero Data Loss Recovery Appliance (ZDLRA) Technology</h2>



<p>The Oracle Zero Data Loss Recovery Appliance (ZDLRA or Recovery Appliance), an engineered system specifically designed for Oracle Databases, was developed to eliminate data loss and significantly reduce the data protection workload on production database servers.<sup></sup> Its primary goal is to protect transactions in real-time, enabling databases to be recovered to within less than a second in the event of an outage or ransomware attack.<sup></sup> This approach fundamentally differs from traditional backup solutions, which often lead to data loss measured in hours or even a day.<sup></sup> ZDLRA works in tight integration with Oracle Database and Recovery Manager (RMAN) <sup></sup> and offers capabilities not possible with general-purpose backup solutions. It is built upon Exadata hardware, from which it inherits performance and scalability features.<sup></sup> Positioned for modern cybersecurity protection, ZDLRA offers features like backup immutability and continuous validation.<sup></sup> &nbsp;</p>



<p>The data protection philosophy underlying this system represents a paradigm shift from reactive backup to proactive, continuous data protection. Traditional backup operations are performed periodically (e.g., nightly), which inherently carries the potential for data loss since the last backup.<sup></sup> ZDLRA, on the other hand, captures changes as they occur through mechanisms like &#8220;real-time protection&#8221; <sup></sup> and &#8220;real-time redo transport&#8221;.<sup></sup> This continuous capture reduces the Recovery Point Objective (RPO) to sub-second levels <sup></sup>, significantly mitigating the business risk associated with data loss and moving beyond mere backup to provide near-continuous data assurance. &nbsp;</p>



<p>The fact that ZDLRA is an &#8220;engineered system&#8221; (built on Exadata <sup></sup>) is critical to its performance and reliability. General-purpose backup solutions run on general-purpose hardware and software, which may not be optimized for the unique I/O patterns and metadata intensity of Oracle Database backups.<sup></sup> As an engineered system like Exadata, ZDLRA&#8217;s hardware (storage, nodes, InfiniBand <sup></sup>) and software are co-engineered and pre-tuned for Oracle Database workloads.<sup></sup> This co-engineering enables high throughput (up to 60 TB per hour per rack <sup></sup>), efficient handling of Oracle-specific block formats, and the scalability required for enterprise-wide database protection.<sup></sup> Thus, ZDLRA&#8217;s effectiveness stems not just from its software features but from its holistic system design, purpose-built for Oracle databases. &nbsp;</p>



<h3 class="wp-block-heading">A. &#8220;Incremental Forever&#8221; Backup Strategy: A Paradigm Shift</h3>



<p>ZDLRA implements an &#8220;incremental-forever&#8221; backup architecture.<sup></sup> After an initial one-time full (level 0) backup, only incremental (level 1) backups are sent from the protected databases to the Recovery Appliance.<sup></sup> This strategy eliminates the need for recurring full backups, which are resource-intensive on production systems and can impact application performance.<sup></sup> The &#8220;incremental forever&#8221; approach significantly reduces backup windows, database server load (CPU, memory, I/O), and network traffic.<sup></sup> &nbsp;</p>



<p>The &#8220;incremental forever&#8221; strategy is more than just sending fewer full backups; it is enabled by ZDLRA&#8217;s sophisticated backend processing (Delta Store) that synthesizes these incremental backups into readily usable &#8220;virtual full backups.&#8221; Simply sending only incremental backups without a mechanism to consolidate them would make restores complex and slow, requiring the sequential application of many incrementals.<sup></sup> ZDLRA overcomes this by using the Delta Store to process incoming incremental backups and create &#8220;virtual full backups&#8221;.<sup></sup> These virtual full backups are representations of a full backup at a specific point in time, constructed from the initial level 0 and subsequent level 1 block changes.<sup></sup> This means that for recovery, RMAN can restore a single virtual full backup without the burden of applying numerous incremental backups on the client side <sup></sup>, making the &#8220;incremental forever&#8221; strategy practical and highly efficient for recovery. &nbsp;</p>



<p>The following table summarizes the key concepts of ZDLRA and the benefits it offers:</p>



<p><strong>Table 1: Key ZDLRA Concepts and Benefits</strong></p>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><th>Concept</th><th>Brief Definition in ZDLRA Context</th><th>Key Benefit to the Organization</th></tr><tr><td>Zero Data Loss</td><td>Goal of reducing data loss to virtually zero by protecting database transactions in real-time.</td><td>Minimizes critical data loss risk, enhances business continuity.</td></tr><tr><td>Incremental Forever</td><td>Only incremental backups are taken after the initial full backup, eliminating the need for periodic full backups.</td><td>Shortens backup windows, reduces load on production systems, saves storage.</td></tr><tr><td>Real-Time Redo Transport</td><td>Instantaneous transfer of database redo log changes to ZDLRA.</td><td>Provides sub-second RPO (Recovery Point Objective), minimizing data loss.</td></tr><tr><td>Virtual Full Backup</td><td>A logical backup synthesized on ZDLRA from incremental backups, behaving like a full backup.</td><td>Enables fast restores, uses storage space efficiently.</td></tr><tr><td>Sub-Second RPO</td><td>Reduction of data loss tolerance to below one second.</td><td>Minimizes data loss impact for business-critical applications.</td></tr><tr><td>Continuous Validation</td><td>Backup integrity and recoverability are continuously checked by ZDLRA.</td><td>Ensures reliable restores, reduces risk of corrupt backups.</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">II. Delta Push: The Continuous Data Ingestion Engine</h2>



<h3 class="wp-block-heading">A. Delta Push Concept and Objectives</h3>



<p>&#8220;Delta Push&#8221; is a term Oracle uses to describe the process by which protected databases send only the minimum necessary data (i.e., the &#8220;delta difference&#8221; or changes) to ZDLRA for protection.<sup></sup> This process encompasses both incremental backups of data blocks and real-time transport of redo log changes.<sup></sup> The primary objective is to minimize the impact on production systems by transmitting only unique changed data, thereby reducing CPU, I/O, and network load.<sup></sup> It is a source-side optimization enabled by RMAN block change tracking and tight integration with the Oracle database.<sup></sup> &nbsp;</p>



<p>&#8220;Delta Push&#8221; is more than just an incremental backup; it is a holistic strategy to capture <em>all</em> relevant database changes (data blocks and redo) with minimal production impact, forming the ingestion mechanism for ZDLRA&#8217;s continuous data protection. Traditional incremental backups capture changed data blocks at set intervals.<sup></sup> Real-time redo transport continuously captures transaction log changes, even between incremental backups.<sup></sup> While <sup></sup> explicitly states, &#8220;Changes in the database are sent to ZDLRA using the Delta Push process,&#8221; <sup></sup> clarifies, &#8220;Oracle calls Virtual Backups + Real-Time Redo as Delta Push.&#8221; Therefore, Delta Push is not a single technology but a combination of RMAN incremental backups and real-time redo transport working in concert to ensure comprehensive and timely capture of all database modifications. This dual approach is key to achieving both efficient backups and near-zero RPO. &nbsp;</p>



<h3 class="wp-block-heading">B. Operational Mechanisms</h3>



<h4 class="wp-block-heading">1. Leveraging RMAN Incremental Backups</h4>



<p>ZDLRA utilizes the RMAN &#8220;incremental backup&#8221; API to capture changes from the source database.<sup></sup> After the initial level 0 backup, all subsequent backups are level 1 incremental backups.<sup></sup> These can be cumulative backups that use the latest virtual level 0 as their baseline.<sup></sup> The ZDLRA Backup Module (an SBT library) facilitates the transfer of these incremental backups from the protected database to the Recovery Appliance.<sup></sup> RMAN block change tracking on the source database efficiently identifies changed blocks, so only those blocks are read and sent.<sup></sup> &nbsp;</p>



<p>ZDLRA fundamentally transforms the <em>purpose</em> and <em>outcome</em> of an RMAN incremental backup. While the RMAN command on the client-side might look similar, ZDLRA processes it not just as a standalone incremental backup, but as a component of a virtual full backup. Traditionally, an RMAN incremental backup is a set of blocks changed since the last backup of a certain level.<sup></sup> However, <sup></sup> states, &#8220;When a DELTA PUSH is executed, the results are automatically transformed into a VIRTUAL FULL backup in what is known as the Delta Store inside of ZDLRA.&#8221; <sup></sup> explains that ZDLRA opens the RMAN block, reads the data file blocks within it, and creates a new virtual level 0 using the backup already existing on ZDLRA. This indicates that ZDLRA doesn&#8217;t just store the incremental backup set; it actively parses it and integrates its constituent changed blocks into its versioned block store (Delta Store) to synthesize a new point-in-time full representation. This is a critical difference from how incremental backups are handled by traditional backup software. &nbsp;</p>



<h4 class="wp-block-heading">2. Real-Time Redo Transport: Achieving Sub-Second RPO</h4>



<p>This feature is key to ZDLRA&#8217;s &#8220;zero data loss&#8221; claim, providing a zero to sub-second RPO.<sup></sup> Redo data (records of all database changes) is streamed from the protected database&#8217;s memory buffers (LGWR) directly to the Recovery Appliance, typically asynchronously to minimize performance impact.<sup></sup> This is similar to Data Guard redo transport.<sup></sup> ZDLRA validates the redo and writes it to a staging area. Upon a log switch on the protected database, ZDLRA converts these redo changes into compressed archived redo log file backups and tracks them in its catalog.<sup></sup> If the redo stream terminates unexpectedly (e.g., database crash), ZDLRA can create a partial archived redo log, protecting transactions up to the last change received.<sup></sup> With real-time redo transport enabled, this obviates the need for separate archived log backups from the database host to ZDLRA.<sup></sup> &nbsp;</p>



<p>Real-time redo transport effectively decouples redo protection from the source database&#8217;s archiving process, enabling more resilient and immediate capture of transactions. Traditional redo protection often relies on the database successfully writing to its online redo logs and then archiving them.<sup></sup> ZDLRA&#8217;s real-time redo transport taps into the redo stream <em>before</em> or concurrently with local archiving, sending it directly from memory.<sup></sup> Even if the primary database crashes before successfully archiving a log, ZDLRA can construct a partial archive log from the redo it has already received.<sup></sup> This means ZDLRA acts as an independent, highly available redo log destination, guaranteeing transaction capture even if the source database&#8217;s own archiving mechanism is disrupted, which is critical for sub-second RPO. &nbsp;</p>



<h3 class="wp-block-heading">C. Architectural Integration: Data Flow from Protected Database to ZDLRA</h3>



<p>Protected databases use the RMAN client and the Recovery Appliance Backup Module (SBT library) to communicate with ZDLRA.<sup></sup> For incremental backups, RMAN identifies changed blocks. These blocks are packaged and sent via the backup module over the network to an HTTP Server Application (Servlet) on ZDLRA.<sup></sup> Real-time redo is transported similarly to Data Guard (typically via Oracle Net) to a Remote File Server (RFS) process on ZDLRA.<sup></sup> ZDLRA then validates, processes (compression, indexing), and stores the incoming data/redo blocks in the Delta Store.<sup></sup> Metadata is updated in the Recovery Appliance Catalog.<sup></sup> &nbsp;</p>



<p>The data flow architecture for Delta Push is bifurcated (separate paths for incremental block backups and real-time redo) but converges within ZDLRA to provide a unified data protection state. Incremental data block backups are inherently batch-oriented, typically scheduled RMAN operations, even if frequent.<sup></sup> They are processed via the SBT interface.<sup></sup> Real-time redo transport is a continuous, stream-based process, capturing transactional changes as they occur using Data Guard-like mechanisms.<sup></sup> Both data streams—changed blocks and redo records—arrive at ZDLRA and are processed into and cataloged by the Delta Store.<sup></sup> This dual-path ingestion allows ZDLRA to capture both the state of data blocks at specific points in time (via incrementals) and the continuous flow of transactions (via redo), combining the strengths of snapshot-like backups and continuous data replication to enable recovery to almost any point in time. &nbsp;</p>



<h3 class="wp-block-heading">D. Formation of Virtual Full Backups via Delta Push</h3>



<p>While Delta Push is the <em>mechanism</em> for sending changes, its direct result is to enable ZDLRA&#8217;s Delta Store to create and maintain &#8220;Virtual Full Backups&#8221;.<sup></sup> Each Delta Push (incremental backup) operation results in a new Virtual Full Backup becoming available in the ZDLRA catalog.<sup></sup> This means changes are tracked not just from the last physical full backup, but from the previous Virtual Full backup.<sup></sup> &nbsp;</p>



<p>Delta Push acts as the continuous feed that allows the Delta Store to maintain a constantly up-to-date, yet historically deep, set of recovery points represented as virtual full backups. Delta Push transmits the &#8220;deltas&#8221; – the changed blocks.<sup></sup> The Delta Store receives these deltas and intelligently integrates them with previously stored block versions.<sup></sup> This integration allows ZDLRA to construct a logically complete backup image for a specific point-in-time corresponding to an ingested incremental backup.<sup></sup> Therefore, Delta Push is not just about efficient data transfer; it is the critical data pipeline that fuels the Delta Store&#8217;s ability to offer fast, point-in-time recovery through virtual full backups, effectively creating a &#8220;time machine&#8221; for the database.<sup></sup> &nbsp;</p>



<h2 class="wp-block-heading">III. Delta Store: The Intelligent Repository for Protected Data</h2>



<h3 class="wp-block-heading">A. Delta Store Architectural Overview</h3>



<p>The Delta Store is &#8220;the totality of all protected database backup data in the Recovery Appliance storage location&#8221;.<sup></sup> It resides on a dedicated ASM disk group (typically named DELTA) on ZDLRA.<sup></sup> It is described as the &#8220;brains&#8221; of the Recovery Appliance, responsible for validating, compressing, indexing, and storing incoming backup data.<sup></sup> It is not merely a passive storage area; it actively manages backup data to enable efficient virtual full backups and space optimization.<sup></sup> &nbsp;</p>



<p>The Delta Store is an application-aware storage layer, deeply integrated with Oracle Database block structures and RMAN metadata, which distinguishes it from general-purpose deduplication appliances. General-purpose deduplication appliances typically operate at a generic block level without understanding the internal structure of database files.<sup></sup> According to <sup></sup>, ZDLRA&#8217;s Delta Store captures copies of each Oracle block and organizes them hierarchically. <sup></sup> highlights its &#8220;Oracle context sensitivity,&#8221; where it opens RMAN blocks to inspect their contents and index the data blocks for each data file. This database awareness allows for more intelligent deduplication (block versioning rather than just hash-based deduplication of RMAN backup pieces), validation <sup></sup>, and the creation of consistent virtual full backups. This intelligence is what enables ZDLRA to perform block-correctness and RMAN recoverability validation <sup></sup> directly on the appliance, offloading the production server. &nbsp;</p>



<h3 class="wp-block-heading">B. Internal Structure and Data Organization</h3>



<h4 class="wp-block-heading">1. Delta Pools: Granular Management of Data File Backups</h4>



<p>The Delta Store contains &#8220;delta pools&#8221; for all data files across all protected databases.<sup></sup> A delta pool is the set of data file blocks from which the Recovery Appliance constructs virtual full backups. Each distinct data file whose backups are sent to ZDLRA has its own dedicated delta pool.<sup></sup> For example, <code>datafile 10</code> from database <code>prod1</code> has its own delta pool.<sup></sup> &nbsp;</p>



<p>The concept of a delta pool signifies a highly granular and organized approach to managing backup data, enabling efficient block versioning and retrieval at the individual data file level. Databases consist of multiple data files, each with its own lifecycle of changes. By maintaining a separate delta pool per data file <sup></sup>, ZDLRA can track and version blocks specifically for that file. When an incremental backup for a data file arrives, ZDLRA updates the relevant delta pool with the new block versions. This level of granularity is essential for constructing a virtual full backup, as ZDLRA can quickly locate the correct versions of all blocks for each data file belonging to a specific point-in-time backup by querying these distinct pools. It also likely aids in space management and reclamation, as old blocks can be managed within the context of their specific data file pool. &nbsp;</p>



<h4 class="wp-block-heading">2. Block Versioning and Indexing Mechanisms</h4>



<p>The Delta Store is effectively a database of block versions.<sup></sup> As incremental backups (Delta Pushes) arrive, the changed blocks are indexed into the Delta Store.<sup></sup> The Recovery Appliance receives an incremental backup, validates it, compresses it, and writes it to a delta store. It indexes the backup so that corresponding virtual full backups become available.<sup></sup> The ZDLRA metadata database, which includes the RMAN recovery catalog, manages the metadata about these blocks and their versions.<sup></sup> &nbsp;</p>



<p>The indexing of individual database blocks within the Delta Store, not just backup pieces, is the core enabler of &#8220;virtual full backups&#8221; and efficient space utilization. Traditional backups store entire backup pieces (full or incremental). Restoration requires locating and processing these pieces.<sup></sup> ZDLRA, in contrast, extracts individual data blocks from incoming incremental backups and indexes these blocks.<sup></sup> The Delta Store maintains various versions of these blocks. A &#8220;virtual full backup&#8221; is essentially a metadata construct – a list of pointers to the correct versions of all blocks (from various delta pools) that constitute the database at a specific point in time.<sup></sup> This block-level versioning and indexing mean that unchanged blocks are stored only once, and new &#8220;full&#8221; backups are created logically by updating pointers, rather than physically re-copying all data. This is the essence of space efficiency and rapid virtual full creation. &nbsp;</p>



<h3 class="wp-block-heading">C. Creation and Management of Virtual Full Backups within Delta Store</h3>



<p>The Delta Store uses the ingested incremental backups (via Delta Push) to create virtual full backups.<sup></sup> A virtual full backup is a pointer-based representation of a physical full backup at the time of the incremental backup.<sup></sup> It appears as a standard level 0 backup in the RMAN catalog.<sup></sup> To create a virtual full backup, ZDLRA converts an incoming incremental level 1 backup into a virtual representation of an incremental level 0 backup.<sup></sup> It combines the new changed blocks from the incremental backup with the previous unchanged blocks already present in the Delta Store.<sup></sup> These virtual full backups are typically 10 times more space-efficient than physical full backups.<sup></sup> &nbsp;</p>



<p>The creation of virtual full backups is an ongoing, dynamic process within the Delta Store, triggered by each successful Delta Push, ensuring that the latest recovery points are always full representations. <sup></sup> states, &#8220;Each Delta Push sends the latest version of each changed block. Those changed blocks are indexed into the Delta Store and combined with previous un-changed blocks to form a Virtual Full Backup.&#8221; <sup></sup> notes, &#8220;After the process [backup], the catalog reflects all the new virtual full backups that are available.&#8221; This implies a continuous synthesis. As new incremental data arrives, the Delta Store doesn&#8217;t just store the incremental; it actively processes it to update its pointers and metadata, making a new, comprehensive virtual full backup immediately available. This proactive synthesis is why ZDLRA can offer fast restores to recent points in time without the delay of manually applying many incrementals during the restore operation itself. The &#8220;merge&#8221; or &#8220;synthesis&#8221; happens upfront on ZDLRA. &nbsp;</p>



<h3 class="wp-block-heading">D. Storage Optimization and Efficiency</h3>



<h4 class="wp-block-heading">1. Advanced Compression Techniques (including <code>RA_FORMAT</code>)</h4>



<p>ZDLRA employs specialized block-level compression algorithms.<sup></sup> A newer client-side library feature, <code>RA_FORMAT=TRUE</code> (introduced around ZDLRA 23.1), allows for compression of the data <em>within</em> blocks before sending to ZDLRA. This is compatible with ZDLRA&#8217;s ability to create virtual full backups and validate stored backup sets.<sup></sup> This client-side compression can compress the contents of TDE encrypted blocks as well as non-TDE blocks. If RMAN encryption is also on, non-TDE blocks are compressed then encrypted.<sup></sup> This compression reduces network bandwidth for backups and replication, and storage space on ZDLRA.<sup></sup> Archive log compression (BASIC, LOW, MEDIUM, HIGH) can also be configured; LOW, MEDIUM, and HIGH do not require ACO on the protected database when ZDLRA is used.<sup></sup> &nbsp;</p>



<p>The <code>RA_FORMAT</code> feature represents a significant evolution in ZDLRA&#8217;s compression strategy, moving some intelligence to the client to optimize data <em>before</em> transmission and storage, and enabling effective compression even for TDE-encrypted data. Previously, RMAN compression would compress the entire backup set. If the data was TDE encrypted, this compressed backup set was unreadable by ZDLRA for its block-level operations.<sup></sup> <code>RA_FORMAT=TRUE</code> compresses the <em>contents</em> of each block, leaving the block headers intact for ZDLRA to read.<sup></sup> This allows ZDLRA to perform its virtual full backup creation and validation even on backups originating from TDE tablespaces, because the data within the blocks is compressed, but the block structure ZDLRA needs is preserved. This overcomes a major challenge in backup efficiency for encrypted databases, offering both security (TDE) and storage/network efficiency (compression), which were often mutually exclusive or suboptimal with older methods. &nbsp;</p>



<h4 class="wp-block-heading">2. Automated Space Management and Delta Pool Optimization</h4>



<p>The Recovery Appliance performs automated delta pool space management.<sup></sup> This includes deleting old or expired backups (on disk and on tape/cloud) based on recovery window goals and retention policies.<sup></sup> ZDLRA periodically reorganizes delta pools to improve restore performance by maintaining contiguity of blocks (delta pool optimization) as old blocks are deleted and new ones arrive.<sup></sup> &nbsp;</p>



<p>Automated space management and delta pool optimization are critical for sustaining the long-term performance and efficiency of the &#8220;incremental forever&#8221; strategy. An unmanaged &#8220;incremental forever&#8221; system could lead to highly fragmented storage over time as myriad small changes accumulate and old data becomes obsolete. The deletion of old blocks <sup></sup> reclaims space, vital for cost-effectiveness. The reorganization of delta pools <sup></sup> addresses the potential performance degradation from fragmentation that could arise from frequent updates and deletions, ensuring restore operations remain fast by optimizing read access. These automated background tasks are therefore essential for the sustainability of the ZDLRA model, preventing it from becoming unwieldy or slow over long periods of operation. &nbsp;</p>



<p>The following table summarizes the internal components of the Delta Store and their roles:</p>



<p><strong>Table 2: Delta Store Internal Components and Roles</strong></p>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><th>Component</th><th>Description/Structure</th><th>Primary Function within Delta Store</th><th>Contribution to ZDLRA Efficiency/Recovery</th></tr><tr><td>Delta Pool</td><td>A logical unit for each data file, containing all backed-up block versions for that specific data file.</td><td>Organizing and managing blocks belonging to a specific data file.</td><td>Granular block management, efficient versioning, and rapid construction of virtual full backups.</td></tr><tr><td>Block Version</td><td>A copy of a data block at a specific point in time.</td><td>Tracking data changes over time.</td><td>Space efficiency (only changed blocks stored), ability to restore to any point in time.</td></tr><tr><td>Index</td><td>Metadata structure tracking the locations and versions of blocks within the Delta Store.</td><td>Enabling rapid location of correct block versions when constructing virtual full backups.</td><td>Fast virtual full backup creation, efficient restore operations.</td></tr><tr><td>Virtual Full Backup Metadata</td><td>Set of pointers to the block versions that constitute a full backup at a specific point in time.</td><td>Providing a logical representation of a physical full backup.</td><td>Storage efficiency (pointers instead of physical full backups), appears as a standard level 0 backup to RMAN, fast recovery.</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">IV. Synergistic Architecture: Operation of Delta Push and Delta Store within ZDLRA</h2>



<h3 class="wp-block-heading">A. End-to-End Data Protection Workflow: From Transaction to Recoverable Backup</h3>



<p>The data protection process begins when a transaction occurs on the protected database. These changes are transmitted to ZDLRA almost instantaneously as part of the Delta Push mechanism.</p>



<ol class="wp-block-list">
<li><strong>Transaction Occurs:</strong> Changes are made in the protected database.</li>



<li><strong>Real-Time Redo Push:</strong> LGWR (or an asynchronous process) sends redo data from memory buffers to ZDLRA. ZDLRA stages and validates this redo.  </li>



<li><strong>Incremental Backup (Delta Push):</strong> Periodically , RMAN performs an incremental level 1 backup. Changed blocks are identified via block change tracking.  </li>



<li><strong>Data Transfer:</strong> The Recovery Appliance Backup Module sends these changed blocks to ZDLRA.  </li>



<li><strong>ZDLRA Ingestion and Processing (Delta Store):</strong>
<ul class="wp-block-list">
<li>Incoming incremental blocks are validated, compressed (if <code>RA_FORMAT=TRUE</code> or with ZDLRA-side compression), and indexed into their respective delta pools within the Delta Store.  </li>



<li>The Delta Store synthesizes a new virtual full backup using these new blocks and existing unchanged blocks.  </li>



<li>Redo logs are converted by ZDLRA into archived log backups upon log switch.  </li>
</ul>
</li>



<li><strong>Catalog Update:</strong> ZDLRA&#8217;s internal RMAN catalog is updated to reflect the new virtual full backup and archived redo logs, making them available for recovery.  </li>



<li><strong>Continuous Validation:</strong> ZDLRA continuously validates backups for recoverability.  </li>



<li><strong>Lifecycle Management:</strong> Policies for retention, replication to another ZDLRA, or archival to tape/cloud are applied.  </li>
</ol>



<p>The synergy between Delta Push (ingestion) and Delta Store (processing and storage engine) creates a closed-loop system for continuous data protection and recovery readiness. Delta Push continuously feeds changed data (blocks and redo) to ZDLRA.<sup></sup> The Delta Store immediately processes this data, integrates it into its versioned block repository, and creates virtual full backups.<sup></sup> The updated catalog then makes these new recovery points instantly available.<sup></sup> This tight, automated loop ensures ZDLRA is always as up-to-date as possible with the state of protected databases, minimizing data loss risk and guaranteeing that recovery assets are constantly refreshed and validated. &nbsp;</p>



<h3 class="wp-block-heading">B. Role of Key ZDLRA Components</h3>



<h4 class="wp-block-heading">1. Recovery Appliance Backup Module (libra.so / SBT Library)</h4>



<p>This Oracle-supplied SBT library is installed on protected database hosts and is used by RMAN to transfer backup data to ZDLRA.<sup></sup> It manages communication for backup and restore operations between RMAN and ZDLRA.<sup></sup> With newer versions (e.g., ZDLRA 23.1), this library can perform client-side compression and formatting (<code>RA_FORMAT=TRUE</code>).<sup></sup> &nbsp;</p>



<p>The Recovery Appliance Backup Module is more than a simple data pipe; it&#8217;s an intelligent client-side agent that actively participates in optimizing the backup stream. Traditionally, SBT libraries are primarily interfaces for RMAN to write to third-party media managers. The ZDLRA backup module, especially with features like <code>RA_FORMAT</code>, performs pre-processing (compression, ZDLRA-specific formatting <sup></sup>) on the client-side. This client-side intelligence reduces load on ZDLRA for certain tasks, optimizes network traffic, and enables advanced features like effectively compressing TDE data before it even reaches the appliance. It acts as an essential, integrated part of the ZDLRA solution, not just a generic connector. &nbsp;</p>



<h4 class="wp-block-heading">2. Recovery Appliance Metadata Database and Catalog</h4>



<p>Residing on each Recovery Appliance, it manages metadata for all backups and contains the RMAN recovery catalog for all protected databases.<sup></sup> This catalog is mandatory and is automatically updated by ZDLRA as backups are processed.<sup></sup> It stores information about backup pieces, archived logs, virtual full backups, delta pools, and block versions, which is essential for orchestrating restores and managing space.<sup></sup> ZDLRA uses two main disk groups: DELTA for backups and CATALOG for RMAN catalog tables.<sup></sup> &nbsp;</p>



<p>ZDLRA&#8217;s centralized and self-managing RMAN catalog serves as the &#8220;single source of truth&#8221; for all protected databases, enabling simplified management and consistent recovery across the enterprise. In traditional environments, RMAN catalogs might be separate or controlfile-based, leading to management complexity for many databases. ZDLRA mandates and manages a central catalog within its own embedded RAC database.<sup></sup> This catalog automatically reflects all virtual full backups and other recovery assets created by ZDLRA.<sup></sup> Database administrators (DBAs) interact with this catalog via standard RMAN commands for restores, without needing to know the internal complexities of virtual backups or delta pools.<sup></sup> This centralization and automation significantly simplify backup administration, especially in large environments. &nbsp;</p>



<h3 class="wp-block-heading">C. Control Flow and Policy Enforcement</h3>



<p>Protection policies are defined on ZDLRA to manage recovery window goals, data retention periods on disk and tape/cloud, replication, and other backup lifecycle aspects.<sup></sup> These policies are applied to protected databases. ZDLRA&#8217;s automated space management tasks (deletion of old backups, delta pool optimization) are driven by these policies.<sup></sup> Enterprise Manager Cloud Control is typically used to manage and monitor ZDLRA and its policies.<sup></sup> &nbsp;</p>



<p>ZDLRA&#8217;s policy-based management automates much of the backup lifecycle, abstracting complexity and ensuring adherence to defined service levels. Manual management of backup retention, replication, and tiering for hundreds of databases is error-prone and labor-intensive. ZDLRA allows administrators to define high-level protection policies (e.g., Gold, Silver, Bronze with different RPOs/retention <sup></sup>). The appliance then automatically enforces these policies, managing space, creating virtual full backups, replicating data, and archiving to secondary storage.<sup></sup> This automation ensures consistency, reduces administrative burden, and helps organizations meet their data protection SLAs reliably. &nbsp;</p>



<p>The following table illustrates the interactive workflow between Delta Push and Delta Store step-by-step:</p>



<p><strong>Table 3: Delta Push and Delta Store Interaction Workflow</strong></p>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><th>Step No.</th><th>Action/Process</th><th>Responsible Component(s)</th><th>Key Outcome of the Step</th></tr><tr><td>1</td><td>Database Change</td><td>Protected Database</td><td>Data is modified.</td></tr><tr><td>2</td><td>Redo Sent</td><td>Protected Database (LGWR), ZDLRA (Delta Push Receiver)</td><td>Real-time redo data is transferred to and staged on ZDLRA.</td></tr><tr><td>3</td><td>Incremental Backup Initiated</td><td>Protected Database (RMAN)</td><td>Periodic incremental backup process is triggered.</td></tr><tr><td>4</td><td>Blocks Sent to ZDLRA</td><td>RA Backup Module, ZDLRA (Delta Push Receiver)</td><td>Changed data blocks are transmitted to ZDLRA.</td></tr><tr><td>5</td><td>ZDLRA Validates and Compresses</td><td>ZDLRA (Delta Store)</td><td>Incoming blocks are validated and compressed.</td></tr><tr><td>6</td><td>Blocks Indexed in Delta Pool</td><td>ZDLRA (Delta Store)</td><td>Changed blocks are added to the relevant delta pool and indexed.</td></tr><tr><td>7</td><td>Virtual Full Backup Created</td><td>ZDLRA (Delta Store)</td><td>A new virtual full backup is synthesized using new and existing blocks.</td></tr><tr><td>8</td><td>Catalog Updated</td><td>ZDLRA (Catalog)</td><td>New virtual full backup and archived logs become available in the RMAN catalog for recovery.</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">V. Conclusion: Technical Significance of Delta Push and Delta Store in ZDLRA</h2>



<h3 class="wp-block-heading">A. Summary of Core Architectural and Operational Principles</h3>



<p>Delta Push is an efficient, dual-pronged mechanism (RMAN incrementals + real-time redo) for transferring only necessary changes from protected Oracle databases to ZDLRA. Delta Store is the intelligent, Oracle-aware repository that ingests these changes, versions data blocks at a granular level within delta pools, and synthesizes space-efficient virtual full backups. This &#8220;incremental forever&#8221; approach, powered by Delta Push and Delta Store, minimizes production impact, dramatically reduces RPO, and simplifies recovery.</p>



<h3 class="wp-block-heading">B. Impact on Data Protection, Recovery Speed, and Efficiency</h3>



<p>The combined effect of Delta Push and Delta Store fundamentally redefines Oracle database backup and recovery from a periodic, resource-intensive chore to a continuous, low-impact, and highly reliable data assurance service.</p>



<ul class="wp-block-list">
<li><strong>Data Protection:</strong> Near-zero data loss (sub-second RPO) is achieved thanks to Delta Push&#8217;s real-time redo transport component. Enhanced resilience against ransomware is offered through immutable backups and rapid recovery capabilities. Continuous validation guarantees backup integrity.  </li>



<li><strong>Recovery Speed:</strong> Fast restores from virtual full backups are possible without the need to apply numerous incrementals on the production server. The &#8220;time machine&#8221; feature enables rapid rollback. The Dialog Semiconductor case study showed approximately 4x faster restores.  </li>



<li><strong>Efficiency:</strong> Significant reductions in backup windows, production server load (CPU, I/O), network traffic, and storage consumption are achieved through the incremental forever strategy, Delta Push, virtual full backups, and advanced compression. Backup operations are offloaded from database servers.  </li>
</ul>



<p>Traditional backups are disruptive events.<sup></sup> Delta Push makes data ingestion minimally impactful.<sup></sup> Delta Store optimizes backup data for space and makes it immediately ready in a &#8220;full&#8221; format for rapid recovery.<sup></sup> Automation and continuous validation <sup></sup> add layers of reliability. This transforms the entire data protection posture from a necessary evil to an integrated, efficient, and highly effective component of Oracle database operations, as evidenced by benefits like those at Dialog Semiconductor <sup></sup> and reported overall TCO reductions.<sup></sup> &nbsp;</p>



<p>Furthermore, the Delta Push and Delta Store architecture offers a robust defense mechanism against modern cyber threats like ransomware, not just by enabling fast recovery, but by ensuring the integrity and availability of recovery points up to the last moments before an attack. Ransomware attacks aim to encrypt data and backups, making recovery difficult or impossible.<sup></sup> ZDLRA&#8217;s real-time redo capture via Delta Push allows recovery to within seconds of an attack.<sup></sup> Delta Store&#8217;s continuous validation <sup></sup> helps detect corruption early. Features like backup immutability <sup></sup> protect the backups themselves. The ability to rapidly restore a clean, virtual full backup to a secure location <sup></sup> means organizations can avoid paying ransoms. Thus, the technical design directly translates into enhanced cyber resilience, a critical requirement in today&#8217;s threat landscape</p>



<p></p>
<p>The post <a rel="nofollow" href="https://www.bugraparlayan.com.tr/analysis-of-delta-push-and-delta-store-mechanisms-within-zdlra.html">Analysis of Delta Push and Delta Store Mechanisms within ZDLRA</a> appeared first on <a rel="nofollow" href="https://www.bugraparlayan.com.tr">Bugra Parlayan | Oracle Database &amp; Exadata Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Oracle 23ai Tablespace Shrink</title>
		<link>https://www.bugraparlayan.com.tr/oracle-23ai-tablespace-shrink.html</link>
		
		<dc:creator><![CDATA[Bugra Parlayan]]></dc:creator>
		<pubDate>Sun, 11 May 2025 16:57:59 +0000</pubDate>
				<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[ASM Storage]]></category>
		<category><![CDATA[AutoShrink]]></category>
		<category><![CDATA[Datafile Resize]]></category>
		<category><![CDATA[High Water Mark]]></category>
		<category><![CDATA[Oracle 23ai]]></category>
		<category><![CDATA[Segment Space Management]]></category>
		<category><![CDATA[Space Reclamation]]></category>
		<category><![CDATA[Storage Optimization]]></category>
		<category><![CDATA[Tablespace Shrinking]]></category>
		<category><![CDATA[Undo Tablespace]]></category>
		<guid isPermaLink="false">https://www.bugraparlayan.com.tr/?p=1469</guid>

					<description><![CDATA[<p>1. Introduction to the Oracle 23ai Tablespace Shrink Feature The Oracle 23ai database version introduces a significant innovation in storage management, addressing one of the most common and critical challenges faced by Database Administrators (DBAs): the Tablespace Shrink feature. In today&#8217;s digital age, data volumes are growing exponentially, leading to increased storage costs and greater &#8230;</p>
<p>The post <a rel="nofollow" href="https://www.bugraparlayan.com.tr/oracle-23ai-tablespace-shrink.html">Oracle 23ai Tablespace Shrink</a> appeared first on <a rel="nofollow" href="https://www.bugraparlayan.com.tr">Bugra Parlayan | Oracle Database &amp; Exadata Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">1. Introduction to the Oracle 23ai Tablespace Shrink Feature</h2>



<p>The Oracle 23ai database version introduces a significant innovation in storage management, addressing one of the most common and critical challenges faced by Database Administrators (DBAs): the Tablespace Shrink feature. In today&#8217;s digital age, data volumes are growing exponentially, leading to increased storage costs and greater complexity in managing storage infrastructures. This feature, introduced with Oracle 23ai, offers the potential to both optimize storage costs and improve database performance by effectively reclaiming unused disk space that accumulates within tablespaces over time.<sup></sup> Oracle&#8217;s overall strategy is geared towards simplifying and automating database management tasks; the Tablespace Shrink feature aligns with this vision, enabling DBAs to work more efficiently.<sup></sup> &nbsp;</p>



<p>The development of such intelligent storage management features is closely linked to Oracle&#8217;s &#8220;Autonomous Database&#8221; vision and the flexible storage demands in cloud computing. In cloud environments, storage resources are often based on a &#8220;pay-as-you-go&#8221; model, where every unused byte translates to unnecessary costs. Manual space management can be both time-consuming and prone to errors. Automated or semi-automated space reclamation mechanisms like Tablespace Shrink have the potential to significantly reduce these costs and the management burden. This aligns perfectly with Oracle&#8217;s cloud strategy and its goal of evolving databases into self-sufficient, resource-efficient &#8220;Autonomous&#8221; systems. Furthermore, this feature holds significant value not only for large-scale enterprise systems but also for environments with more limited resources, such as Oracle Database Free. The fact that the SYSAUX tablespace, which can grow over time due to components like AWR data and scheduled task logs, can also be shrunk <sup></sup> offers users operating within the 12 GB user data limit of Oracle Database Free <sup></sup> the ability to allocate more space for application data. This can be seen as a reflection of Oracle&#8217;s strategy to support the developer community and smaller-scale users. &nbsp;</p>



<h2 class="wp-block-heading">2. What is Tablespace Shrink and Why is it Important for Database Optimization?</h2>



<p>At its core, the Tablespace Shrink operation is the process of reorganizing data segments (e.g., tables, indexes) within an Oracle tablespace to consolidate unused free space accumulated at the end of data files, and then reducing the physical size of these data files to return the freed disk space to the operating system.<sup></sup> Databases are dynamic structures; continuous data insertion, deletion, and update operations result in unused spaces, or &#8220;fragmentation,&#8221; within tablespaces. Tablespace Shrink aims to make this idle space reusable. &nbsp;</p>



<p>The importance of this feature can be summarized in several key points:</p>



<ul class="wp-block-list">
<li><strong>Space Reclamation and Cost Optimization:</strong> Its most apparent benefit is the recovery of unused (&#8220;empty&#8221;) disk space left behind after objects are deleted or moved elsewhere in the database. This translates directly into cost savings, especially in enterprise environments where storage costs are high or in cloud-based systems where capacity planning is critical. Studies have shown that tablespace shrinking operations reduce total storage costs and postpone the need for additional disk purchases. Oracle 23ai&#8217;s feature &#8220;allows you to reclaim unused space in the database, reducing costs and optimizing storage&#8221;.  </li>



<li><strong>Performance Improvement:</strong> Reducing data fragmentation can lead to noticeable increases in query performance. When data is stored in more organized and contiguous blocks, operations like full table scans or wide-ranging index range scans can be completed with fewer I/O operations. This shortens disk read times and allows for more efficient use of the database buffer cache. One case study reported that a 30% reduction in tablespace size led to a 25% improvement in query performance.  </li>



<li><strong>Reduced Backup and Restore Times:</strong> As the size of data files decreases, the time required to back them up and restore them in a disaster recovery scenario also decreases. This is a critical advantage, especially for large databases with tight backup windows and stringent recovery time objectives (RTO).  </li>



<li><strong>Simplified Management:</strong> A more organized, less fragmented, and optimized tablespace structure simplifies overall database administration.</li>
</ul>



<p>Before Oracle 23ai, shrinking tablespaces was often a cumbersome and complex process. DBAs frequently encountered the <code>$ORA-03297$: file contains used data beyond requested RESIZE value</code> error when attempting to shrink a data file.<sup></sup> This error occurred because there were still in-use data blocks anywhere in the data file beyond the desired shrink boundary. To overcome this, methods such as <code>ALTER TABLE... MOVE</code>, online table redefinition with the <code>DBMS_REDEFINITION</code> package, recreating the table using <code>CREATE TABLE AS SELECT</code> (CTAS), or exporting and re-importing the table were used.<sup></sup> However, these older methods were generally complex, time-consuming, required significant additional temporary storage, and often meant downtime for the affected objects. The Tablespace Shrink feature significantly mitigates these challenges by offering a simpler, integrated solution. &nbsp;</p>



<p>Tablespace Shrink can be viewed not just as a reactive tool (i.e., reclaiming free space after a large data deletion) but also as part of a proactive storage management strategy. Databases are inherently dynamic; continuous data insertion, deletion, and update operations lead to fragmentation and the accumulation of unused space over time.<sup></sup> Therefore, by periodically assessing the state of tablespaces using the <code>DBMS_SPACE.SHRINK_TABLESPACE</code> procedure in analyze mode (<code>TS_SHRINK_MODE_ANALYZE</code>) and applying the shrink operation (<code>TS_SHRINK_MODE_SHRINK</code> or other appropriate modes) when necessary—not just after major cleanup operations—storage health and efficiency can be consistently maintained at a high level. This proactive approach can help prevent sudden storage issues, performance degradation, and unnecessary storage costs. Performance improvements are not limited to end-user queries but can also provide indirect benefits in Oracle&#8217;s internal background processes, such as accessing data file headers and extent management. Compacting segments and reducing disorganization <sup></sup> can mean less physical and logical I/O, not only for full table scans but also for index accesses and even Data Manipulation Language (DML) operations. &nbsp;</p>



<h2 class="wp-block-heading">3. Enhancements in Oracle 23ai Version for Tablespace Management</h2>



<p>The Tablespace Shrink feature is one of the significant innovations introduced with the Oracle database 23ai version.<sup></sup> With this release, the long-awaited capability for DBAs to safely and effectively reclaim unused space in tablespaces has been directly integrated into the database core. Initially, this feature was primarily designed for Bigfile tablespaces. Bigfile tablespaces consist of a single large data file (supporting up to 4G blocks) and are intended to simplify the management of very large databases compared to traditional Smallfile tablespaces (which can contain multiple, smaller data files).<sup></sup> The default creation of essential system tablespaces like SYSAUX, SYSTEM, and USER as Bigfile tablespaces in Oracle Database 23ai also indicates a trend in this direction.<sup></sup> &nbsp;</p>



<p>The scope of the feature was significantly expanded with a subsequent update to Oracle Database 23ai, Release Update 23.7 (and later). This update extended Tablespace Shrink functionality to support Smallfile tablespaces as well.<sup></sup> This enhancement is of great importance, especially for organizations with legacy systems that use multiple small data files or for environments that prefer the Smallfile tablespace structure due to specific application requirements. Although the default tablespace type in Oracle 23ai is set to Bigfile, the option to create Smallfile tablespaces still exists, and this new development makes storage management for Smallfile tablespaces more flexible and efficient.<sup></sup> &nbsp;</p>



<p>Oracle&#8217;s strategy of first introducing a feature for more modern and relatively simpler data structures like Bigfile tablespaces, and then extending support to more traditional and potentially complex structures like Smallfile tablespaces, often reflects a phased rollout and maturation approach. Bigfile tablespaces, consisting of a single large data file, present less complexity for implementing and testing a shrink mechanism compared to Smallfile tablespaces, which involve the interaction of multiple data files.<sup></sup> By first introducing a new and significant feature in this more controlled environment, Oracle aims to ensure stability and make improvements based on user feedback. Smallfile tablespaces, on the other hand, can contain multiple data files, and how these are managed during a shrink operation (e.g., consolidating data into fewer files, shrinking each file individually) can introduce additional operational complexities.<sup></sup> Therefore, the introduction of Smallfile support with a Release Update (RU) after the feature&#8217;s initial debut has allowed for further maturation of the feature and its confident adoption by a broader user base. &nbsp;</p>



<p>The delivery of Smallfile support via a Release Update like 23.7 also reflects Oracle&#8217;s &#8220;continuous innovation&#8221; model. Oracle delivers both bug fixes and new features and enhancements through RUs released between major database versions.<sup></sup> The fact that Smallfile support for a significant feature like Tablespace Shrink came with an RU once again underscores the importance for users to keep their systems at current RU levels to benefit from such valuable developments. This also highlights the necessity for DBAs to regularly follow Oracle&#8217;s feature announcements, release notes, and support documentation. &nbsp;</p>



<h2 class="wp-block-heading">4. Advantages of Oracle 23ai Tablespace Shrink</h2>



<p>The Tablespace Shrink feature in Oracle 23ai offers several tangible advantages to database administrators and, consequently, to organizations. These benefits range from storage efficiency to performance gains:</p>



<ul class="wp-block-list">
<li><strong>Optimized Storage Utilization and Cost Reduction:</strong> The most fundamental and direct benefit is the increased disk space efficiency achieved by reclaiming &#8220;empty&#8221; space that accumulates in tablespaces over time and is not actively used. This idle space, resulting from deleted tables, updated data, or reorganized indexes, can be effectively returned to the operating system using the <code>DBMS_SPACE.SHRINK_TABLESPACE</code> procedure. This translates directly into financial savings, especially in large data environments where storage costs are a significant expense, or on cloud platforms where a pay-as-you-go model is prevalent. Many sources state that this feature &#8220;helps both reduce costs and optimize database storage&#8221;  and &#8220;lowers total storage costs&#8221;. Oracle&#8217;s own promotions also state, &#8220;This feature allows you to reclaim unused space in the database, reducing costs and optimizing storage&#8221;.  </li>



<li><strong>Enhanced Query Performance:</strong> The Tablespace Shrink operation reduces data fragmentation by reorganizing and compacting segments. When logically related data blocks are also physically located in closer proximity on the disk, Oracle&#8217;s data access becomes faster. This leads to shorter completion times for I/O-intensive operations, particularly full table scans and wide-ranging index range scans. Fewer and more efficient I/O operations result in improved overall query response times. A case study reported that a 30% reduction in tablespace size led to a 25% improvement in query performance. Considering that fragmentation &#8220;increases data retrieval times and slows query performance&#8221; , this improvement is quite significant.  </li>



<li><strong>Faster Backup and Recovery Operations:</strong> When the total size of data files is reduced, the time required to back up these files (e.g., with RMAN) and restore them in a disaster scenario is also significantly shortened. Less data to read, process, and write contributes to more effective use of backup windows and improves critical business continuity metrics like Recovery Time Objectives (RTO) and Recovery Point Objectives (RPO). One study noted that the shrink operation &#8220;reduced backup times by 20%&#8221;.  </li>



<li><strong>Simplified Storage Management:</strong> Especially in Smallfile tablespaces composed of numerous small data files, the shrink operation (if it can consolidate data files) can create a structure with fewer, more organized data files. This simplifies overall file system management and tablespace maintenance tasks. While Bigfile tablespaces already have a single data file, making this advantage more pertinent to Smallfile environments, improving the internal organization of a Bigfile also indirectly contributes to manageability.  </li>
</ul>



<p>These advantages are often interconnected and create a combined effect. For instance, reduced fragmentation (leading to performance gains) and smaller data file sizes (providing space savings) directly contribute to shorter backup times. The shrink operation consolidates free space by moving objects towards the beginning of the data file.<sup></sup> This ensures that data that should be logically contiguous is also physically closer, reducing fragmentation. Reduced fragmentation allows queries to access data faster because fewer I/O operations and extent reads are required. Simultaneously, the total size of the data file decreases. Smaller data files mean that backup tools like RMAN need to read and write less data, which shortens backup times. &nbsp;</p>



<p>The concept of &#8220;cost optimization&#8221; is not limited to direct disk space costs. It can also mean less administrative effort (thus reducing human resource costs) and potentially lower licensing costs (if some cloud services or third-party tools have licensing models based on storage size). While manual shrink operations or complex scripts require time and deep expertise <sup></sup>, the <code>DBMS_SPACE.SHRINK_TABLESPACE</code> procedure greatly simplifies this process, saving DBAs valuable time. &nbsp;</p>



<h2 class="wp-block-heading">5. Working Mechanism of Tablespace Shrink in Oracle 23ai</h2>



<p>The fundamental working principle of the Tablespace Shrink feature in Oracle 23ai is based on two main steps: first, reorganizing segments (tables, indexes, etc.) within the tablespace to consolidate free space; and second, physically shrinking the data file(s) at the end where this consolidated free space has accumulated, thereby returning disk space to the operating system.<sup></sup> &nbsp;</p>



<p><strong>Object Movement (Online/Offline) and Its Core Logic:</strong> The first and most critical step of the procedure is to efficiently move various segments (tables, indexes, LOB segments, etc.) within the tablespace towards the beginning of the data file or files. This movement ensures that unused free spaces, scattered among data blocks and causing &#8220;fragmentation,&#8221; are gathered at the end of the data file(s).<sup></sup> This creates a large, contiguous block of free space at the end of the data file that can then be shrunk. &nbsp;</p>



<p>This object movement is performed via Oracle&#8217;s Data Definition Language (DDL) commands, either online or offline, depending on the <code>shrink_mode</code> parameter passed to the <code>DBMS_SPACE.SHRINK_TABLESPACE</code> procedure.<sup></sup> &nbsp;</p>



<ul class="wp-block-list">
<li><strong>Online Move:</strong> When <code>TS_SHRINK_MODE_ONLINE</code> or <code>TS_SHRINK_MODE_AUTO</code> (in case of a successful online attempt) modes are selected, Oracle attempts to move objects while allowing DML (INSERT, UPDATE, DELETE) operations and queries on the respective objects. This is important for maintaining application availability. However, online operations generally consume more system resources (CPU, I/O, redo log) and can be slower than offline operations due to certain locking mechanisms.  </li>



<li><strong>Offline Move:</strong> When <code>TS_SHRINK_MODE_OFFLINE</code> or <code>TS_SHRINK_MODE_AUTO</code> (if the online attempt fails) modes are selected, objects are moved offline. This means access to the respective objects will be blocked during the move operation. However, offline movement is generally faster and can, in some cases, achieve more effective compaction.  </li>
</ul>



<p>It is noted that for Smallfile tablespaces, these move operations trigger well-known DDL commands like <code>ALTER TABLE &lt;table_name&gt; MOVE ONLINE</code> and <code>ALTER INDEX &lt;index_name&gt; REBUILD ONLINE</code> in the background.<sup></sup> This indicates that the Tablespace Shrink feature doesn&#8217;t work &#8220;magically&#8221; but rather intelligently orchestrates Oracle&#8217;s existing and proven DDL capabilities. &nbsp;</p>



<p><strong>Data File Resizing Process:</strong> After objects are successfully moved and unused free space is consolidated at the end of the data file(s), the second main step of the <code>DBMS_SPACE.SHRINK_TABLESPACE</code> procedure comes into play: reducing the physical size of the data file(s).<sup></sup> This operation works with a logic similar to the <code>ALTER DATABASE DATAFILE &lt;datafile_name&gt; RESIZE &lt;new_size&gt;</code> command. However, unlike using this command directly, the Tablespace Shrink feature performs the object movement step beforehand, thus preventing the <code>ORA-03297</code> error (file contains used data beyond requested RESIZE value). A successful object movement &#8220;cleans&#8221; the end of the data file, allowing the resize operation to be performed safely and the reclaimed free space to be physically returned to the operating system. &nbsp;</p>



<p>The use of &#8220;Online DDL&#8221; demonstrates Oracle&#8217;s emphasis on uninterrupted operations and high availability. However, the term &#8220;online&#8221; does not always mean &#8220;zero impact.&#8221; While online DDL operations allow DML operations to continue <sup></sup>, they perform intensive background tasks such as copying data blocks, logging, and metadata updates. These activities create an additional load on the system in terms of CPU, I/O, and redo log generation. Especially on heavily loaded systems, this extra load can temporarily affect overall database performance. Therefore, even in online mode, it is generally recommended to perform Tablespace Shrink operations during periods of lower system activity or within planned maintenance windows.<sup></sup> &nbsp;</p>



<p>In Smallfile tablespaces with multiple data files, the shrink operation may attempt to consolidate these files and reduce the number of data files.<sup></sup> This aims not only to reclaim disk space but also to simplify file management. However, some observations suggest that &#8220;unlike bigfile tablespace shrink, smallfile tablespace shrink doesn&#8217;t appear to release much free space&#8221;.<sup></sup> This might indicate that in Smallfile tablespaces, the priority is sometimes to reduce data files to a minimum number and then shrink the remaining files, rather than raw space reclamation. Especially in older systems with many small data files, this consolidation step can be considered a managerial gain, even if there isn&#8217;t a large reduction in the total number of used blocks. &nbsp;</p>



<h2 class="wp-block-heading">6. Deep Dive into <code>DBMS_SPACE.SHRINK_TABLESPACE</code> Procedure</h2>



<p>The central tool for performing tablespace shrink operations in Oracle 23ai is the <code>SHRINK_TABLESPACE</code> PL/SQL procedure, located within the <code>DBMS_SPACE</code> package.<sup></sup> This procedure supports both Bigfile tablespaces and, from Oracle 23ai Release Update 23.7 onwards, Smallfile tablespaces. It is primarily used for two main purposes: first, to analyze a tablespace before actually shrinking it, reporting potential space savings and movable objects (<code>ANALYZE</code> mode); and second, to directly perform the shrink operation (<code>SHRINK</code> modes).<sup></sup> &nbsp;</p>



<p><strong>Parameters and Their Meanings:</strong> The <code>DBMS_SPACE.SHRINK_TABLESPACE</code> procedure accepts various parameters to control its behavior. A correct understanding of these parameters is crucial for the effective use of the feature.</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><th>Parameter Name</th><th>Data Type</th><th>IN/OUT</th><th>Default Value</th><th>Description</th></tr><tr><td><code>ts_name</code></td><td>VARCHAR2</td><td>IN</td><td>None</td><td>The name of the tablespace to be shrunk or analyzed. <sup></sup></td></tr><tr><td><code>shrink_mode</code></td><td>NUMBER</td><td>IN</td><td><code>DBMS_SPACE.TS_SHRINK_MODE_ONLINE</code></td><td>Determines the operating mode of the procedure. One of the following constants is used.</td></tr><tr><td></td><td></td><td></td><td><code>DBMS_SPACE.TS_SHRINK_MODE_ANALYZE</code></td><td>Analyzes the tablespace, reports potential savings, but performs no shrink. (Formerly <code>DBMS_SPACE.TS_MODE_ANALYZE</code>) <sup></sup></td></tr><tr><td></td><td></td><td></td><td><code>DBMS_SPACE.TS_SHRINK_MODE_ONLINE</code></td><td>Default mode. Attempts to move objects online (except Index-Organized Tables, which are moved offline). Aims for minimal downtime. (Formerly <code>DBMS_SPACE.TS_MODE_SHRINK</code>) <sup></sup></td></tr><tr><td></td><td></td><td></td><td><code>DBMS_SPACE.TS_SHRINK_MODE_AUTO</code></td><td>First attempts an online move; if it fails, switches to an offline move. (Formerly <code>DBMS_SPACE.TS_MODE_SHRINK_FORCE</code>) <sup></sup></td></tr><tr><td></td><td></td><td></td><td><code>DBMS_SPACE.TS_SHRINK_MODE_OFFLINE</code></td><td>Moves objects offline. Offers the best shrink result and performance in terms of processing time, but objects become inaccessible during the operation. (Distinct naming for 23.7 and later) <sup></sup></td></tr><tr><td><code>target_size</code></td><td>NUMBER</td><td>IN</td><td><code>DBMS_SPACE.TS_TARGET_MAX_SHRINK</code></td><td>Specifies the target size of the tablespace in bytes after shrinking. The default value aims to shrink to the smallest possible size. <sup></sup></td></tr><tr><td><code>shrink_result</code></td><td>CLOB</td><td>OUT</td><td>None (Optional)</td><td>An output parameter that returns the result of the operation as a CLOB (Character Large Object). In analyze mode, it contains movable objects, potential savings; in shrink modes, it includes the number of moved objects, old/new size, etc. <sup></sup></td></tr></tbody></table></figure>



<p><strong>Note on the <code>ITERATIONS</code> Parameter:</strong> Although some community resources or blog posts <sup></sup> mention an <code>ITERATIONS</code> parameter for the <code>SHRINK_TABLESPACE</code> procedure, Oracle&#8217;s official <code>DBMS_SPACE</code> package reference documentation <sup></sup> does not list such a parameter for this procedure. The concept of <code>ITERATIONS</code> is more commonly associated with the <code>Automatic SecureFiles Shrink</code> feature.<sup></sup> Therefore, it should be assumed that an <code>ITERATIONS</code> parameter is not a standard feature of <code>DBMS_SPACE.SHRINK_TABLESPACE</code>, and this information is likely a misunderstanding or pertains to a custom development environment. Users are always advised to refer to official Oracle documentation. &nbsp;</p>



<p><strong>Usage Scenarios and SQL Examples:</strong> Below are SQL examples demonstrating how the <code>DBMS_SPACE.SHRINK_TABLESPACE</code> procedure can be used in different scenarios. These examples assume <code>DBMS_OUTPUT</code> is used to view the results; the <code>shrink_result</code> CLOB parameter can be used to retrieve similar information programmatically.</p>



<ul class="wp-block-list">
<li><strong>Analyze Mode Usage (To See Potential Savings):</strong> <br><br>SQL<code>SET SERVEROUTPUT ON; DECLARE v_result CLOB; BEGIN DBMS_SPACE.SHRINK_TABLESPACE( ts_name => 'USERS', shrink_mode => DBMS_SPACE.TS_SHRINK_MODE_ANALYZE, shrink_result => v_result ); DBMS_OUTPUT.PUT_LINE('---ANALYZE RESULT---'); DBMS_OUTPUT.PUT_LINE(v_result); END; /</code> <br><br>This command analyzes the &#8216;USERS&#8217; tablespace and reports how much space can be saved and which objects can be moved, but does not perform any shrinking.  <br></li>



<li><strong>Default Shrink Mode (Online Move, Maximum Possible Shrink):</strong> <br><br>SQL<code>SET SERVEROUTPUT ON; DECLARE v_result CLOB; BEGIN DBMS_SPACE.SHRINK_TABLESPACE( ts_name => 'USERS', shrink_result => v_result -- shrink_mode and target_size take default values ); DBMS_OUTPUT.PUT_LINE('---SHRINK RESULT---'); DBMS_OUTPUT.PUT_LINE(v_result); END; /</code> <br><br>This command shrinks the &#8216;USERS&#8217; tablespace in the default <code>TS_SHRINK_MODE_ONLINE</code> mode and with the <code>TS_TARGET_MAX_SHRINK</code> target size.  <br></li>



<li><strong>Shrinking to a Specific Target Size (Online Mode):</strong> <br><br>SQL<code>SET SERVEROUTPUT ON; DECLARE v_result CLOB; BEGIN DBMS_SPACE.SHRINK_TABLESPACE( ts_name => 'MYDATA', shrink_mode => DBMS_SPACE.TS_SHRINK_MODE_ONLINE, target_size => 100 * 1024 * 1024, -- 100 MB target size shrink_result => v_result ); </code><br><code>DBMS_OUTPUT.PUT_LINE('---SHRINK RESULT---'); DBMS_OUTPUT.PUT_LINE(v_result); END; /</code> <br><br>This example aims to shrink the &#8216;MYDATA&#8217; tablespace to approximately 100 MB in online mode.  <br></li>



<li><strong>AUTO Mode Usage (Try Online First, then Offline if Necessary):</strong> <br><br>SQL<code>SET SERVEROUTPUT ON; DECLARE v_result CLOB; BEGIN DBMS_SPACE.SHRINK_TABLESPACE( ts_name => 'USERS', shrink_mode => DBMS_SPACE.TS_SHRINK_MODE_AUTO, shrink_result => v_result ); DBMS_OUTPUT.PUT_LINE('---SHRINK RESULT (AUTO MODE)---'); DBMS_OUTPUT.PUT_LINE(v_result); END; /</code><br></li>



<li><strong>OFFLINE Mode Usage (For Best Shrink, if Downtime is Acceptable):</strong> <br><br>SQL<code>SET SERVEROUTPUT ON; </code><br><code>DECLARE v_result CLOB; </code><br><code>BEGIN DBMS_SPACE.SHRINK_TABLESPACE( ts_name => 'USERS', shrink_mode => DBMS_SPACE.TS_SHRINK_MODE_OFFLINE, shrink_result => v_result ); DBMS_OUTPUT.PUT_LINE('---SHRINK RESULT (OFFLINE MODE)---'); DBMS_OUTPUT.PUT_LINE(v_result); END; /</code></li>
</ul>



<p>The presence of the <code>shrink_result</code> CLOB parameter allows for more detailed and structured retrieval of the operation&#8217;s results (often in JSON or XML format, though the documentation doesn&#8217;t specify the format), enabling these results to be programmatically processed by automation scripts or custom reporting tools. For example, within a PL/SQL block, this CLOB content can be parsed to extract metrics such as the number of objects moved, the amount of space reclaimed, and processing time. This information can then be saved to custom log tables, emailed to relevant personnel, or integrated into a monitoring system.</p>



<p>The introduction of the <code>TS_SHRINK_MODE_AUTO</code> mode demonstrates Oracle&#8217;s effort to provide an intelligent default behavior: &#8220;first try with minimal downtime and in the safest way; if the target cannot be reached with this method or some objects cannot be moved, then automatically switch to a more effective but potentially downtime-inducing method.&#8221; This somewhat reduces the burden on the database administrator to decide &#8220;online or offline?&#8221; for each object or situation. In this mode, Oracle first attempts an online move; if the online move fails for an object (e.g., the object type does not support online move, or the operation cannot be performed due to a lock), it then attempts an offline move for the same object. This is a &#8220;best-effort&#8221; approach aimed at balancing both availability and space reclamation.</p>



<h2 class="wp-block-heading">7. Oracle Enterprise Manager (EM) Integration for Tablespace Shrink</h2>



<p>Oracle Enterprise Manager (EM) is a comprehensive toolset for centrally managing, monitoring, and maintaining Oracle databases and other Oracle products. In the context of the Tablespace Shrink feature, EM can assist DBAs, particularly with analysis, visualization, and indirect monitoring capabilities.</p>



<p><strong>Tablespace Occupancy and Content Analysis (Extent Map):</strong> EM Cloud Control offers powerful tools to visualize the current occupancy rates of tablespaces, the distribution of segments they contain, and, most importantly, where and how much free space (fragmentation) exists. Specifically, the &#8220;Extent Map&#8221; view graphically displays the status (in use, free) of each extent (space allocation unit) within a tablespace. Free spaces are typically colored green, and this map is very useful for understanding whether a shrink operation is needed and where potential savings are concentrated.<sup></sup> DBAs can usually navigate to the relevant tablespace via the <code>Administration</code> -&gt; <code>Storage</code> -&gt; <code>Tablespaces</code> menu path in the EM interface, then select the tablespace and choose an option like &#8220;Show Tablespace Content&#8221; to access this detailed extent map.<sup></sup> This visual analysis is an important step for assessing the situation before running the <code>DBMS_SPACE.SHRINK_TABLESPACE</code> procedure. &nbsp;</p>



<p><strong>Space Gain Analysis with Segment Advisor:</strong> Segment Advisor, an integral part of EM, is an automated tool that analyzes how much space can be gained by reorganizing or compressing tablespaces and individual segments (tables, indexes, etc.) within them.<sup></sup> Segment Advisor evaluates the fragmentation level, number of empty blocks, and other metrics for specific segments, providing concrete recommendations on which segments would benefit most from a shrink operation. These recommendations, similar to the information provided by the <code>TS_SHRINK_MODE_ANALYZE</code> mode of the <code>DBMS_SPACE.SHRINK_TABLESPACE</code> procedure, can be used to assess space reclamation potential and plan the shrink strategy. &nbsp;</p>



<p><strong>Monitoring and Management of Shrink Operations via EM:</strong> Based on available research materials and Oracle documentation <sup></sup>, there is no clear evidence that Enterprise Manager has the capability to <strong>initiate, schedule, or actively manage</strong> the <code>DBMS_SPACE.SHRINK_TABLESPACE</code> procedure directly through a graphical user interface (GUI) wizard, a dedicated button, or a menu option. Although EM typically integrates new PL/SQL-based management features into its GUIs over time, such direct integration does not appear to exist for this specific feature (at least according to the cited sources). Some inaccessible resources <sup></sup> might contain more details, but this conclusion is based on the currently available information. &nbsp;</p>



<p>However, this does not mean EM is entirely irrelevant to the shrink process. EM&#8217;s general database monitoring capabilities (e.g., performance monitoring pages, active sessions list, long-running SQL operations reports) can be used to indirectly monitor the progress and system impact (CPU usage, I/O activity, waits, etc.) of a <code>DBMS_SPACE.SHRINK_TABLESPACE</code> operation initiated via SQL*Plus, SQL Developer, or an automation script. For example, records related to the shrink operation in the <code>V$SESSION_LONGOPS</code> view (if Oracle flags this operation as a long-running one) might be reflected in EM&#8217;s performance monitoring interfaces.<sup></sup> &nbsp;</p>



<p>The absence of a direct &#8220;run&#8221; button or a dedicated management screen in EM for <code>DBMS_SPACE.SHRINK_TABLESPACE</code> might suggest that Oracle prefers such powerful operations—which can potentially be lengthy, resource-intensive, and even cause downtime—to be performed under the full and conscious control of the DBA, typically via scripts and with a full understanding of all parameters. GUIs can sometimes struggle to offer the user the full flexibility and control level provided by PL/SQL procedures. Therefore, Oracle might expect DBAs to execute these critical operations via SQL*Plus, SQL Developer, or automation scripts, carefully specifying all parameters and modes. In this scenario, EM primarily takes on the role of performing detailed analysis before these operations (via Segment Advisor, Extent Map) and monitoring the overall system status and performance during/after the operation.</p>



<p>Nevertheless, given Oracle&#8217;s trend of integrating new database features into Enterprise Manager GUIs over time, it is quite plausible that future EM versions or add-ons for database management packs will offer a more integrated management interface for the <code>DBMS_SPACE.SHRINK_TABLESPACE</code> feature.</p>



<h2 class="wp-block-heading">8. Key Considerations and Limitations for Tablespace Shrink</h2>



<p>While the Tablespace Shrink feature in Oracle 23ai offers significant advantages in storage management, understanding certain limitations and crucial considerations is necessary for its successful and trouble-free implementation.</p>



<p><strong>Unsupported Object Types:</strong> The <code>DBMS_SPACE.SHRINK_TABLESPACE</code> procedure is not capable of moving all object types within a tablespace. When the procedure is run in <code>TS_SHRINK_MODE_ANALYZE</code> mode, the <code>shrink_result</code> CLOB output will include a list of objects that cannot be moved or are unsupported.<sup></sup> For example, it has been noted that cluster tables and some Advanced Queuing (AQ) tables may not be supported by this procedure.<sup></sup> Additionally, tables containing columns with the <code>LONG</code> data type, cluster tables, and tables with what Oracle terms &#8220;reservable columns&#8221; cannot be moved even in <code>TS_SHRINK_MODE_OFFLINE</code> (offline move) mode.<sup></sup> In tablespaces containing such objects, the shrink operation may not complete fully as expected, or these objects may remain in their original locations. &nbsp;</p>



<p><strong>Impact on LOB Segments, Index-Organized Tables (IOTs), and Partitioned Tables:</strong> The behavior of these commonly used special object types during a shrink operation and the specific conditions they require are as follows:</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><th>Object Type</th><th>Behavior/Support with <code>TS_SHRINK_MODE_ONLINE</code></th><th>Behavior/Support with <code>TS_SHRINK_MODE_OFFLINE</code></th><th>Special Notes/Considerations</th></tr><tr><td><strong>LOB (Large Object) Segments</strong></td><td>Movable. <sup></sup></td><td>Movable.</td><td>Row movement (<code>ROW MOVEMENT</code>) must be enabled on the relevant tables for effective shrinking. <sup></sup> Separate automatic shrink mechanisms also exist for SecureFiles LOBs (<code>DBMS_SPACE.SECUREFILE_SHRINK_ENABLED()</code>). <sup></sup></td></tr><tr><td><strong>Index-Organized Tables (IOT)</strong></td><td><strong>Moved offline.</strong> <sup></sup></td><td>Moved offline.</td><td>Even if <code>TS_SHRINK_MODE_ONLINE</code> is selected, IOTs are moved offline, implying downtime for IOT access. Secondary index and mapping table segments cannot be shrunk individually; shrinking the primary segment affects them as well. <sup></sup></td></tr><tr><td><strong>Partitioned Tables</strong></td><td>Tablespace-level shrink affects all partitions within. <sup></sup></td><td>Tablespace-level shrink affects all partitions within.</td><td>The <code>DBMS_SPACE</code> package generally supports partitioned structures. The <code>SHRINK_TABLESPACE</code> procedure takes the tablespace name; it&#8217;s unclear if individual partitions can be directly shrunk with this procedure, likely requiring methods like <code>ALTER TABLE... SHRINK SPACE PARTITION</code>. <sup></sup></td></tr><tr><td><strong>Cluster Tables</strong></td><td>May not be supported / Unmovable. <sup></sup></td><td>Unmovable. <sup></sup></td><td>The <code>ANALYZE</code> mode result should be checked.</td></tr><tr><td><strong>Advanced Queuing (AQ) Tables</strong></td><td>Some AQ tables may not be supported / Unmovable. <sup></sup></td><td>Some AQ tables may not be supported / Unmovable.</td><td>The <code>ANALYZE</code> mode result should be checked.</td></tr><tr><td><strong>Tables with <code>LONG</code> Data Type</strong></td><td>Unmovable. <sup></sup></td><td>Unmovable. <sup></sup></td><td></td></tr></tbody></table></figure>



<p><strong>Differences and Impacts of Online vs. Offline Move Modes:</strong></p>



<ul class="wp-block-list">
<li><strong>Online Modes (<code>TS_SHRINK_MODE_ONLINE</code>, online part of <code>TS_SHRINK_MODE_AUTO</code>):</strong> These modes aim to maximize application availability; DML operations and queries can continue while objects are being moved. However, this flexibility comes at a cost: background operations like data copying and index updating can create additional CPU, I/O, and redo log generation load on the system. Index-Organized Tables (IOTs) are moved offline even if this mode is selected. An important point is that online moves performed by <code>SHRINK_TABLESPACE</code> may not have all the restrictions of the traditional <code>ALTER TABLE... MOVE ONLINE</code> command; the <code>ANALYZE</code> mode will identify objects unsuitable for online move.  </li>



<li><strong>Offline Modes (<code>TS_SHRINK_MODE_OFFLINE</code>, offline part of <code>TS_SHRINK_MODE_AUTO</code>):</strong> These modes are generally faster and can provide better compaction (thus more space reclamation). This is because they avoid the extra work online modes do to ensure DML compatibility. However, the main disadvantage is that DML and query access to the moved objects is blocked during the operation, meaning downtime. When using <code>TS_SHRINK_MODE_AUTO</code>, it should be noted that if an online move attempt fails, the procedure will automatically switch to an offline move, which could lead to unexpected downtime.  </li>
</ul>



<p><strong>Characteristics of Shrink Operations on Smallfile Tablespaces:</strong> Shrinking Smallfile tablespaces can exhibit some different behaviors compared to Bigfile tablespaces. Observations suggest that Smallfile tablespace shrink operations might sometimes not reclaim as much free space as expected compared to Bigfile operations.<sup></sup> This can occur especially when the goal is to consolidate multiple data files into a single file or when the data distribution is very complex. A single run of <code>DBMS_SPACE.SHRINK_TABLESPACE</code> might not consolidate all data files as desired; the operation might need to be repeated several times to achieve the desired level of consolidation.<sup></sup> Additionally, it should be noted that during a shrink operation on Smallfile tablespaces, the sizes of some data files might temporarily increase and then decrease depending on the new layout of the objects within them.<sup></sup> &nbsp;</p>



<p><strong>Potential Error Conditions and Partial Failure Scenarios:</strong> A Tablespace Shrink operation may not always complete with 100% success. The operation can partially fail; for example, if an object cannot be moved (due to being locked by another session, being an unsupported object type, etc.), the procedure might report an error for that object. However, thanks to other successfully moved objects, the data file might still be shrunk to some extent.<sup></sup> A common error, <code>$ORA-00054$: resource busy and acquire with NOWAIT specified or timeout expired</code>, can occur if an object is locked by another session and the shrink operation cannot wait for this lock.<sup></sup> If the operation is interrupted in some way (e.g., manually stopped by the DBA), online DDL operations completed up to that point (i.e., successfully moved objects) are not rolled back; these objects remain in their new locations, and a subsequent shrink attempt will benefit from this, meaning previous gains are preserved even if the operation doesn&#8217;t resume from where it left off.<sup></sup> &nbsp;</p>



<p><strong>AUTOEXTEND Settings:</strong> If the data files of the tablespace to be shrunk are set to <code>AUTOEXTEND OFF</code> (automatic growth disabled), there might not be enough free space left in the tablespace for segments to grow after the shrink operation. In this case, the DBA might need to manually increase the tablespace or data file size to accommodate future data growth.<sup></sup> &nbsp;</p>



<p><strong>Shrinking the SYSAUX Tablespace:</strong> The ability to shrink the SYSAUX tablespace—generally considered a system tablespace that houses important metadata like AWR (Automatic Workload Repository) data, statistics history, and scheduled job information—using the <code>DBMS_SPACE.SHRINK_TABLESPACE</code> procedure is a significant capability.<sup></sup> This is particularly valuable in environments with limited storage space, such as Oracle Database Free, because the SYSAUX tablespace counts towards the 12 GB total user data limit in this edition and can grow over time, reducing the space available for application data.<sup></sup> &nbsp;</p>



<p>The statement &#8220;Online moves via SHRINK_SPACE don&#8217;t have all of the restrictions associated with a conventional ALTER TABLE&#8230; MOVE&#8221; <sup></sup> implies that although the <code>DBMS_SPACE.SHRINK_TABLESPACE</code> procedure uses the <code>ALTER TABLE... MOVE ONLINE</code> command in the background <sup></sup>, it might be able to bypass some of the known restrictions of this standard command or operate with a different internal logic. This suggests that Oracle might have developed special optimizations or different lower-level internal mechanisms for this new procedure. The fact that the <code>ANALYZE</code> mode provides a list of &#8220;unsupported objects&#8221; <sup></sup> confirms that there are still some objects that even this special mechanism cannot move. This indicates that Oracle is pushing the boundaries of online operations, but some fundamental limits still apply. &nbsp;</p>



<h2 class="wp-block-heading">9. Performance Impacts and Evaluations of Tablespace Shrink</h2>



<p>The performance of the Tablespace Shrink operation itself during its execution, as well as its potential effects on the overall operational performance of the database, are important evaluation criteria for DBAs.</p>



<p><strong>Performance of the Shrink Operation Itself (Duration, Resource Usage):</strong> The tablespace shrink operation can be time-consuming, especially for very large tablespaces or when numerous or very large segments need to be moved.<sup></sup> The completion time of the operation can vary greatly depending on the total amount of data to be moved, the number of segments, the selected <code>shrink_mode</code> (online modes are generally slower than offline modes), the overall load on the system, and the hardware capacity (especially I/O performance). &nbsp;</p>



<p>The progress of the operation can be monitored using Oracle&#8217;s <code>V$SESSION_LONGOPS</code> dynamic performance view, which is designed for tracking long-running operations. By searching for an <code>OPNAME</code> like &#8216;%Table%&#8217; or a similar identifier related to the shrink operation (e.g., <code>Table/Index Maintenance</code>) in this view, one can get information about the current phase of the operation, how much has been completed, and the estimated remaining time.<sup></sup> &nbsp;</p>



<p>As a general rule, the <code>TS_SHRINK_MODE_OFFLINE</code> (offline move) mode usually completes faster and potentially provides better compaction (more space reclamation) than the <code>TS_SHRINK_MODE_ONLINE</code> (online move) mode.<sup></sup> The primary reason for this is that online modes use additional synchronization, lock management, and versioning mechanisms to allow DML (Data Manipulation Language) operations to continue during the process, which adds overhead and complexity. The offline mode, by exclusively locking the object, avoids these extra tasks and performs the move operation more directly. &nbsp;</p>



<p><strong>Potential Impacts on Overall Database Performance (CPU, I/O, Redo):</strong></p>



<ul class="wp-block-list">
<li><strong>Impact During Online Modes:</strong> When using <code>TS_SHRINK_MODE_ONLINE</code> or <code>TS_SHRINK_MODE_AUTO</code> (during its online phase), object movement operations can consume significant CPU and I/O resources in the background. Additionally, redo log generation will increase for every data block moved. This additional load, especially on already busy systems, can negatively affect the performance of other user sessions and application processes. The increase in redo log generation can increase log switch frequency, strain archiving processes, and potentially cause apply lag in physical standby database environments like Data Guard. Therefore, even when using online modes, it is highly recommended to perform such operations during periods of lower system load or within planned maintenance windows.<br></li>



<li><strong>Impact During Offline Modes:</strong> When using <code>TS_SHRINK_MODE_OFFLINE</code> or <code>TS_SHRINK_MODE_AUTO</code> (during its offline phase), there will be no direct DML-related performance issues for the moved objects, as access to them is completely blocked during the operation. However, the operation itself will still consume CPU and I/O resources. The main impact of this mode is that the affected objects become unusable until the operation is complete, which translates to application downtime.<br></li>



<li><strong>Post-Operation Performance:</strong> After a successful Tablespace Shrink operation, positive effects on database performance are generally expected. Reduced data fragmentation and the tighter, more organized packing of data on disk can enable query operations (especially full table scans and wide-ranging index range scans) to run with less I/O and therefore faster. This can lead to improvements in overall application response times.  </li>
</ul>



<p>Upon reviewing available research materials and Oracle documentation <sup></sup>, comprehensive benchmark results or official performance studies quantifying the specific impact of <code>DBMS_SPACE.SHRINK_TABLESPACE</code> in its different modes on performance metrics like CPU usage, I/O rates, and redo log generation are not found. Such detailed analyses are typically found in Oracle&#8217;s internal tests, beta programs, or specifically published white papers. The most accurate approach for users is to test this operation in their own environments, on test systems that mimic production, to observe its specific performance impacts. &nbsp;</p>



<p>The statement &#8220;The best shrink result and performance is achieved with <code>TS_SHRINK_MODE_OFFLINE</code>&#8221; <sup></sup> should be understood such that &#8220;performance&#8221; refers to the <em>completion speed</em> of the shrink operation and its <em>space reclamation effectiveness</em>, not the overall operational performance of the database. The offline mode, by not dealing with DML synchronization or the complexities of online DDL operations, generally takes less time to move and compress the same amount of data and can consolidate free space more effectively than online modes. &nbsp;</p>



<h2 class="wp-block-heading">10. Best Practices and Advanced Scenarios for Tablespace Shrink</h2>



<p>To make the most of the Oracle 23ai Tablespace Shrink feature and minimize potential issues, it&#8217;s important to follow certain best practices and plan the operation carefully.</p>



<p><strong>Pre- and Post-Shrink Checks:</strong></p>



<ul class="wp-block-list">
<li><strong>Pre-Operation Steps:</strong>
<ol class="wp-block-list">
<li><strong>Analysis:</strong> Run the <code>DBMS_SPACE.SHRINK_TABLESPACE</code> procedure in <code>TS_SHRINK_MODE_ANALYZE</code> mode to thoroughly examine the potential space savings, movable objects, non-movable (unsupported) objects, and the Oracle-recommended target size for the tablespace to be shrunk. This analysis will give a preliminary idea of whether the operation will be beneficial and how long it might take.  </li>



<li><strong>Visual Inspection (EM):</strong> Use Oracle Enterprise Manager (EM) to visually confirm the current occupancy rate of the tablespace, the distribution of segments, and especially the &#8220;Extent Map&#8221; view to see where fragmentation is concentrated and how free space is distributed.  </li>



<li><strong>Segment Advisor:</strong> Utilize the Segment Advisor tool within EM to perform a more detailed space gain analysis on individual segments within the tablespace and evaluate recommendations on which segments would benefit most from the shrink operation.  </li>



<li><strong>Backup:</strong> As with any major database operation, ensure that a current and verified backup of the tablespace to be processed, and ideally the entire database, has been taken. This provides a fallback option in case of unexpected issues (a general DBA best practice).</li>



<li><strong>AUTOEXTEND Settings:</strong> Check the <code>AUTOEXTEND</code> (automatic growth) settings of the data files belonging to the tablespace to be shrunk. If <code>AUTOEXTEND OFF</code>, there might not be enough free space left for segments to grow after the shrink; plan for manual size increases post-operation if necessary.  </li>



<li><strong>Resource Planning:</strong> Evaluate the potential impact of the operation on system resources (CPU, I/O) and plan to run it during a time of lower system load or within a planned maintenance window.</li>
</ol>
</li>



<li><strong>Post-Operation Steps:</strong>
<ol class="wp-block-list">
<li><strong>Verification (Dictionary Views):</strong> Query Oracle data dictionary views like <code>DBA_FREE_SPACE</code>, <code>DBA_DATA_FILES</code>, and <code>DBA_TABLESPACES</code> to verify the changes in tablespace and data file sizes, the reclaimed free space, and the new high-water mark (HWM) levels.  </li>



<li><strong>Verification (EM):</strong> Re-examine the &#8220;Extent Map&#8221; view of the tablespace via EM to visually confirm that free space has been consolidated as expected and the data file has shrunk.</li>



<li><strong>Update Statistics:</strong> Since the shrink operation changes the physical layout of tables and indexes, it can cause statistics on these objects to become stale. For the Oracle Optimizer to generate accurate query execution plans, statistics for the relevant objects (especially moved tables and rebuilt or affected indexes) must be updated using the <code>DBMS_STATS</code> package after the operation. This step is critical for fully realizing the expected performance improvements.  </li>



<li><strong>Monitor Application Performance:</strong> Closely monitor the performance of relevant applications for a period after the shrink operation to observe any unexpected behavior or performance changes.</li>



<li><strong>Check Alert Log and Trace Files:</strong> Check the Oracle alert log and relevant trace files for any error or warning messages during or after the operation.</li>
</ol>
</li>
</ul>



<p><strong>Mode Selection Based on Different Scenarios:</strong> The following table summarizes the key features of different <code>shrink_mode</code> options and in which scenarios they might be preferred:</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><th>Mode Name</th><th>Basic Function</th><th>Downtime Status</th><th>Performance (Operation Speed)</th><th>Space Gain Potential</th><th>Advantages</th><th>Disadvantages</th><th>Recommended Use Cases</th></tr><tr><td><code>TS_SHRINK_MODE_ANALYZE</code></td><td>Analyzes, reports, does not shrink.</td><td>None</td><td>N/A</td><td>N/A</td><td>See potential gain and problematic objects without risk.</td><td>Does not shrink.</td><td>For planning and evaluation before every shrink operation.</td></tr><tr><td><code>TS_SHRINK_MODE_ONLINE</code></td><td>Moves objects online (except IOTs).</td><td>Minimal (downtime for IOTs).</td><td>Medium</td><td>Good</td><td>High availability, DML continues.</td><td>Can be slower than offline, consumes more resources.</td><td>7/24 systems where application downtime is unacceptable.</td></tr><tr><td><code>TS_SHRINK_MODE_AUTO</code></td><td>Tries online first, then offline if fails.</td><td>Potential (if switches to offline).</td><td>Variable</td><td>Variable (depends on online/offline success)</td><td>Flexibility, automatic decision-making.</td><td>Can lead to unexpected downtime, exact mode used is not fully predictable.</td><td>Situations where the state is uncertain, or both availability and good shrinkage are desired, but controlled downtime is acceptable.</td></tr><tr><td><code>TS_SHRINK_MODE_OFFLINE</code></td><td>Moves objects offline.</td><td>Yes (for moved objects).</td><td>High</td><td>Best</td><td>Fastest operation, best compaction.</td><td>Access to relevant objects blocked during operation.</td><td>Planned maintenance windows, situations where downtime is acceptable and maximum space gain is targeted.</td></tr></tbody></table></figure>



<p>Export to Sheets</p>



<p><strong>Maintenance Windows and Scheduling Recommendations:</strong> The Tablespace Shrink operation, especially when run on large tablespaces or when many objects need to be moved, can consume significant system resources and take a long time. Therefore, it is highly recommended that the operation (even when using online modes like <code>TS_SHRINK_MODE_ONLINE</code>) be performed preferably during times of lowest overall system load or within planned maintenance windows.<sup></sup> This approach minimizes the potential performance impact of the shrink operation on other critical application processes and allows sufficient time to intervene and resolve any unexpected issues (e.g., the operation taking much longer than expected or stopping due to an error). &nbsp;</p>



<p><strong>Advanced Scenarios (Inferential):</strong></p>



<ul class="wp-block-list">
<li><strong>Phased Shrinking of Very Large Tablespaces:</strong> Instead of shrinking a very large tablespace (terabytes in size) in a single operation, dividing the process into several phases using the <code>target_size</code> parameter can be a more controlled approach. For example, a shrink of 10-20% of the tablespace could be targeted in each step. This allows for closer monitoring of the system impact of each phase, makes the operation duration more manageable, and reduces potential risks.<br></li>



<li><strong>Scripting and Automation:</strong> The <code>DBMS_SPACE.SHRINK_TABLESPACE</code> procedure can be easily automated via PL/SQL scripts. In particular, the <code>shrink_result</code> CLOB output can be programmatically processed to log information such as the success of the operation, reclaimed space, and the number of objects moved, or to report these to DBAs. For instance, an automation framework could be established to periodically analyze all tablespaces with <code>TS_SHRINK_MODE_ANALYZE</code>, automatically shrink tablespaces where potential space savings above a certain threshold (e.g., more than 20%) are detected (perhaps first with <code>TS_SHRINK_MODE_ONLINE</code>), or at least send an alert/notification to the DBA.<br></li>



<li><strong>Integration with Information Lifecycle Management (ILM):</strong> In environments where Information Lifecycle Management (ILM) strategies are implemented, the Tablespace Shrink feature can play a significant role. For example, tablespaces containing old data that is archived or completely deleted from the system after a certain period can be regularly subjected to a shrink operation after this data is cleared. This allows the valuable disk space occupied by these tablespaces to be reclaimed, keeping storage efficiency consistently high.</li>
</ul>



<p>Finally, a point frequently emphasized in Oracle community forums and user experiences is the importance of testing such new features first in non-production (test, development) environments with data similar in size and structure to production data.<sup></sup> Tests conducted with small-sized test data may not always accurately reflect the feature&#8217;s behavior, potential performance impacts, or possible bottlenecks in large-scale production systems.<sup></sup> Therefore, comprehensive testing is indispensable for a successful production implementation. &nbsp;</p>



<h2 class="wp-block-heading">11. Conclusion and Evaluation of Oracle 23ai Tablespace Shrink</h2>



<p>The Tablespace Shrink feature introduced with Oracle 23ai is a groundbreaking innovation for reclaiming unused space in tablespaces, addressing a significant long-standing challenge for Database Administrators (DBAs). This feature offers the potential to use storage resources more efficiently, thereby reducing costs and potentially enhancing system performance.</p>



<p>The introduction of the feature for Bigfile tablespaces in the initial release of Oracle 23ai, followed by its extension to Smallfile tablespaces with Release Update 23.7, demonstrates Oracle&#8217;s commitment to this functionality and its responsiveness to user needs. The flexible operating modes (<code>TS_SHRINK_MODE_ANALYZE</code>, <code>TS_SHRINK_MODE_ONLINE</code>, <code>TS_SHRINK_MODE_AUTO</code>, <code>TS_SHRINK_MODE_OFFLINE</code>) and control parameters like <code>target_size</code> offered through the <code>DBMS_SPACE.SHRINK_TABLESPACE</code> procedure provide DBAs with the means to perform shrink operations in a manner best suited to their environment&#8217;s requirements and downtime tolerances.</p>



<p>Oracle Enterprise Manager (EM), with tools like &#8220;Extent Map&#8221; and &#8220;Segment Advisor,&#8221; offers valuable contributions for performing detailed analysis before a shrink operation and for visualizing the state of tablespaces. During and after the operation, EM&#8217;s general monitoring capabilities can help track the impact on the system.</p>



<p>However, for the effective and safe use of the Tablespace Shrink feature, awareness of certain limitations and considerations is critically important. The existence of unsupported object types, the different behaviors of special object types like Index-Organized Tables (IOTs) and LOB segments during the shrink process, the impacts of online and offline modes on performance and availability, the unique shrink dynamics of Smallfile tablespaces, and potential error scenarios must be carefully evaluated by DBAs.</p>



<p>In conclusion, the Oracle 23ai Tablespace Shrink feature, when implemented with proper planning, comprehensive testing, and adherence to best practices, is an extremely powerful and valuable tool for DBAs to significantly improve database storage efficiency, reduce unnecessary storage costs, and enhance system performance. Continued developments by Oracle in this area may bring future innovations such as support for more object types, more advanced automation capabilities, or more comprehensive and direct management interfaces via EM. This feature stands out as one of Oracle&#8217;s innovative responses to modern data management challenges.</p>
<p>The post <a rel="nofollow" href="https://www.bugraparlayan.com.tr/oracle-23ai-tablespace-shrink.html">Oracle 23ai Tablespace Shrink</a> appeared first on <a rel="nofollow" href="https://www.bugraparlayan.com.tr">Bugra Parlayan | Oracle Database &amp; Exadata Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Oracle Application Continuity (AC &#038; TAC)</title>
		<link>https://www.bugraparlayan.com.tr/oracle-application-continuity-ac-tac.html</link>
		
		<dc:creator><![CDATA[Bugra Parlayan]]></dc:creator>
		<pubDate>Sat, 03 May 2025 09:54:19 +0000</pubDate>
				<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[clustering]]></category>
		<category><![CDATA[Data Replication]]></category>
		<category><![CDATA[Disaster Recovery]]></category>
		<category><![CDATA[Failover]]></category>
		<category><![CDATA[Fault Tolerance]]></category>
		<category><![CDATA[High Availability]]></category>
		<category><![CDATA[Load Balancing]]></category>
		<category><![CDATA[Redundancy]]></category>
		<category><![CDATA[Zero Downtime]]></category>
		<guid isPermaLink="false">https://www.bugraparlayan.com.tr/?p=1464</guid>

					<description><![CDATA[<p>Modern business applications are built on the foundation of uninterrupted service delivery and high availability. Planned or unplanned disruptions at the database layer can negatively impact the end-user experience and jeopardize business continuity. Oracle offers various technologies under the Oracle Maximum Availability Architecture (MAA) umbrella to overcome these challenges. One such critical feature, Oracle Application &#8230;</p>
<p>The post <a rel="nofollow" href="https://www.bugraparlayan.com.tr/oracle-application-continuity-ac-tac.html">Oracle Application Continuity (AC &amp; TAC)</a> appeared first on <a rel="nofollow" href="https://www.bugraparlayan.com.tr">Bugra Parlayan | Oracle Database &amp; Exadata Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading"></h2>



<p>Modern business applications are built on the foundation of uninterrupted service delivery and high availability. Planned or unplanned disruptions at the database layer can negatively impact the end-user experience and jeopardize business continuity. Oracle offers various technologies under the Oracle Maximum Availability Architecture (MAA) umbrella to overcome these challenges. One such critical feature, Oracle Application Continuity (AC), is designed specifically to ensure high availability at the application layer.</p>



<h3 class="wp-block-heading">1.1 Definitions: Application Continuity (AC) and Transparent Application Continuity (TAC)</h3>



<p><strong>Application Continuity (AC)</strong> is an Oracle Database feature that enables the seamless and rapid replay of an in-flight request against the database following a recoverable error that makes the database session unusable.<sup></sup> Its primary goal is to ensure that the interruption appears to the end-user as nothing more than a delay in request processing.<sup></sup> AC works by completely reconstructing the database session after an outage, including all states, cursors, variables, and the last transaction (if any).<sup></sup> This effectively masks disruptions caused by planned maintenance (e.g., patching, configuration changes) or unplanned outages (e.g., network errors, instance failures).<sup></sup> &nbsp;</p>



<p><strong>Transparent Application Continuity (TAC)</strong>, introduced with Oracle Database 18c, is an extension or mode of AC.<sup></sup> TAC transparently tracks and records session and transactional state, enabling the recovery of a database session after recoverable outages.<sup></sup> The key characteristic of TAC is its ability to operate without requiring any application code changes or specific knowledge of the application by the database administrator (DBA).<sup></sup> This transparency is achieved through a state-tracking infrastructure that categorizes session state usage.<sup></sup> &nbsp;</p>



<p>Both AC and TAC can be used with Oracle Real Application Clusters (RAC), Oracle RAC One Node, Oracle Active Data Guard, and Oracle Autonomous Database (both shared and dedicated infrastructure).<sup></sup> These features enhance the fault tolerance of systems and applications by masking database outages and recovering in-flight work that would otherwise be lost.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">1.2 Problem Solved: Masking Interruptions and Ensuring Business Continuity</h3>



<p>Without AC/TAC, database outages cause significant problems for applications. Applications receive error messages, users are left uncertain about the status of their transactions (e.g., money transfers, flight reservations, orders), and middleware servers might even need restarting to handle the surge of login requests post-outage.<sup></sup> This leads to both end-user dissatisfaction and operational inefficiency. &nbsp;</p>



<p>AC and TAC enable the Oracle Database, Oracle drivers, and Oracle connection pools to collaborate, safely and reliably masking many planned and unplanned outages.<sup></sup> By automatically handling recoverable errors, they improve the end-user experience and reduce the need for application developers to write complex error-handling code.<sup></sup> This boosts developer productivity and aims for uninterrupted application operation.<sup></sup> &nbsp;</p>



<p>The evolution from Oracle&#8217;s basic failover mechanisms (like TAF &#8211; Transparent Application Failover) to AC and then TAC reflects a strategic shift towards making high availability increasingly transparent and reducing application-specific coding dependencies. TAF (pre-12c) had significant limitations, especially around DML operations and session state management.<sup></sup> AC (12c) addressed DML replay but required awareness of connection pool usage and request boundaries.<sup></sup> TAC (18c+) further reduced complexity by automating state tracking and boundary detection.<sup></sup> This progression shows Oracle recognized the adoption barriers of earlier solutions and prioritized ease of use alongside capability. Consequently, TAC has become Oracle&#8217;s preferred solution for modern applications, especially in cloud and Autonomous Database environments <sup></sup>, while AC remains relevant for specific legacy systems or customization needs. &nbsp;</p>



<h3 class="wp-block-heading">1.3 Role within Oracle Maximum Availability Architecture (MAA)</h3>



<p>AC and TAC extend Oracle&#8217;s MAA principles to the application tier.<sup></sup> MAA is a set of best practices, configurations, and architectural blueprints designed to achieve zero data loss and zero application downtime goals.<sup></sup> AC and TAC contribute to these goals by recovering in-flight transactions and the application stack.<sup></sup> &nbsp;</p>



<p>These features work in conjunction with other Oracle HA solutions like RAC, Data Guard, and Fast Application Notification (FAN) to form the building blocks for continuous availability.<sup></sup> The MAA framework aims to keep applications continuously available by hiding planned and unplanned events, as well as load imbalances at the database tier.<sup></sup> AC and TAC are integral parts of this architecture, minimizing the impact of database outages on the application.<sup></sup> &nbsp;</p>



<h2 class="wp-block-heading">2. Core Concepts and Working Mechanism</h2>



<p>The fundamental principle behind Application Continuity is to recover ongoing work during an interruption and allow it to continue without the user noticing. This is achieved through a complex replay process, accurate definition of request boundaries, and meticulous management of session state.</p>



<h3 class="wp-block-heading">2.1 The Replay Process: How AC/TAC Recovers Sessions</h3>



<p>The working mechanism of AC and TAC involves the following steps when a recoverable error is detected:</p>



<ol class="wp-block-list">
<li><strong>Error Detection:</strong> The system identifies a recoverable error (e.g., network interruption, temporary instance failure) that renders the session unusable.  </li>



<li><strong>New Session Establishment:</strong> A new database session is established on another available database instance.  </li>



<li><strong>Session State Restoration:</strong> The state of the original session before the interruption (non-transactional state, variables, PL/SQL package states, etc.) is reconstructed in the new session. This is managed through service parameters like <code>FAILOVER_RESTORE</code> and <code>SESSION_STATE_CONSISTENCY</code>, and mechanisms like Database Templates in 23ai.  </li>



<li><strong>Replay of Database Calls:</strong> The database calls (SQL queries, DML operations) made from the beginning of the interrupted request are executed sequentially in the new session.  </li>



<li><strong>Consistency Check and Idempotence:</strong> During replay, data consistency is checked. The Transaction Guard mechanism ensures that the transaction is committed only once (idempotence), especially if the interruption occurred during the <code>COMMIT</code> operation.  </li>



<li><strong>Continuation or Error:</strong> If the replay is successful, the application perceives the interruption merely as a delay and continues from where it left off. However, if data inconsistency is detected during replay (e.g., a replayed query returns different results) or an unrecoverable state is encountered, the replay is rejected, and the application receives the original error. Unrecoverable errors (e.g., invalid data input) are never replayed.  </li>
</ol>



<p>This process ensures that the user is unaffected by the interruption and the transaction is either completed safely or the original error state is accurately reported.</p>



<h3 class="wp-block-heading">2.2 Understanding Request Boundaries</h3>



<p>A &#8220;request&#8221; is a logical unit of work from the application&#8217;s perspective.<sup></sup> Defining the start and end points of these work units, known as request boundaries, is critical for the correct functioning of AC and TAC. These boundaries define the scope of work to be replayed and allow the system to discard unnecessary call history, using resources efficiently.<sup></sup> &nbsp;</p>



<ul class="wp-block-list">
<li><strong>Typical Boundary:</strong> Often, a request boundary spans the time between an application borrowing a database connection from a connection pool (checkout) and returning it (check-in). This is the default behavior for ODP.NET and Oracle connection pools.  </li>



<li><strong>Explicit Boundaries:</strong> If Oracle connection pools are not used, or if AC is managed manually, the application must explicitly mark the request boundaries. This is usually done via driver-provided API calls like <code>BeginRequest</code> and <code>EndRequest</code> (or equivalents). This method improves resource consumption and ensures replay occurs within the correct scope.  </li>



<li><strong>Implicit/Discovered Boundaries (TAC):</strong> A significant advantage of TAC is its ability to automatically detect request boundaries. Especially with modern drivers (JDBC 18c+, OCI 19c+), TAC can determine boundaries by monitoring the application&#8217;s behavior. Conditions for discovering a boundary typically include no open transaction, cursors being closed or cached, and the session state being restorable.  </li>



<li><strong>Importance:</strong> Besides defining the replay scope, request boundaries are fundamental for functions like connection draining during planned maintenance, load balancing, and resource management.  </li>
</ul>



<h3 class="wp-block-heading">2.3 Session State Management and Restoration (<code>FAILOVER_RESTORE</code>)</h3>



<p>For a successful replay, the state of the original session before the interruption must be consistent with the state of the new session where the replay occurs.<sup></sup> This includes not only the in-flight transaction but also non-transactional session settings, PL/SQL package states, temporary objects, and other session attributes. &nbsp;</p>



<p>Oracle provides various mechanisms and service parameters to manage this state:</p>



<ul class="wp-block-list">
<li><strong><code>FAILOVER_RESTORE</code> Service Parameter:</strong> Determines the extent to which session state is restored after failover.
<ul class="wp-block-list">
<li><code>LEVEL1</code> (or <code>BASIC</code>): Available for TAF and AC since Oracle Database 12.2, this setting restores commonly used basic initial session states (e.g., NLS settings).  </li>



<li><code>AUTO</code> (TAC): The recommended setting used with TAC. It enables automatic tracking, validation, and restoration of session state.  </li>
</ul>
</li>



<li><strong><code>SESSION_STATE_CONSISTENCY</code> Service Parameter:</strong> Controls how session state is handled during a request.
<ul class="wp-block-list">
<li><code>DYNAMIC</code> (Older default for AC): If non-transactional session state changes during the request, replay is internally disabled until the next request.  </li>



<li><code>STATIC</code> (Older, limited support for AC): Assumes the application does not change non-transactional state during the request. As of 23ai, its use with <code>FAILOVER_TYPE=TRANSACTION</code> is not supported.  </li>



<li><code>AUTO</code> (TAC): State is tracked and validated transparently. After a disablement, failover is automatically re-enabled when possible. Recommended for TAC.  </li>
</ul>
</li>



<li><strong>Restoring Application-Specific State:</strong> If there are application-specific initial states not covered by <code>FAILOVER_RESTORE=LEVEL1</code> (e.g., custom PL/SQL package variables), additional mechanisms are needed:
<ul class="wp-block-list">
<li><strong>Connection Initialization Callbacks (Java):</strong> The application can register a callback function to be invoked when a connection is obtained or during replay.  </li>



<li><strong>TAF Callbacks (OCI &#8211; Legacy):</strong> A similar mechanism for OCI applications.  </li>



<li><strong>UCP/WLS Connection Labeling:</strong> State management can be achieved by assigning labels to connections and defining callbacks that initialize state based on these labels.  </li>



<li>It is crucial that these callback mechanisms are <strong>idempotent</strong>, meaning they produce the same result if run multiple times, as an outage could occur during the callback itself.  </li>
</ul>
</li>



<li><strong>Oracle 23ai Database Templates:</strong> This new feature introduced in 23ai provides more advanced checkpointing and restoration of session state, enhancing the scope and reliability of AC.  </li>
</ul>



<p>The complexity of session state management has been a significant barrier to AC/TAC adoption. The evolution from manual callbacks <sup></sup> to <code>FAILOVER_RESTORE=LEVEL1</code> <sup></sup>, then <code>SESSION_STATE_CONSISTENCY=AUTO</code> <sup></sup>, and finally Database Templates <sup></sup> demonstrates Oracle&#8217;s continuous effort to automate and simplify this critical aspect. Inconsistent session state between the original and replayed session is a primary cause of replay failure. TAC&#8217;s <code>AUTO</code> setting <sup></sup> and 23ai&#8217;s Templates <sup></sup> aim to make state management transparent, significantly increasing the likelihood of successful replay and broadening applicability. However, this implies that applications with complex, non-standard session state might still require careful design or potentially fall back to AC with custom callbacks. Understanding the application&#8217;s state usage is crucial for selecting the right approach and configuration. The addition of the <code>RESET_STATE</code> <sup></sup> feature further underscores the need to manage state cleanly between requests. &nbsp;</p>



<h3 class="wp-block-heading">2.4 Transactional State and Idempotence</h3>



<p>AC and TAC aim to preserve the integrity of the last transaction during the replay of an interrupted request.<sup></sup> This becomes critical, especially when an interruption occurs after the <code>COMMIT</code> command is sent but before the acknowledgment is received. This is where <strong>Transaction Guard (TG)</strong> comes into play. &nbsp;</p>



<p>TG determines the definitive outcome (<code>COMMIT_OUTCOME</code>) of the transaction, preventing the same transaction from being committed multiple times during replay.<sup></sup> AC and TAC rely on this idempotence guarantee provided by TG to perform the replay safely.<sup></sup> The detailed mechanism of Transaction Guard is discussed in Section 4. &nbsp;</p>



<h2 class="wp-block-heading">3. Essential Enabling Components</h2>



<p>The seamless operation of Application Continuity necessitates an ecosystem approach, requiring the coordinated function of the database, drivers, connection pools, and notification mechanisms.</p>



<h3 class="wp-block-heading">3.1 Transaction Guard (TG): Guaranteeing Definitive Commit Outcomes</h3>



<p>Transaction Guard is a cornerstone of AC/TAC. It prevents duplicate transactions by ensuring at-most-once execution during replay.<sup></sup> AC and TAC depend on TG to determine the transaction&#8217;s status post-outage and ensure safe replay.<sup></sup> (Details in Section 4). &nbsp;</p>



<h3 class="wp-block-heading">3.2 Application Continuity Aware Drivers</h3>



<p>For replay to occur, the client-side Oracle drivers must support Application Continuity and be capable of capturing database operations for potential replay.<sup></sup> Key supported drivers include: &nbsp;</p>



<ul class="wp-block-list">
<li><strong>JDBC:</strong> Oracle JDBC Replay Driver. Version 12c or later for AC, 18c or later for TAC. With the Oracle 23ai driver, AC support is automatically enabled.  </li>



<li><strong>OCI (Oracle Call Interface):</strong> OCI Session Pool. Version 12.2 or later for AC, 19c or later for TAC.  </li>



<li><strong>ODP.NET:</strong> Unmanaged Provider (in pooled mode). Version 12.2 or later for AC, 18c or later for TAC. Core and Managed ODP.NET support was added in later releases.  </li>



<li><strong>SQL*Plus:</strong> Version 19c (specifically 19.3) or newer supports AC/TAC.  </li>



<li><strong>Others:</strong> Support for languages like Python, PHP, Node.js is typically provided via the respective OCI or JDBC drivers.  </li>
</ul>



<p>Unsupported drivers or configurations include Asynchronous ODP.NET <sup></sup>, older drivers <sup></sup>, JDBC OCI Type 2 driver, OLE DB, ODBC, OCCI, and pre-compilers.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">3.3 Connection Pools</h3>



<p>Connection pools play a critical role in the effectiveness of AC and TAC.<sup></sup> Pools manage the lifecycle of connections, which simplifies the determination of request boundaries.<sup></sup> They also integrate with FAN/FCF to respond quickly to outage notifications and manage connections.<sup></sup> Major supported pools include: &nbsp;</p>



<ul class="wp-block-list">
<li>Oracle Universal Connection Pool (UCP) (12c+)   </li>



<li>WebLogic Server (WLS) Active GridLink (12c+)   </li>



<li>Third-party JDBC application servers using UCP (e.g., JBoss, HikariCP)   </li>



<li>OCI Session Pool   </li>



<li>ODP.NET Connection Pool   </li>
</ul>



<p>Best practice dictates returning connections to the pool immediately after each request completes.<sup></sup> Holding connections unnecessarily hinders draining during planned maintenance and compromises high availability.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">3.4 Fast Application Notification (FAN) and Fast Connection Failover (FCF)</h3>



<p><strong>Fast Application Notification (FAN)</strong> is an Oracle Clusterware mechanism that publishes event notifications about the status of cluster and database services (e.g., instance crash, service start/stop, load balancing advisories).<sup></sup> &nbsp;</p>



<p>FAN&#8217;s critical role is providing <em>immediate</em> notification about outages. This allows clients and connection pools to react swiftly instead of waiting for TCP/IP timeouts.<sup></sup> FAN is a <strong>mandatory</strong> component for effective AC/TAC.<sup></sup> &nbsp;</p>



<p><strong>Fast Connection Failover (FCF)</strong> is a client-side feature, typically embedded within connection pools (UCP, WLS Active GridLink), that subscribes to FAN events.<sup></sup> FCF uses the received FAN events to perform actions like: &nbsp;</p>



<ul class="wp-block-list">
<li>Immediately terminating or removing connections belonging to failed instances from the pool.  </li>



<li>Initiating connection draining for planned maintenance.  </li>



<li>Performing runtime connection load balancing.  </li>
</ul>



<p>FAN events are transported via the <strong>Oracle Notification Service (ONS)</strong>, typically requiring port 6200 to be open.<sup></sup> &nbsp;</p>



<p>The tight coupling between AC/TAC, specific drivers, connection pools, and FAN/FCF underscores that Application Continuity is not just a database feature but an <em>ecosystem</em> requiring coordinated configuration across tiers (client, mid-tier, database). Replay requires driver intelligence.<sup></sup> Request boundaries are often managed by pools.<sup></sup> Fast failure detection relies on FAN/FCF.<sup></sup> Without all pieces working together (correct driver versions, pool configuration, network paths for ONS, service settings), AC/TAC will not function effectively, or at all. This necessitates a holistic view and collaboration between DBAs, application developers, and potentially network administrators for AC/TAC implementation. Simply enabling a service feature is insufficient. The checklist approach in MAA documentation <sup></sup> reinforces the need for comprehensive configuration. While the introduction of automatic ONS configuration <sup></sup> aims to simplify this, understanding the components remains crucial. &nbsp;</p>



<h2 class="wp-block-heading">4. Deep Dive: Transaction Guard (TG)</h2>



<p>Transaction Guard is a fundamental technology offered by Oracle Database that significantly enhances application reliability, especially after interruptions. It is the key mechanism behind the safe and automated replay capability of Application Continuity.</p>



<h3 class="wp-block-heading">4.1 Purpose: Ensuring At-Most-Once Execution</h3>



<p>The core problem TG solves is the uncertainty that arises when the <code>COMMIT</code> acknowledgment sent to the client is lost following a recoverable error (like a network outage).<sup></sup> The application cannot know if the transaction actually succeeded.<sup></sup> Retrying the transaction in this state of uncertainty could lead to the same transaction being executed multiple times (duplicate transaction), causing logical data corruption.<sup></sup> &nbsp;</p>



<p>TG addresses this by providing <strong>idempotence</strong>. In this context, idempotence is the ability to guarantee that a transaction, if retried after an error, is executed at most once.<sup></sup> TG enables the application to learn the definitive outcome of the last transaction before the interruption, thereby preventing logical corruption caused by duplicate transactions.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">4.2 How It Works: Logical Transaction ID (LTXID)</h3>



<p>At the heart of Transaction Guard is a globally unique identifier called the <strong>Logical Transaction ID (LTXID)</strong>.<sup></sup> The working principle involves these steps: &nbsp;</p>



<ol class="wp-block-list">
<li><strong>LTXID Assignment:</strong> When a database session is established, it is automatically assigned an LTXID. This ID typically consists of the session&#8217;s logical number and a commit number that increments with each <code>COMMIT</code> or <code>ROLLBACK</code> within the session.  </li>



<li><strong>LTXID Tracking:</strong> The database tracks the LTXID for each transaction within the session. A copy of the LTXID is held both on the client (in the OCI session handle or JDBC/ODP.NET connection object) and on the server.  </li>



<li><strong>Commit Outcome Association:</strong> When a transaction is committed, its outcome (success/failure) is associated with the corresponding LTXID, and this information is persistently stored in the database.  </li>



<li><strong>Reliable Outcome Retrieval:</strong> When an interruption or error occurs and the <code>COMMIT</code> acknowledgment is lost, the application (or AC) uses the LTXID held on the client for the failed session.  </li>



<li><strong><code>GET_LTXID_OUTCOME</code> Call:</strong> The application invokes the <code>DBMS_APP_CONT.GET_LTXID_OUTCOME</code> PL/SQL procedure, passing this LTXID.  </li>



<li><strong>Outcome Return:</strong> Based on the stored LTXID information, the database returns the definitive outcome of the transaction (committed/not committed, completed/not completed) to the application. This information allows the application to safely decide whether to retry the transaction.  </li>



<li><strong>At-Most-Once Enforcement:</strong> When the outcome is requested using the LTXID, the database can block any earlier in-flight transaction with the same LTXID from committing, thus ensuring at-most-once execution.  </li>



<li><strong>Retention Period:</strong> The database retains the LTXID and its associated commit outcome for a configurable duration (default 24 hours, set by the <code>RETENTION_TIMEOUT</code> service parameter), giving applications sufficient time for recovery and outcome querying.  </li>
</ol>



<h3 class="wp-block-heading">4.3 Benefits and Use Cases</h3>



<p>The primary benefits provided by Transaction Guard include:</p>



<ul class="wp-block-list">
<li>Provides definitive commit outcomes.  </li>



<li>Prevents logical corruption by avoiding duplicate transactions.  </li>



<li>Enables safe transaction replay.  </li>



<li>Forms the foundation for Application Continuity.  </li>



<li>Improves user experience and reduces support costs.  </li>



<li>Increases developer productivity.  </li>
</ul>



<p>Use cases include critical applications where duplicate transactions are unacceptable (banking, e-commerce order systems, etc.) <sup></sup>, enabling AC/TAC, and allowing applications to safely implement their own custom recovery logic.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">4.4 Configuration Requirements</h3>



<p>To enable and use Transaction Guard, the following steps are required:</p>



<ol class="wp-block-list">
<li><strong>Database Version:</strong> Oracle Database 12.1 or newer must be used.  </li>



<li><strong>Application Service:</strong> All database work must go through a specifically created application service. The default database service should not be used. The service is created with <code>srvctl</code> for RAC or <code>DBMS_SERVICE</code> for single instance.  </li>



<li><strong><code>COMMIT_OUTCOME</code> Parameter:</strong> The <code>COMMIT_OUTCOME</code> parameter must be set to <code>TRUE</code> on the application service.  </li>



<li><strong>Grant Permission:</strong> <code>EXECUTE</code> privilege on the <code>DBMS_APP_CONT</code> package must be granted to the application users who will call the <code>GET_LTXID_OUTCOME</code> procedure.  </li>



<li><strong><code>DDL_LOCK_TIMEOUT</code> (Optional):</strong> If TG is to be used with DDL statements, increasing the <code>DDL_LOCK_TIMEOUT</code> parameter might be considered.  </li>



<li><strong>Recommendations:</strong> FAN configuration (for RAC/Data Guard), checking <code>RETENTION_TIMEOUT</code>, using connection pools.  </li>
</ol>



<h3 class="wp-block-heading">4.5 Relationship with Application Continuity</h3>



<p>Transaction Guard is a foundational technology underlying Application Continuity.<sup></sup> AC/TAC <strong>internally and automatically</strong> uses TG when performing replay after an outage to reliably determine the status of the previous transaction.<sup></sup> &nbsp;</p>



<p>Thanks to this integration, developers using AC/TAC generally do not need to interact directly with TG APIs; AC/TAC manages this process behind the scenes.<sup></sup> However, if an application needs to implement its own custom recovery or replay logic, TG can also be used independently.<sup></sup> &nbsp;</p>



<p>In essence, Transaction Guard lays the groundwork for safe replay by addressing the fundamental problem of uncertainty during commit in distributed systems. AC/TAC builds upon this foundation to offer an automated and transparent application continuity solution. Understanding TG is important not only for AC/TAC but also for building robust Oracle applications that need to handle failures during transactions.</p>



<h2 class="wp-block-heading">5. Application Continuity (AC) vs. Transparent Application Continuity (TAC)</h2>



<p>Oracle offers two primary mechanisms for ensuring application continuity: Application Continuity (AC) and Transparent Application Continuity (TAC). While both serve the same fundamental purpose, they differ significantly in their operation, configuration requirements, and impact on the application. Choosing the right solution depends on the application&#8217;s architecture, the technologies used, and the desired level of transparency.</p>



<h3 class="wp-block-heading">5.1 Key Differences Summarized</h3>



<p>The following table summarizes the core differences between AC and TAC:</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><th>Feature</th><th>Application Continuity (AC)</th><th>Transparent Application Continuity (TAC)</th></tr><tr><td><strong>Transparency Level</strong></td><td>Lower (Requires pool/boundary awareness, potential code changes for state/side-effects) <sup></sup></td><td>Higher (Aims for zero code changes, automatic state/boundary management) <sup></sup></td></tr><tr><td><strong>Request Boundaries</strong></td><td>Explicit (App/Pool defined) or Implicit (Pool defined) <sup></sup></td><td>Implicit/Discovered (Driver/Database detects) <sup></sup></td></tr><tr><td><strong>Session State Management</strong></td><td>Requires <code>FAILOVER_RESTORE=LEVEL1</code> + potential Callbacks/Labeling <sup></sup></td><td>Uses <code>FAILOVER_RESTORE=AUTO</code>, <code>SESSION_STATE_CONSISTENCY=AUTO</code> <sup></sup></td></tr><tr><td><strong>Side Effect Handling (Default)</strong></td><td>Replays side effects <sup></sup></td><td>Does <strong>not</strong> replay side effects <sup></sup></td></tr><tr><td><strong>Customization (Callbacks, Side Effects)</strong></td><td>Yes (Allows callbacks, explicit side-effect replay) <sup></sup></td><td>No (Designed for transparency, avoids complex customization) <sup></sup></td></tr><tr><td><strong>DB Version Introduced</strong></td><td>12.1 (JDBC), 12.2 (OCI/ODP.NET) <sup></sup></td><td>18c/19c <sup></sup></td></tr><tr><td><strong>Key Service Setting (<code>FAILOVER_TYPE</code>)</strong></td><td><code>TRANSACTION</code> <sup></sup></td><td><code>AUTO</code> <sup></sup></td></tr></tbody></table></figure>



<p>This table provides a concise, direct comparison of the most critical differentiating factors between AC and TAC, derived from synthesizing information across numerous citations, aiding user clarity and decision-making.</p>



<h3 class="wp-block-heading">5.2 Transparency and Configuration Effort</h3>



<p>TAC&#8217;s primary design goal is to require minimal or zero changes to application code.<sup></sup> Features like automatic state tracking and request boundary discovery mean TAC configuration is generally simpler than AC, often achieved by using <code>AUTO</code> values in service parameters.<sup></sup> &nbsp;</p>



<p>In contrast, AC might necessitate code adjustments, particularly when using older <code>oracle.sql.*</code> concrete classes <sup></sup>, when custom session state management is needed <sup></sup>, or when request boundaries must be manually defined if not using a connection pool.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">5.3 Handling Side Effects (Non-Idempotent Operations)</h3>



<p>Side effects are actions that occur outside the main database transaction and leave persistent results. Examples include sending emails via <code>UTL_SMTP</code>, writing to the file system, calling external web services, or autonomous transactions.<sup></sup> &nbsp;</p>



<ul class="wp-block-list">
<li><strong>AC&#8217;s Default Behavior:</strong> AC replays statements with side effects by default. This can lead to undesired outcomes in some cases (e.g., sending the same email twice). AC provides mechanisms to manage this, such as disabling replay for specific code blocks (<code>disableReplay</code> API ) or potentially using callbacks for custom handling.  </li>



<li><strong>TAC&#8217;s Default Behavior:</strong> TAC does <strong>not</strong> replay side effects by default. TAC automatically detects calls known to have side effects and prevents their replay. This provides a safer default behavior for most applications.  </li>
</ul>



<p>The ACCHK tool can report on non-replayable side effects.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">5.4 Customization Capabilities (Callbacks, Initial State)</h3>



<p>AC allows customization for complex initial session state setups via connection initialization callbacks or connection labeling.<sup></sup> This is useful when the application needs to be brought to a specific initial state post-failover. &nbsp;</p>



<p>TAC generally does not support such customizations, as its core philosophy is transparency and automation.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">5.5 When to Choose AC vs. TAC?</h3>



<ul class="wp-block-list">
<li><strong>TAC:</strong> Is the <strong>default and recommended</strong> solution for most modern applications, especially where code changes are undesirable or not feasible. It&#8217;s simpler and leverages automatic features.  </li>



<li><strong>AC:</strong> May be preferred or required in the following situations:
<ul class="wp-block-list">
<li>Using older driver or database versions (pre-18c/19c for TAC).  </li>



<li>Needing fine-grained control over side-effect replay (e.g., intentionally replaying or suppressing specific side effects).  </li>



<li>Requiring complex initial state setup via callbacks.  </li>



<li>The application uses state patterns that cannot be automatically managed by TAC (e.g., persistent temporary tables not cleaned up between requests).  </li>
</ul>
</li>
</ul>



<p>The choice between AC and TAC is not purely technical; it reflects a trade-off between transparency/simplicity (TAC) and control/customization (AC). TAC lowers the barrier to adoption <sup></sup> by automating many complex aspects.<sup></sup> However, this automation comes at the cost of flexibility. AC provides hooks <sup></sup> for developers to handle edge cases or specific requirements that don&#8217;t fit the TAC model. Architects need a thorough understanding of the application&#8217;s behavior regarding session state and side effects to make the right choice. Migrating an application designed for AC to TAC might require analysis to understand if the default TAC behavior (e.g., not replaying side effects) is acceptable. The existence of both options caters to a wider range of application architectures and legacy constraints. &nbsp;</p>



<h2 class="wp-block-heading">6. Requirements and Compatibility</h2>



<p>Successfully implementing Application Continuity depends on meeting a set of requirements spanning database and client versions, service configuration, and application design. Incompatible or incomplete configurations can lead to the feature not working as expected, or not working at all.</p>



<h3 class="wp-block-heading">6.1 Database and Client Version Prerequisites</h3>



<p>Specific minimum Oracle database and client versions are required for AC, TAC, and related technologies to function. The table below summarizes these requirements:</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><th>Component</th><th>AC Requirement</th><th>TAC Requirement</th><th>TG Requirement</th><th>23ai Features</th></tr><tr><td><strong>Database</strong></td><td>12.1+ <sup></sup></td><td>18c+ (19c+ recommended) <sup></sup></td><td>12.1+ <sup></sup></td><td>23ai <sup></sup></td></tr><tr><td><strong>JDBC Driver</strong></td><td>12c+ Replay <sup></sup></td><td>18c+ Replay (19c+ rec.) <sup></sup></td><td>12.1+ Thin</td><td>23ai (auto-on) <sup></sup></td></tr><tr><td><strong>OCI Client/Driver</strong></td><td>12.2+ <sup></sup></td><td>19c+ <sup></sup></td><td>12.1+</td><td>23ai</td></tr><tr><td><strong>ODP.NET Unmanaged (Pooled)</strong></td><td>12.2+ <sup></sup></td><td>18c+ <sup></sup></td><td>12.1+</td><td>23ai (full) <sup></sup></td></tr><tr><td><strong>SQL*Plus</strong></td><td>19.3+ <sup></sup></td><td>19.3+ <sup></sup></td><td>&#8211;</td><td>23ai</td></tr></tbody></table></figure>



<p>This table centralizes critical version compatibility information necessary for planning deployments or upgrades, preventing users from attempting unsupported combinations.</p>



<p>Using the <strong>latest client drivers</strong> is always strongly recommended for best results and full feature support.<sup></sup> Mismatches between driver and database versions can lead to issues.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">6.2 Essential Service Configuration Parameters</h3>



<p>Using application-specific services managed by Oracle Clusterware (or created with <code>DBMS_SERVICE</code> for single instance) instead of the default database service is mandatory for AC and TAC.<sup></sup> These services must be configured using the <code>srvctl modify service</code> (or <code>add service</code>) command with the following key parameters: &nbsp;</p>



<ul class="wp-block-list">
<li><code>-failovertype</code>: Determines replay behavior. Use <code>TRANSACTION</code> for AC, <code>AUTO</code> for TAC.  </li>



<li><code>-commit_outcome</code>: Enables Transaction Guard. Must be set to <code>TRUE</code> for AC and TAC.  </li>



<li><code>-failover_restore</code>: Sets the session state restoration level. Typically <code>LEVEL1</code> for AC, <code>AUTO</code> for TAC.  </li>



<li><code>-session_state_consistency</code>: Defines the session state consistency mode. <code>AUTO</code> is recommended for TAC.  </li>



<li><code>-replay_init_time</code>: Specifies the maximum time (in seconds) allowed for replay to begin. A crucial tuning parameter.  </li>



<li><code>-retention_timeout</code>: Determines how long (in seconds) the Transaction Guard commit outcome is retained.  </li>



<li><code>-drain_timeout</code>: Specifies the time (in seconds) allowed for draining active sessions during planned maintenance.  </li>



<li><code>-stopoption</code>: Defines how the service is stopped during planned maintenance (e.g., <code>IMMEDIATE</code>).  </li>



<li><code>-notification</code>: Determines if FAN events are published for the service (should be set to <code>TRUE</code>).  </li>



<li><code>-rlbgoal</code>, <code>-clbgoal</code>: Set runtime and connection-time load balancing goals.</li>



<li><code>-failoverretry</code>, <code>-failoverdelay</code>: Connection retry settings.  </li>
</ul>



<h3 class="wp-block-heading">6.3 Application Design Considerations</h3>



<p>The application&#8217;s design and coding practices directly impact the effectiveness of AC/TAC:</p>



<ul class="wp-block-list">
<li><strong>Pooling:</strong> Using Oracle connection pools (UCP, WLS Active GridLink, OCI/ODP.NET pools) is strongly recommended. Connections should be returned to the pool immediately after use.  </li>



<li><strong>Request Boundaries:</strong> Clear request boundaries must be ensured, either implicitly via pools or explicitly via API calls if necessary.  </li>



<li><strong>Statelessness:</strong> Aim for stateless application logic between requests whenever possible. If state exists, ensure it is managed correctly (restorable via <code>FAILOVER_RESTORE</code> or callbacks for AC). The <code>RESET_STATE</code> feature in 23ai can also assist here.  </li>



<li><strong>Error Handling:</strong> Applications must still have robust error handling for unrecoverable errors not handled by AC/TAC.  </li>



<li><strong>Avoid Legacy Concrete Classes:</strong> JDBC applications should avoid using legacy concrete classes from the <code>oracle.sql.*</code> package, preferring standard JDBC or <code>oracle.jdbc.*</code> interfaces. ACCHK can detect these.  </li>



<li><strong>Mutable Functions:</strong> Understand how AC/TAC handles mutable functions like <code>SYSDATE</code>, <code>SYS_GUID</code>, <code>sequence.NEXTVAL</code> (values are preserved during replay). Grant <code>KEEP</code> privileges if necessary.  </li>
</ul>



<h3 class="wp-block-heading">6.4 Supported and Unsupported Configurations/Operations</h3>



<ul class="wp-block-list">
<li><strong>Supported:</strong> Standard SQL and PL/SQL operations with compatible drivers, pools, and database versions are generally supported. XA transactions are supported with specific replay data sources (<code>OracleXADataSourceImpl</code>).  </li>



<li><strong>Unsupported/Limitations:</strong>
<ul class="wp-block-list">
<li>Asynchronous ODP.NET.  </li>



<li>Specific drivers (JDBC Type 2 OCI, OLE DB, ODBC, OCCI, Pro*C, etc.).  </li>



<li><code>LONG</code>/<code>LONG RAW</code> data types: Using LOBs is recommended. Can cause replay failures if not handled carefully due to their streaming nature.  </li>



<li>Certain session state changes or PL/SQL calls might temporarily disable replay.  </li>



<li>Operations using legacy <code>oracle.sql.*</code> classes.  </li>
</ul>
</li>
</ul>



<p>Successful AC/TAC deployment hinges on meeting a cascade of prerequisites involving database version, client version, specific driver types, connection pooling strategy, and service configuration. It is not a plug-and-play feature. Each component (Database, driver, pool, FAN) has evolved with AC/TAC capabilities.<sup></sup> Using mismatched versions can lead to partial functionality or complete failure.<sup></sup> Service parameters directly control AC/TAC behavior.<sup></sup> Application design choices (pooling, state management) interact directly with AC/TAC mechanisms.<sup></sup> Therefore, a comprehensive checklist approach <sup></sup> covering all tiers is essential before implementation. Overlooking any requirement (e.g., using an unsupported driver, not configuring FAN, incorrect service settings) will likely lead to failed replays and frustration.<sup></sup> The version requirements also imply that leveraging the latest AC/TAC features often necessitates upgrading both server and client components. &nbsp;</p>



<h2 class="wp-block-heading">7. Benefits, Limitations, and Considerations</h2>



<p>While Application Continuity offers significant availability advantages for applications relying on Oracle databases, it also has specific limitations and requires careful planning and configuration for successful implementation.</p>



<h3 class="wp-block-heading">7.1 Advantages of Implementing AC/TAC</h3>



<ul class="wp-block-list">
<li><strong>Outage Masking:</strong> Hides both planned maintenance (patching, configuration) and unplanned outages (instance, network, storage failures) from applications and end-users.  </li>



<li><strong>Improved User Experience:</strong> Users experience only brief delays instead of error messages during interruptions, increasing satisfaction.  </li>



<li><strong>Increased Application Availability:</strong> Minimizes downtime, ensuring business continuity.  </li>



<li><strong>Developer Productivity:</strong> Reduces the need for complex error-handling code for recoverable errors.  </li>



<li><strong>Transaction Integrity (Idempotence):</strong> Prevents duplicate transaction commits during replay, thanks to Transaction Guard.  </li>



<li><strong>TAC Transparency:</strong> TAC offers easy configuration without requiring code changes.  </li>



<li><strong>Broad Platform Support:</strong> Supports various platforms like Java,.NET, Python, and common connection pools.  </li>
</ul>



<h3 class="wp-block-heading">7.2 Potential Drawbacks, Limitations, and Common Pitfalls</h3>



<ul class="wp-block-list">
<li><strong>Recoverable Errors Only:</strong> Only handles <em>recoverable</em> database errors like network issues or instance failures. <em>Unrecoverable</em> errors originating from application logic or invalid data must still be managed by the application.  </li>



<li><strong>Compatibility Requirements:</strong> Requires specific and compatible Oracle database and client versions, dedicated drivers, and connection pools (See Section 6).  </li>



<li><strong>Configuration Complexity:</strong> Needs careful service configuration, FAN setup, and potentially application adjustments. Misconfiguration leads to replay failure.  </li>



<li><strong>Session State Management:</strong> Restoring session state correctly can be complex, especially for AC or stateful applications. Unrestorable state prevents replay.  </li>



<li><strong>Performance Impact:</strong> State tracking and potential replay can introduce some performance overhead, although usually minimal. Tuning parameters like <code>replay_init_time</code> is important.  </li>



<li><strong>Debugging Challenges:</strong> Diagnosing replay failures can be difficult, requiring tracing  and tools like ACCHK.  </li>



<li><strong>Non-Replayable Operations:</strong> Not all operations are replayable (e.g., those using certain legacy classes , some complex PL/SQL or external calls if not handled carefully ).  </li>



<li><strong>Application Assumptions:</strong> Code assuming ROWIDs don&#8217;t change or relying on middle-tier timing might encounter issues.  </li>
</ul>



<h3 class="wp-block-heading">7.3 Understanding and Managing Side Effects</h3>



<p>Managing side effects (actions outside the database transaction: email, file writes, etc. <sup></sup>) is a key difference between AC and TAC and requires careful consideration. &nbsp;</p>



<ul class="wp-block-list">
<li><strong>Default Behaviors:</strong> AC replays side effects by default, while TAC does not.  </li>



<li><strong>Strategies for AC:</strong>
<ul class="wp-block-list">
<li>If replay of the side effect is acceptable (it&#8217;s idempotent or business logic allows), the default behavior can be used.</li>



<li>To prevent unwanted replay, disable replay for specific code blocks using the <code>disableReplay()</code> API.  </li>



<li>Callbacks can be used for custom logic, though complex.</li>
</ul>
</li>



<li><strong>Strategy for TAC:</strong> Rely on automatic detection and suppression. If a side effect <em>must</em> be replayed, TAC might not be suitable, and AC should be considered.</li>



<li><strong>Analysis:</strong> Identifying side effects during application analysis is crucial.  </li>
</ul>



<p>While AC/TAC offers significant availability benefits, they are not a panacea. Their effectiveness depends heavily on the application&#8217;s architecture, the nature of the failure, and meticulous configuration and validation. The limitations make it clear that AC/TAC targets a specific class of problems.<sup></sup> They do not fix application bugs or handle every possible state.<sup></sup> The pitfalls around configuration <sup></sup> and state <sup></sup> indicate that implementation requires expertise and testing. Side effect management <sup></sup> remains a key differentiator and potential point of complexity. Therefore, setting realistic expectations is vital. Organizations should view AC/TAC as powerful tools within a larger HA strategy <sup></sup>, not a complete replacement for robust application design and error handling. Thorough testing and validation with tools like ACCHK <sup></sup> are non-negotiable before production deployment. &nbsp;</p>



<h2 class="wp-block-heading">8. Integration with Oracle High Availability Solutions</h2>



<p>While Application Continuity is a valuable feature on its own, its power and effectiveness are maximized when integrated with Oracle&#8217;s other high availability solutions. Particularly when used alongside technologies like Oracle RAC and Active Data Guard, it provides multi-layered protection, creating a comprehensive defense against application interruptions.</p>



<h3 class="wp-block-heading">8.1 AC/TAC and Real Application Clusters (RAC)</h3>



<p>Oracle RAC allows a single database to run across multiple servers (nodes), providing instance-level redundancy and scalability.<sup></sup> AC/TAC plays a critical role in RAC environments in the following ways: &nbsp;</p>



<ul class="wp-block-list">
<li><strong>Failover Target:</strong> When a RAC node or instance fails, AC/TAC directs the session to another surviving instance in the cluster and initiates the replay process.  </li>



<li><strong>Clusterware Services and FAN Integration:</strong> In RAC, database services are managed by Oracle Clusterware. These services distribute workloads, define preferred and available instances. FAN, as an integral part of Clusterware, instantly broadcasts changes in node or service status (crash, start, stop). AC/TAC uses these FAN notifications for rapid failure detection and triggering the failover process.  </li>



<li><strong>Planned Maintenance and Load Balancing:</strong> RAC services are used to manage workload redirection or draining during planned maintenance (e.g., rolling patching). AC/TAC helps ensure continuity during these processes. Furthermore, load balancing information provided via FAN allows connection pools to direct new connections to less loaded instances.  </li>



<li><strong>23ai Enhancements:</strong> Features introduced in Oracle 23ai, such as Smart Connection Rebalance and Smooth Reconfiguration of RAC Instances, further enhance overall application availability in RAC environments.  </li>
</ul>



<h3 class="wp-block-heading">8.2 AC/TAC and Active Data Guard (ADG)</h3>



<p>Oracle Active Data Guard provides disaster recovery and data protection by creating one or more synchronized physical standby copies of a primary database. The standby can also be used for read-only queries (Active). AC/TAC is also supported in ADG environments:</p>



<ul class="wp-block-list">
<li><strong>Disaster Recovery Scenarios:</strong> When the primary database becomes completely unavailable (e.g., site disaster), Data Guard performs an automatic or manual failover or switchover to the standby database.  </li>



<li><strong>Role-Based Services:</strong> In ADG environments, services are typically defined based on a specific role (PRIMARY or STANDBY). An AC/TAC-enabled service is defined to run on the database holding the primary role.  </li>



<li><strong>Post-Failover Replay:</strong> After the role transition (failover/switchover) completes, the application service starts on the new primary database. AC/TAC directs client connections to this new primary and attempts to rebuild and replay the interrupted session and transaction there.  </li>



<li><strong>Data Loss Consideration:</strong> Crucially, if <strong>data loss occurred</strong> during the Data Guard role transition, AC/TAC will <strong>not attempt</strong> replay. Therefore, running Data Guard in Maximum Availability or Maximum Protection mode is preferred for seamless failover with AC/TAC.  </li>
</ul>



<h3 class="wp-block-heading">8.3 Relationship with Connection Draining for Planned Maintenance</h3>



<p>The primary mechanism for achieving zero downtime during planned maintenance (e.g., database or OS patching, hardware upgrades) is <strong>connection draining</strong>.<sup></sup> &nbsp;</p>



<ul class="wp-block-list">
<li><strong>Process:</strong> Services on the instance undergoing maintenance are stopped or relocated with a specific drain timeout (<code>drain_timeout</code>) (<code>srvctl relocate service</code> or <code>stop service</code>). FAN notifies connection pools of this status. Pools stop giving new connections to the instance marked for draining and close existing idle connections. Active connections are closed when they finish their work and are returned to the pool.  </li>



<li><strong>AC/TAC&#8217;s Role:</strong> AC/TAC acts as a <strong>backup mechanism</strong> during the draining process. If a session cannot complete its work within the defined <code>drain_timeout</code> and its connection is forcibly terminated, AC/TAC attempts to replay that session on a surviving instance. This helps ensure continuity even if the drain timeout is insufficient or for unexpectedly long-running transactions.  </li>
</ul>



<p>AC/TAC is most potent when deployed within a comprehensive MAA framework involving RAC and/or Active Data Guard, leveraging the redundancy and failover capabilities of the underlying infrastructure. RAC provides immediate local failover targets.<sup></sup> ADG provides disaster recovery failover targets.<sup></sup> FAN, integral to Clusterware/Data Guard Broker, provides the necessary rapid notifications.<sup></sup> Draining handles planned events gracefully.<sup></sup> AC/TAC fills the gap by handling the <em>application session</em> recovery during these infrastructure events. While AC/TAC can provide some benefit on a single instance <sup></sup>, its true value emerges in clustered or replicated environments where alternative processing resources are readily available. The synergy between these technologies (RAC/ADG + FAN + Pools + AC/TAC) creates a multi-layered defense against disruption. &nbsp;</p>



<h2 class="wp-block-heading">9. Enhancements in Oracle Database 23ai</h2>



<p>Oracle continues to invest in Application Continuity and related high availability technologies. The Oracle Database 23ai release introduces significant new features and improvements in this area, expanding the capabilities of AC/TAC and simplifying its usage.</p>



<h3 class="wp-block-heading">9.1 Overview of Key HA/Continuity Features in 23ai</h3>



<p>Oracle 23ai includes a range of innovations focused on enhancing continuous availability.<sup></sup> The main enhancements directly or indirectly related to Application Continuity are: &nbsp;</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><th>23ai Feature</th><th>Description</th><th>Benefit</th><th>Related Snippets</th></tr><tr><td><strong>AC Session State Restore (Database Templates)</strong></td><td>Uses templates to checkpoint/restore session state for AC replay/migration.</td><td>Simplifies/broadens AC use, improves state restore reliability, reduces planned downtime.</td><td><sup></sup></td></tr><tr><td><strong>AC Batch Support (Resumable Cursors)</strong></td><td>TAC automatically manages and allows replay of long-running cursors common in batch jobs.</td><td>Extends AC/TAC protection to batch workloads.</td><td><sup></sup></td></tr><tr><td><strong>JDBC Auto-Enabled AC</strong></td><td>AC support is enabled by default in 23ai JDBC drivers; only requires AC-enabled service.</td><td>Lowers the entry barrier for Java applications.</td><td><sup></sup></td></tr><tr><td><strong>JDBC True Cache Integration</strong></td><td>JDBC driver can route read-only workloads to True Cache instances.</td><td>Improves performance/scalability (indirectly related to replay).</td><td><sup></sup></td></tr><tr><td><strong>Database Native Transaction Guard</strong></td><td>Persists LTXID as part of commit, reducing overhead compared to separate table.</td><td>Improves TG performance, requires no client changes.</td><td><sup></sup></td></tr><tr><td><strong>Smart Connection Rebalance</strong></td><td>Automatically moves sessions between RAC instances based on performance.</td><td>Transparently improves performance/resource utilization.</td><td><sup></sup></td></tr><tr><td><strong>Smooth Reconfiguration of RAC Instances</strong></td><td>Reduces downtime when nodes join/leave a RAC cluster.</td><td>Enhances continuous availability during cluster changes.</td><td><sup></sup></td></tr><tr><td><strong>JDBC Self-Driver Diagnosability</strong></td><td>Single production JAR; dumps in-memory trace on first failure.</td><td>Simplifies debugging and diagnostics for JDBC/AC issues.</td><td><sup></sup></td></tr></tbody></table></figure>



<p>This table directly addresses the user&#8217;s request for 23ai features, providing a quick summary of the most relevant enhancements impacting application continuity and high availability.</p>



<h3 class="wp-block-heading">9.2 Database Templates for Session State Restoration</h3>



<p>Prior to Oracle 23ai, restoring complex session states, especially with AC, could require mechanisms like manual callbacks or connection labeling. <strong>Database Templates</strong>, introduced in 23ai, significantly simplify and automate this process.<sup></sup> These templates are used to periodically checkpoint the session state, both server-side and client-visible aspects. When an outage occurs and replay is needed, AC uses these templates to quickly and reliably restore the session state at the start of the replay.<sup></sup> Enhancements in the JDBC driver allow these templates to be shared across sessions and manage state variations.<sup></sup> This simplifies AC configuration and increases the likelihood of successful replay. &nbsp;</p>



<h3 class="wp-block-heading">9.3 Support for Batch Applications (Resumable Cursors)</h3>



<p>Traditionally, long-running database cursors (often used in batch jobs or reporting) could prevent AC/TAC from automatically detecting request boundaries, as the request wasn&#8217;t considered finished while the cursor was open.<sup></sup> Oracle 23ai addresses this with TAC and the JDBC driver. With <strong>Resumable Cursors</strong> support, long-running cursors that meet certain criteria (e.g., open with no open transaction and restorable session state) no longer prevent the implicit determination of request boundaries.<sup></sup> This extends TAC protection to batch-type workloads that might have previously been excluded.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">9.4 JDBC Driver Enhancements (Auto-Enablement, True Cache)</h3>



<p>The Oracle 23ai JDBC driver includes significant innovations simplifying AC usage:</p>



<ul class="wp-block-list">
<li><strong>Auto-Enablement:</strong> With the 23ai driver, Application Continuity support is <strong>enabled by default</strong> in all data sources. All that&#8217;s required for an application to benefit from AC is to connect to an AC/TAC-enabled database service. To disable AC, the new <code>oracle.jdbc.enableACSupport=false</code> connection property or system property can be used.  </li>



<li><strong>True Cache Integration:</strong> True Cache is an in-memory, consistent, read-only replica of the primary database. When enabled via the <code>oracle.jdbc.useTrueCacheDriverConnection=true</code> property, the 23ai JDBC driver can automatically route read-only workloads to appropriate True Cache instances, improving performance and scalability.  </li>



<li><strong>Self-Diagnosability:</strong> To simplify debugging, the 23ai JDBC driver records critical execution state in memory and dumps this recording when an error occurs, providing valuable diagnostic information on the first occurrence of the problem. The need for separate debug and metrics JAR files has also been eliminated.  </li>
</ul>



<h3 class="wp-block-heading">9.5 Transaction Guard Improvements</h3>



<p>Oracle 23ai introduces <strong>Database Native Transaction Guard</strong>. This enhancement persists the LTXID and commit outcome as part of the transaction&#8217;s commit record itself, rather than in a separate table. This eliminates the extra redo generation and performance overhead associated with Transaction Guard and requires no client-side changes.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">9.6 Smart Connection Rebalance and Smooth Reconfiguration</h3>



<p>While not direct AC/TAC mechanisms, these two features enhance overall availability and performance in RAC environments, making the platform AC/TAC runs on more stable:</p>



<ul class="wp-block-list">
<li><strong>Smart Connection Rebalance:</strong> Automatically redistributes sessions across RAC instances based on real-time performance, balancing load and optimizing performance.  </li>



<li><strong>Smooth Reconfiguration:</strong> Reduces the brief service interruptions (brownouts) experienced during RAC topology changes, such as nodes joining or leaving the cluster.  </li>
</ul>



<p>Oracle 23ai represents a significant leap forward in making Application Continuity more powerful, easier to manage, and applicable to a broader range of workloads (notably batch). Features like Templates <sup></sup>, Resumable Cursor support <sup></sup>, and JDBC Auto-enablement <sup></sup> directly address previous limitations or complexities. Native TG <sup></sup> improves efficiency. RAC enhancements <sup></sup> strengthen the underlying platform. For organizations considering AC/TAC, 23ai offers compelling reasons to upgrade. It lowers adoption barriers and expands protection, aligning with trends towards autonomous operations and broader HA coverage. True Cache <sup></sup> also signals a move towards optimizing read performance in HA architectures. &nbsp;</p>



<h2 class="wp-block-heading">10. Configuration, Validation, and Best Practices</h2>



<p>Transforming the theoretical benefits of Application Continuity into reality requires careful configuration, thorough validation, and adherence to established best practices. Ensuring the correct settings on both the database server and client-side, along with designing the application to be compatible with AC/TAC, is critically important.</p>



<h3 class="wp-block-heading">10.1 Configuring Database Services for AC/TAC</h3>



<p>Enabling AC/TAC and controlling its behavior is done through application services managed via Oracle Clusterware (for RAC) or the <code>DBMS_SERVICE</code> package (for single instance <sup></sup>). Key parameters set using <code>srvctl add service</code> or <code>modify service</code> commands include: &nbsp;</p>



<ul class="wp-block-list">
<li><strong>Example Configuration for TAC:</strong>  <code>srvctl add service -db &lt;db_unique_name> -pdb &lt;pdb_name> -service GOLD_TAC \ -preferred &lt;instance1> -available &lt;instance2> \ -failovertype AUTO \ -commit_outcome TRUE \ -failover_restore AUTO \ -session_state_consistency AUTO \ -replay_init_time 1800 \ -retention 86400 \ -notification TRUE \ -drain_timeout 600 \ -stopoption IMMEDIATE</code> This command uses the recommended <code>AUTO</code> settings for TAC (<code>failovertype</code>, <code>failover_restore</code>, <code>session_state_consistency</code>) and enables Transaction Guard (<code>commit_outcome=TRUE</code>). Parameters like <code>replay_init_time</code> (replay initiation timeout), <code>retention</code> (TG outcome retention time), and <code>drain_timeout</code> (draining timeout) should be tuned based on the workload.  </li>



<li><strong>Example Configuration for AC:</strong>  <code>srvctl add service -db &lt;db_unique_name> -pdb &lt;pdb_name> -service GOLD_AC \ -preferred &lt;instance1> -available &lt;instance2> \ -failovertype TRANSACTION \ -commit_outcome TRUE \ -failover_restore LEVEL1 \ -replay_init_time 1800 \ -retention 86400 \ -notification TRUE \ -drain_timeout 600 \ -stopoption IMMEDIATE</code> This command uses <code>failovertype=TRANSACTION</code> for AC and <code>failover_restore=LEVEL1</code> for basic state restoration.  </li>
</ul>



<p>Careful tuning of parameters (especially <code>replay_init_time</code> and <code>drain_timeout</code>) based on workload and expected outage durations is essential.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">10.2 Client-Side Configuration</h3>



<p>Clients must connect correctly to AC/TAC-enabled services and be configured to leverage failover mechanisms:</p>



<ul class="wp-block-list">
<li><strong>TNS Connect String:</strong> The recommended connect string should include parameters for timeouts (<code>CONNECT_TIMEOUT</code>, <code>TRANSPORT_CONNECT_TIMEOUT</code>), retry count (<code>RETRY_COUNT</code>), and delay (<code>RETRY_DELAY</code>). For RAC environments, SCAN addresses (<code>HOST=&lt;scan_vip></code> within <code>ADDRESS_LIST</code>) and <code>SERVICE_NAME</code> must be used (SID usage is unsupported and discouraged). <code>Alias = (DESCRIPTION = (CONNECT_TIMEOUT=3)(RETRY_COUNT=4)(RETRY_DELAY=2)(TRANSPORT_CONNECT_TIMEOUT=3) (ADDRESS_LIST = (LOAD_BALANCE=on) (ADDRESS = (PROTOCOL = TCP)(HOST=&lt;scan_vip_or_host1>)(PORT=1521)) (ADDRESS = (PROTOCOL = TCP)(HOST=&lt;host2_vip>)(PORT=1521))... ) (CONNECT_DATA= (SERVICE_NAME = GOLD_TAC) ) )</code>  </li>



<li><strong>JDBC Configuration:</strong>
<ul class="wp-block-list">
<li><strong>DataSource:</strong> For pre-23ai drivers, <code>oracle.jdbc.replay.OracleDataSourceImpl</code> (or <code>OracleXADataSourceImpl</code> for XA) must be used. In 23ai, the standard <code>OracleDataSource</code> is sufficient as AC is auto-enabled.  </li>



<li><strong>Pool Properties:</strong> In pools like UCP, properties like <code>setFastConnectionFailoverEnabled(true)</code> must be set to enable FCF.  </li>



<li><strong>JAR Files:</strong> Ensure necessary Oracle JDBC driver (e.g., <code>ojdbc11.jar</code>), UCP (<code>ucp.jar</code>), and ONS (<code>ons.jar</code>) JAR files are in the CLASSPATH.  </li>
</ul>
</li>



<li><strong>OCI/ODP.NET Configuration:</strong>
<ul class="wp-block-list">
<li><strong><code>oraaccess.xml</code>:</strong> FAN and Runtime Load Balancing (RLB) settings can be configured via this file.  </li>



<li><strong>Connection String Attributes:</strong> Properties like <code>HA Events=true</code> (enable FAN), <code>Load Balancing=true</code> (enable RLB), <code>Pooling=true</code> can be specified in the connection string.  </li>
</ul>
</li>
</ul>



<h3 class="wp-block-heading">10.3 Validating Coverage with ACCHK</h3>



<p>Simply performing destructive testing (e.g., shutting down an instance) is insufficient to confirm correct configuration and understand the extent to which the application is protected by AC/TAC.<sup></sup> Oracle provides the <strong>ACCHK (Application Continuity Checker)</strong> tool for this purpose.<sup></sup> &nbsp;</p>



<ul class="wp-block-list">
<li><strong>Purpose:</strong> ACCHK analyzes and reports the AC/TAC protection level while a specific workload is running. It shows the protection percentage, number of protected/unprotected operations, reasons for lack of protection, and usage of legacy concrete classes.  </li>



<li><strong>Steps:</strong>
<ol class="wp-block-list">
<li><strong>Create Views:</strong> Before first use, create ACCHK views (<code>DBA_ACCHK_*</code>) and the <code>ACCHK_READ</code> role in the database using <code>execute dbms_app_cont_admin.acchk_views();</code> (<code>COMPATIBLE</code> must be >= 12.2).  </li>



<li><strong>Grant Privilege:</strong> Grant <code>GRANT ACCHK_READ TO &lt;user_name>;</code> to users who need to read the reports.  </li>



<li><strong>Enable Tracing:</strong> Enable AC tracing for a specific duration using <code>execute dbms_app_cont_admin.acchk_set(true, &lt;duration_seconds>);</code>. This can also be done at the database or session level with <code>ALTER SYSTEM/SESSION SET EVENTS 'trace[progint_appcont_rdbms]';</code>.  </li>



<li><strong>Run Workload:</strong> Execute the application workload to be validated while tracing is active.  </li>



<li><strong>Report/Query:</strong> After the tracing period ends (or is manually stopped with <code>acchk_set(false)</code>), query views like <code>DBA_ACCHK_EVENTS</code>, <code>DBA_ACCHK_STATISTICS</code>, or use tools like ORAchk  to analyze the protection level and details.  </li>
</ol>
</li>
</ul>



<p>Using ACCHK <em>before</em> deployment and <em>after</em> application changes is critical to verify the protection level and proactively identify potential issues.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">10.4 Recommended Best Practices for Developers and DBAs</h3>



<ul class="wp-block-list">
<li><strong>DBAs:</strong>
<ul class="wp-block-list">
<li>Use application-specific services configured with correct parameters (FAILOVERTYPE, COMMIT_OUTCOME, etc.).</li>



<li>Enable FAN and ensure client accessibility (e.g., port 6200).</li>



<li>Monitor AC statistics (AWR, ACCHK views).  </li>



<li>Tune timeouts (<code>replay_init_time</code>, <code>drain_timeout</code>) based on workload.  </li>



<li>Apply recommended database patches.  </li>
</ul>
</li>



<li><strong>Developers:</strong>
<ul class="wp-block-list">
<li>Use Oracle connection pools and return connections promptly after use.  </li>



<li>Write stateless code where possible, or manage state carefully.  </li>



<li>Implement robust error handling for unrecoverable errors.  </li>



<li>Avoid legacy <code>oracle.sql.*</code> concrete classes.  </li>



<li>Understand and manage side effects (consider <code>disableReplay</code> for AC or TAC&#8217;s default behavior).  </li>



<li>Validate coverage with ACCHK.  </li>
</ul>
</li>



<li><strong>General:</strong>
<ul class="wp-block-list">
<li>Perform thorough testing in QA environments that mimic production.  </li>



<li>Use the latest drivers and patches.  </li>



<li>Follow Oracle MAA guidelines.  </li>
</ul>
</li>
</ul>



<p>Configuration and validation are iterative processes, not one-time tasks. Tuning and verification are essential to realize the full benefits of AC/TAC. Default settings may not be optimal.<sup></sup> Application behavior can change, potentially introducing unprotected calls.<sup></sup> ACCHK provides the necessary visibility <sup></sup> into actual protection levels, allowing informed adjustments and fixes <em>before</em> a real outage reveals weaknesses. Successful AC/TAC implementation requires ongoing diligence, involving not just initial setup but also performance monitoring <sup></sup>, coverage validation <sup></sup>, and potentially adjusting configuration <sup></sup> or application code based on findings. Collaboration between DBAs and developers is key.<sup></sup> &nbsp;</p>



<h2 class="wp-block-heading">11. Conclusion</h2>



<p>Oracle Application Continuity (AC) and its more transparent variant, Transparent Application Continuity (TAC), offer powerful solutions to the challenges of uninterrupted service and high availability faced by modern applications. These technologies mask the impact of planned and unplanned database outages from end-users and applications, aiming to make disruptions feel like nothing more than brief processing delays.<sup></sup> &nbsp;</p>



<p>AC and TAC function by recovering interrupted database sessions, including their state and in-flight transactions, and automatically replaying them.<sup></sup> Transaction Guard plays a crucial role in this process, guaranteeing that transactions are executed only once, thereby preserving data integrity.<sup></sup> Fast Application Notification (FAN), along with compatible connection pools and drivers, are critical ecosystem components enabling rapid failure detection and seamless transition.<sup></sup> While TAC provides transparent protection often without code changes <sup></sup>, AC offers greater customization and control.<sup></sup> &nbsp;</p>



<p>These technologies are particularly potent when deployed alongside other MAA components like Oracle RAC and Active Data Guard, creating a highly resilient and continuously available infrastructure. Innovations in Oracle 23ai, such as Database Templates, enhanced support for batch jobs, and auto-enablement in the JDBC driver, further advance the capabilities of AC/TAC and ease their adoption.<sup></sup> &nbsp;</p>



<p>However, fully leveraging the benefits of AC/TAC requires more than just enabling a feature. Success depends on selecting the correct database and client versions, meticulous service configuration, designing applications according to best practices, and performing thorough validation using tools like ACCHK. Organizations should view AC/TAC as powerful tools within the MAA framework that complement robust application design and overall error management strategies. With proper configuration, continuous monitoring, and adherence to best practices, Oracle Application Continuity can play a critical role in achieving the level of application availability demanded by today&#8217;s challenging business requirements.<sup></sup> &nbsp;</p>



<p></p>
<p>The post <a rel="nofollow" href="https://www.bugraparlayan.com.tr/oracle-application-continuity-ac-tac.html">Oracle Application Continuity (AC &amp; TAC)</a> appeared first on <a rel="nofollow" href="https://www.bugraparlayan.com.tr">Bugra Parlayan | Oracle Database &amp; Exadata Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Exadata Update Utilities: patchmgr and dbnodeupdate.sh</title>
		<link>https://www.bugraparlayan.com.tr/exadata-update-utilities-patchmgr-and-dbnodeupdate-sh.html</link>
		
		<dc:creator><![CDATA[Bugra Parlayan]]></dc:creator>
		<pubDate>Sat, 26 Apr 2025 14:56:09 +0000</pubDate>
				<category><![CDATA[Engineered Systems]]></category>
		<category><![CDATA[cell node patching]]></category>
		<category><![CDATA[database node updates]]></category>
		<category><![CDATA[dbnodeupdate.sh]]></category>
		<category><![CDATA[dbnodeupdate.sh usage]]></category>
		<category><![CDATA[Exadata automation tools]]></category>
		<category><![CDATA[Oracle Exadata patching]]></category>
		<category><![CDATA[patchmgr]]></category>
		<category><![CDATA[patchmgr best practices]]></category>
		<category><![CDATA[rolling patch updates]]></category>
		<guid isPermaLink="false">https://www.bugraparlayan.com.tr/?p=1459</guid>

					<description><![CDATA[<p>1. Introduction Oracle Exadata Database Machine is a high-performance, optimized platform for Oracle Database workloads. Regularly updating the software components of this platform—including the operating system, Exadata system software, device drivers, and firmware—is crucial for addressing security vulnerabilities, fixing bugs, and leveraging new features. Oracle provides specialized utilities to manage these update processes. Two of &#8230;</p>
<p>The post <a rel="nofollow" href="https://www.bugraparlayan.com.tr/exadata-update-utilities-patchmgr-and-dbnodeupdate-sh.html">Exadata Update Utilities: patchmgr and dbnodeupdate.sh</a> appeared first on <a rel="nofollow" href="https://www.bugraparlayan.com.tr">Bugra Parlayan | Oracle Database &amp; Exadata Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">1. Introduction</h2>



<p>Oracle Exadata Database Machine is a high-performance, optimized platform for Oracle Database workloads. Regularly updating the software components of this platform—including the operating system, Exadata system software, device drivers, and firmware—is crucial for addressing security vulnerabilities, fixing bugs, and leveraging new features. Oracle provides specialized utilities to manage these update processes. Two of the most commonly used tools are <code>patchmgr</code> and <code>dbnodeupdate.sh</code>. This document aims to provide a detailed technical comparison of these two utilities, explaining their functions, key differences, use cases, and parameters for effective <strong>Exadata patching</strong>.</p>



<h2 class="wp-block-heading">2. The <code>patchmgr</code> Utility</h2>



<h3 class="wp-block-heading">2.1. Definition and Purpose</h3>



<p><code>patchmgr</code> is a centralized utility designed to <strong>orchestrate and simplify</strong> software updates for Oracle Exadata infrastructure components.<sup></sup> It allows administrators to update multiple components—database servers, storage servers, and network switches—using a single command structure, streamlining the <strong>Exadata update process</strong>.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">2.2. Scope and Capabilities</h3>



<ul class="wp-block-list">
<li><strong>Broad Component Coverage:</strong><code>patchmgr</code> can update various Exadata components :
<ul class="wp-block-list">
<li>Oracle Exadata Storage Servers (Cells)</li>



<li>Oracle Exadata Database Servers (Compute Nodes)</li>



<li>RDMA Network Fabric Switches (RoCE Switches)</li>



<li>InfiniBand Network Fabric Switches</li>



<li>Management Network Switch (specific models)   </li>
</ul>
</li>



<li><strong>Orchestration:</strong> It manages the update sequence across multiple targets, supporting both rolling and non-rolling updates.
<ul class="wp-block-list">
<li><strong>Rolling Update:</strong> Updates components sequentially (one by one) to maintain overall system availability, ideal for RAC clusters or storage server grids.  </li>



<li><strong>Non-Rolling Update:</strong> Updates all specified components concurrently, which is faster but requires a complete system outage.  </li>
</ul>
</li>



<li><strong>Automation:</strong> For database server updates, <code>patchmgr</code> automates numerous steps, including stopping/starting databases and Grid Infrastructure, managing VMs, handling Oracle Enterprise Manager agents, taking OS backups, relinking Oracle Homes, and applying best practice configurations.  </li>



<li><strong>Centralized Execution:</strong> <code>patchmgr</code> can be executed from a database server within the Exadata system being patched or from a separate, central server (the &#8220;driving system&#8221;) running Oracle Linux or Oracle Solaris. This facilitates managing multiple Exadata systems from one location.  </li>



<li><strong>User and Concurrency:</strong> Can be run by <code>root</code> or a non-root user (requires <code>-log_dir</code>). Multiple <code>patchmgr</code> instances can run concurrently from the same software directory (using distinct <code>-log_dir</code> values) to patch different systems simultaneously.  </li>
</ul>



<h3 class="wp-block-heading">2.3. Platform Support</h3>



<ul class="wp-block-list">
<li><strong>Target Systems:</strong> The Exadata components updated by <code>patchmgr</code> (database servers, storage servers) typically run <strong>Oracle Linux</strong>.</li>



<li><strong>Driving System:</strong> The <code>patchmgr</code> utility itself can be executed from a server running either <strong>Oracle Linux</strong> or <strong>Oracle Solaris</strong>. This means you can initiate and manage the patching of Linux-based Exadata components from a Solaris management server.  </li>
</ul>



<h3 class="wp-block-heading">2.4. Key Parameters and Usage</h3>



<p>The general syntax for <code>patchmgr</code> is: <code>./patchmgr -&lt;component&gt; &lt;component_list_file&gt; -&lt;action&gt; &lt;required_arguments&gt; [optional_arguments]</code> <sup></sup> &nbsp;</p>



<ul class="wp-block-list">
<li><strong><code>-&lt;component></code>:</strong> Specifies the component type:
<ul class="wp-block-list">
<li><code>-cells</code>: For Storage Servers.</li>



<li><code>-dbnodes</code>: For Database Servers.</li>



<li><code>-ibswitches</code>: For InfiniBand Switches.</li>



<li><code>-roceswitches</code>: For RoCE Switches.</li>
</ul>
</li>



<li><strong><code>&lt;component_list_file></code>:</strong> A text file listing the hostnames of the components to be updated.  </li>



<li><strong><code>-&lt;action></code>:</strong> Specifies the operation:
<ul class="wp-block-list">
<li><code>-upgrade</code>: Performs a software upgrade to a specified version.  </li>



<li><code>-rollback</code>: Rolls back to the previous software version.</li>



<li><code>-precheck</code>: Runs prerequisite checks before an upgrade or rollback.  </li>



<li><code>-backup</code>: Performs a backup (typically for DB nodes).</li>
</ul>
</li>



<li><strong><code>[optional_arguments]</code>:</strong> Modifies the action or behavior:
<ul class="wp-block-list">
<li><code>--rolling</code> / <code>-rolling</code>: Perform the action in a rolling fashion.  </li>



<li><code>--iso_repo &lt;path_to_iso></code> / <code>-iso_repo &lt;path_to_iso></code>: Specifies the path to the patch ISO file.  </li>



<li><code>--target_version &lt;version></code> / <code>-target_version &lt;version></code>: Specifies the target software version.  </li>



<li><code>--modify_at_prereq</code>: Allows removal of conflicting RPMs during precheck to resolve dependencies (for DB nodes).  </li>



<li><code>--force_remove_custom_rpms</code>: Forces removal of custom (non-Exadata) RPMs during an OS upgrade (for DB nodes).</li>



<li><code>--log_dir &lt;directory|auto></code>: Specifies a directory for log files or uses automatic naming. Required for concurrent execution or non-root users.  </li>



<li><code>--allow_active_network_mounts</code>: Allows patching to proceed even if active network mounts (like NFS) are detected.  </li>



<li><code>--dbnode_patch_base &lt;path></code>: Specifies the directory on target DB nodes where patch files will be extracted.  </li>



<li><code>--ignore_alerts</code>: Proceeds with patching despite active hardware alerts.  </li>



<li><code>--sequential_backup</code>: Backs up each node immediately before updating it during a rolling update (default is to back up all nodes first).  </li>



<li><code>--update_type &lt;type></code>: Selects security-only (<code>allcvss</code>) or full (<code>full</code>) update.  </li>



<li><code>--live-update-target</code>: Utilizes Exadata Live Update (on supported versions).  </li>
</ul>
</li>
</ul>



<h2 class="wp-block-heading">3. The <code>dbnodeupdate.sh</code> Utility</h2>



<h3 class="wp-block-heading">3.1. Definition and Purpose</h3>



<p><code>dbnodeupdate.sh</code> is a shell script specifically used to update, roll back, or back up the software on a <strong>single Oracle Exadata database server (compute node)</strong>.<sup></sup> Before <code>patchmgr</code> provided orchestration for database servers, updates often involved manually running <code>dbnodeupdate.sh</code> on each node sequentially.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">3.2. Scope and Capabilities</h3>



<ul class="wp-block-list">
<li><strong>Single Database Server Focus:</strong> <code>dbnodeupdate.sh</code> operates only on the database server where it is executed.  </li>



<li><strong>Core Update Engine:</strong> When <code>patchmgr</code> updates database servers, it essentially invokes <code>dbnodeupdate.sh</code> on each target node to perform the actual update, rollback, or backup tasks.  </li>



<li><strong>Operating System Updates:</strong> It handles updates for the Oracle Linux OS, device drivers, and firmware included in the Exadata system software patch. It supports major OS upgrades (e.g., OL6 to OL7, OL7 to OL8), although older <code>dbnodeupdate.sh</code> versions might be needed for older OS transitions.  </li>



<li><strong>Backup and Rollback:</strong> Automatically creates a backup of the root filesystem before starting an update. This backup enables rollback to the previous state using the <code>-r</code> option if the update fails or needs to be reverted.  </li>



<li><strong>Dependency Management:</strong> Includes the <code>-M</code> option to allow the removal of conflicting RPMs during the prerequisite check phase to resolve dependency issues.  </li>
</ul>



<h3 class="wp-block-heading">3.3. Platform Support</h3>



<ul class="wp-block-list">
<li><code>dbnodeupdate.sh</code> runs <em>on</em> the Exadata database server being updated. Modern Exadata database servers exclusively use <strong>Oracle Linux</strong>. While Solaris was supported on older Exadata compute nodes , <code>dbnodeupdate.sh</code> in current contexts targets Linux.  </li>
</ul>



<h3 class="wp-block-heading">3.4. Key Parameters and Usage</h3>



<p>The basic usage is: <code>./dbnodeupdate.sh &lt;options&gt;</code></p>



<ul class="wp-block-list">
<li><strong><code>-u</code>:</strong> Initiates the update process.  </li>



<li><strong><code>-r</code>:</strong> Initiates a rollback from the pre-update backup.  </li>



<li><strong><code>-b</code>:</strong> Performs only the backup step.</li>



<li><strong><code>-c</code>:</strong> Runs the post-reboot completion steps after an update or rollback.  </li>



<li><strong><code>-l &lt;ISO_or_Repo_URL></code>:</strong> Specifies the path to the update ISO file or the YUM repository URL.  </li>



<li><strong><code>-s</code>:</strong> Stops Cluster Ready Services (CRS) before the update/rollback and restarts it afterward.  </li>



<li><strong><code>-p</code>:</strong> Runs the bootstrap phase (typically for upgrades from older versions).  </li>



<li><strong><code>-x &lt;helper_script_dir></code>:</strong> Specifies the directory containing helper scripts (often used with <code>-p</code>).  </li>



<li><strong><code>-M</code>:</strong> Allows removal of conflicting RPMs during prerequisite checks.  </li>



<li><strong><code>-v</code>:</strong> Performs only the prerequisite check.  </li>
</ul>



<h2 class="wp-block-heading">4. <code>patchmgr</code> vs. <code>dbnodeupdate.sh</code>: Key Differences</h2>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><th>Feature</th><th><code>patchmgr</code></th><th><code>dbnodeupdate.sh</code></th></tr><tr><td><strong>Primary Purpose</strong></td><td><strong>Orchestration</strong> for Exadata infrastructure components</td><td><strong>Single</strong> Exadata DB server update/rollback/backup</td></tr><tr><td><strong>Scope</strong></td><td>DB Servers, Storage Servers, Network Switches</td><td>DB Servers Only</td></tr><tr><td><strong>Execution Mode</strong></td><td>Manages multiple targets; invokes <code>dbnodeupdate.sh</code> for DB nodes</td><td>Runs on a single target node</td></tr><tr><td><strong>Update Mode</strong></td><td>Rolling or Non-Rolling</td><td>Affects only the single node it runs on</td></tr><tr><td><strong>Run Location</strong></td><td>DB Node or separate Linux/Solaris server</td><td>Only on the target DB Node being updated</td></tr><tr><td><strong>Typical Use Case</strong></td><td>Standard multi-component/multi-node patching</td><td>Single node update/rollback; invoked by <code>patchmgr</code>; patching last node in rolling update; recovery scenarios</td></tr><tr><td><strong>Driving Platform</strong></td><td>Linux, <strong>Solaris</strong> <sup></sup></td><td>Linux (on the target DB Node)</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">5. Which Tool Should Be Used When?</h2>



<ul class="wp-block-list">
<li><strong>Use <code>patchmgr</code> when:</strong>
<ul class="wp-block-list">
<li>Updating multiple storage servers, database servers, or network switches (<strong>standard and preferred method</strong>).</li>



<li>Choosing between rolling or non-rolling update strategies.</li>



<li>Managing the update process from a central server.</li>



<li>Leveraging automated orchestration steps (service stop/start, backup, relink).</li>
</ul>
</li>



<li><strong>Use <code>dbnodeupdate.sh</code> when:</strong>
<ul class="wp-block-list">
<li>Updating or rolling back <strong>only one</strong> specific database server (e.g., testing on a single node).</li>



<li>Performing a rolling update with <code>patchmgr</code> and needing to patch the <strong>initial driving node last</strong> (by running <code>dbnodeupdate.sh</code> locally on it after other nodes are done).  </li>



<li>Recovering a system after a failed update/rollback by booting from a <strong>diagnostic ISO</strong>.  </li>



<li>As a manual alternative if <code>patchmgr</code> itself encounters issues or is unavailable.</li>
</ul>
</li>
</ul>



<p>As a general rule, <strong><code>patchmgr</code> is the standard utility</strong> for routine Exadata infrastructure patching. <code>dbnodeupdate.sh</code> should be considered an underlying component used by <code>patchmgr</code> for database nodes or a tool for specific single-node scenarios.</p>



<h2 class="wp-block-heading">6. Conclusion</h2>



<p><code>patchmgr</code> and <code>dbnodeupdate.sh</code> are essential tools for maintaining the currency and security of Oracle Exadata platforms. <code>patchmgr</code> serves as the primary orchestration utility, simplifying the update process across multiple Exadata components (database servers, storage servers, switches) and supporting both rolling and non-rolling strategies. It can be driven from Linux or Solaris systems. <code>dbnodeupdate.sh</code> is the core script that performs the actual update, rollback, or backup on individual Linux-based Exadata database servers, often invoked by <code>patchmgr</code> but also usable standalone for specific single-node tasks or recovery situations. Understanding the distinct roles and capabilities of each tool allows administrators to choose the appropriate method for their specific Exadata maintenance requirements, with <code>patchmgr</code> being the standard choice for most patching operations.</p>
<p>The post <a rel="nofollow" href="https://www.bugraparlayan.com.tr/exadata-update-utilities-patchmgr-and-dbnodeupdate-sh.html">Exadata Update Utilities: patchmgr and dbnodeupdate.sh</a> appeared first on <a rel="nofollow" href="https://www.bugraparlayan.com.tr">Bugra Parlayan | Oracle Database &amp; Exadata Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Comprehensive Guide to Oracle Exadata Automatic Hard Disk Scrubbing</title>
		<link>https://www.bugraparlayan.com.tr/comprehensive-guide-to-oracle-exadata-automatic-hard-disk-scrubbing.html</link>
		
		<dc:creator><![CDATA[Bugra Parlayan]]></dc:creator>
		<pubDate>Fri, 25 Apr 2025 16:48:27 +0000</pubDate>
				<category><![CDATA[Engineered Systems]]></category>
		<category><![CDATA[DB_BLOCK_CHECKING Exadata]]></category>
		<category><![CDATA[Exadata cell offload]]></category>
		<category><![CDATA[Exadata data protection]]></category>
		<category><![CDATA[Exadata data validation]]></category>
		<category><![CDATA[Exadata disk scrubbing]]></category>
		<category><![CDATA[Exadata scrubbing]]></category>
		<category><![CDATA[Exadata silent corruption]]></category>
		<category><![CDATA[Oracle HCC scrubbing]]></category>
		<category><![CDATA[smart scan scrubbing]]></category>
		<category><![CDATA[storage level data integrity]]></category>
		<guid isPermaLink="false">https://www.bugraparlayan.com.tr/?p=1455</guid>

					<description><![CDATA[<p>I. Introduction: Overview of the Exadata Hard Disk Scrubbing Process Data integrity is a cornerstone of modern computing systems. Errors that may occur during the storage, reading, transmission, and processing of data can have devastating effects on business processes. Various error detection and correction mechanisms have been developed to mitigate these risks. One such mechanism &#8230;</p>
<p>The post <a rel="nofollow" href="https://www.bugraparlayan.com.tr/comprehensive-guide-to-oracle-exadata-automatic-hard-disk-scrubbing.html">Comprehensive Guide to Oracle Exadata Automatic Hard Disk Scrubbing</a> appeared first on <a rel="nofollow" href="https://www.bugraparlayan.com.tr">Bugra Parlayan | Oracle Database &amp; Exadata Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">I. Introduction: Overview of the Exadata Hard Disk Scrubbing Process</h2>



<p>Data integrity is a cornerstone of modern computing systems. Errors that may occur during the storage, reading, transmission, and processing of data can have devastating effects on business processes. Various error detection and correction mechanisms have been developed to mitigate these risks. One such mechanism is the &#8220;data scrubbing&#8221; process.</p>



<h3 class="wp-block-heading">A. Data Scrubbing: General Concept</h3>



<p>Data scrubbing is an error correction technique that periodically inspects storage devices or main memory for errors and corrects detected errors using redundant data, such as checksums or backup copies of the data.<sup></sup> Its primary purpose is to reduce the likelihood that single, correctable errors will accumulate over time and lead to uncorrectable errors.<sup></sup> This ensures data integrity and minimizes the risk of data loss.<sup></sup> &nbsp;</p>



<p>This technique is a widely used error detection and correction mechanism in memory modules (with ECC memory), RAID arrays, modern file systems like ZFS and Btrfs, and FPGAs.<sup></sup> For example, a RAID controller can periodically read all hard disks in a RAID array to detect and repair bad blocks before applications access them, thereby reducing the probability of silent data corruption caused by bit-level errors.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">B. Exadata Automatic Hard Disk Scrubbing: Definition and Scope</h3>



<p>The Oracle Exadata platform employs a multi-layered approach to ensure data integrity. One of these layers is the <strong>Exadata Automatic Hard Disk Scrub and Repair</strong> feature. As part of the Exadata System Software (Cell Software), this feature automatically and periodically inspects the <strong>hard disk drives (HDDs)</strong> within the Storage Servers (Cells) when the disks are idle.<sup></sup> &nbsp;</p>



<p>The primary goal of this process is to proactively detect and facilitate the repair of bad sectors or other physical/logical defects on the disks <em>before</em> applications attempt to access the affected data.<sup></sup> This prevents &#8220;latent&#8221; or silent data corruption. &nbsp;</p>



<p>The scope of Exadata scrubbing is important. This feature primarily targets <strong>physical</strong> bad sectors on hard disks.<sup></sup> It focuses on detecting physical media errors that might be missed by standard drive Error Correcting Code (ECC) mechanisms or operating system checks.<sup></sup> This complements, but does not replace, higher-level logical consistency checks performed by the database (e.g., via the <code>DB_BLOCK_CHECKING</code> parameter <sup></sup>) or the manually executable ASM disk scrubbing process.<sup></sup> Furthermore, this automatic scrubbing process does not apply to Flash drives in Exadata; these drives are protected by different mechanisms.<sup></sup> &nbsp;</p>



<p>A distinctive aspect of Exadata scrubbing is its proactive nature. While database block checks typically occur during I/O operations <sup></sup>, Exadata scrubbing specifically targets data that has <strong>not been accessed for a long time</strong>, especially when disks are idle.<sup></sup> This approach ensures that corruption in rarely used data is detected and repaired long before it can cause an access error at a critical moment. &nbsp;</p>



<h3 class="wp-block-heading">C. Differences Between Exadata Hard Disk Scrubbing and ASM Disk Scrubbing</h3>



<p>The term &#8220;scrubbing&#8221; can be used in different contexts within the Oracle ecosystem, so it&#8217;s crucial to distinguish Exadata&#8217;s automatic hard disk scrubbing from the disk scrubbing feature offered by Oracle Automatic Storage Management (ASM).<sup></sup> &nbsp;</p>



<ul class="wp-block-list">
<li><strong>Exadata Automatic Hard Disk Scrubbing:</strong>
<ul class="wp-block-list">
<li><strong>Scope:</strong> Operates at the Exadata Storage Server (Cell) level, managed by the Cell Software.  </li>



<li><strong>Focus:</strong> Checks the integrity of <strong>physical</strong> sectors on hard disks.  </li>



<li><strong>Operation:</strong> Runs automatically based on a schedule configured in CellCLI.  </li>



<li><strong>Resource Usage:</strong> The checking process is local to the storage cell, consuming no CPU on database servers and generating no unnecessary network traffic during the check.  </li>



<li><strong>Monitoring:</strong> Monitored via CellCLI metrics and Cell alert logs.  </li>
</ul>
</li>



<li><strong>ASM Disk Scrubbing:</strong>
<ul class="wp-block-list">
<li><strong>Scope:</strong> Operates at the ASM disk group or file level, managed by ASM.  </li>



<li><strong>Focus:</strong> Searches for <strong>logical</strong> corruptions within ASM blocks/extents.  </li>



<li><strong>Operation:</strong> Typically triggered manually (via SQL*Plus or asmcmd) or through a script (e.g., a cron job ).  </li>



<li><strong>Resource Usage:</strong> The process occurs at the ASM layer and can potentially consume database server resources and inter-cell network traffic.</li>



<li><strong>Monitoring:</strong> Monitored via the <code>V$ASM_OPERATION</code> view and ASM alert logs (<code>alert_+ASM.log</code>).  </li>
</ul>
</li>
</ul>



<p>These two mechanisms are complementary. Exadata scrubbing finds physical errors, potentially preventing them from causing logical corruptions later, while ASM scrubbing can find logical inconsistencies that might arise from sources other than physical media errors (e.g., software bugs). Oracle documentation suggests that due to the presence of automatic Exadata scrubbing in Exadata 11.2.3.3 and later, periodic ASM disk scrubbing becomes less critical for the specific purpose of <em>proactive physical/latent error checking</em>.<sup></sup> However, manual ASM scrubbing retains its value for on-demand logical validation of specific files or disk groups. &nbsp;</p>



<h2 class="wp-block-heading">II. Internal Mechanism of the Exadata Scrubbing Process</h2>



<p>The effectiveness of the Exadata Automatic Hard Disk Scrubbing process relies on the tight integration between the core components of the Exadata architecture: the Storage Servers (Cells) and Oracle Automatic Storage Management (ASM).</p>



<h3 class="wp-block-heading">A. Role of Exadata Storage Servers (Cells)</h3>



<p>The scrubbing process is executed by the Exadata System Software (specifically, the Cell Services &#8211; CELLSRV process) running on each Exadata Storage Server (Cell).<sup></sup> The inspection is local to the cell where the scanned disk resides; data is not sent outside the cell during the sector check phase. This minimizes inter-cell network traffic for the inspection stage.<sup></sup> &nbsp;</p>



<p>The Cell Software continuously monitors disk health and I/O utilization to determine when to start, pause, or throttle the scrubbing process.<sup></sup> Typically, scrubbing begins or resumes when the average disk I/O utilization drops below a certain threshold (often cited as 25%).<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">B. Interaction with Oracle ASM for Detection and Repair</h3>



<p>When the Exadata scrubbing process detects a bad sector on a hard disk, the procedure unfolds as follows <sup></sup>: &nbsp;</p>



<ol class="wp-block-list">
<li><strong>Detection:</strong> The Cell Software identifies a physical read error or inconsistency during its periodic scan.</li>



<li><strong>Request Submission:</strong> The Cell Software that detected the faulty sector automatically sends a repair request to the Oracle ASM instance managing the disk group containing that disk.  </li>



<li><strong>Repair by ASM:</strong> Upon receiving the request, ASM orchestrates the repair by reading a healthy copy of the data block (extent) containing the bad sector from another storage server where a mirrored copy resides.  </li>
</ol>



<p>This interaction exemplifies Exadata&#8217;s &#8220;Intelligent Storage&#8221; philosophy; low-level physical error detection happens within the cell, while ASM, which understands the database structure and data placement, coordinates the logical repair.</p>



<h3 class="wp-block-heading">C. Leveraging ASM Mirroring for Data Recovery</h3>



<p>Oracle ASM mirroring (Normal or High Redundancy) is fundamental to Exadata&#8217;s data protection strategy, and the repair capability of the scrubbing process is entirely dependent on this mechanism.<sup></sup> &nbsp;</p>



<p>ASM distributes redundant copies (extents) of data blocks across different failure groups (which in Exadata are typically the Storage Servers).<sup></sup> This ensures data accessibility even if an entire cell becomes unavailable, as data can be accessed from other copies.<sup></sup> &nbsp;</p>



<p>When ASM receives a repair request triggered by scrubbing, it follows these steps:</p>



<ol class="wp-block-list">
<li><strong>Locate Healthy Copy:</strong> ASM identifies a disk on a different storage cell that holds a valid copy of the affected data block. ASM knows which disks are &#8220;partners&#8221; and where mirrored copies are stored.  </li>



<li><strong>Read Data:</strong> ASM reads the correct data from the disk containing the healthy copy.</li>



<li><strong>Write Over Bad Sector:</strong> ASM uses the correct data read to overwrite the bad sector on the original disk, thus correcting the error.  </li>
</ol>



<p>The success of this repair mechanism hinges entirely on the existence of valid and accessible ASM mirrors. If a second disk failure occurs in a Normal Redundancy (2 copies) disk group before a rebalance completes, or if all three copies become inaccessible simultaneously in a High Redundancy (3 copies) group, scrubbing can <em>detect</em> the error, but ASM <em>cannot repair</em> it.<sup></sup> This underscores why <strong>High Redundancy</strong> is strongly recommended for critical systems <sup></sup>, as the extra copy significantly reduces the probability of losing all copies concurrently. &nbsp;</p>



<p>Furthermore, the scrubbing process not only repairs isolated bad sectors but can also serve as an early indicator of more severe disk problems. If numerous or persistent errors are detected during scrubbing, it can lead ASM to take the corresponding grid disk offline and initiate a rebalance operation to redistribute data onto the remaining healthy disks.<sup></sup> In this context, scrubbing also acts as an early warning system that triggers ASM&#8217;s existing high availability (HA) mechanisms. Monitoring the <code>V$ASM_OPERATION</code> view during or after scrub periods is important for tracking such ASM recovery actions.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">D. Types of Errors Detected</h3>



<p>Exadata Automatic Hard Disk Scrubbing primarily focuses on detecting <strong>physical bad sectors</strong> and <strong>latent media errors</strong> on hard disk drives that might not be caught by standard drive ECC or operating system checks.<sup></sup> Damaged or worn-out sectors or other physical defects fall under this scope.<sup></sup> &nbsp;</p>



<p>The &#8220;logical defects&#8221; mentioned <sup></sup> typically refer to low-level media inconsistencies rather than logical corruptions at the ASM or database level (which is the domain of ASM scrubbing <sup></sup>). The main goal is to find such issues before they impact data access or lead to silent data corruption.<sup></sup> &nbsp;</p>



<h2 class="wp-block-heading">III. Managing and Monitoring the Exadata Scrubbing Process</h2>



<p>Effectively utilizing the Exadata Automatic Hard Disk Scrubbing feature requires proper configuration and continuous monitoring. The primary tool for these tasks is the CellCLI (Cell Command Line Interface) utility.</p>



<h3 class="wp-block-heading">A. CellCLI Commands for Configuration</h3>



<p>CellCLI is the main command-line interface for managing Exadata storage server features.<sup></sup> Scrubbing-related configuration is done using the <code>ALTER CELL</code> command and specific attributes <sup></sup>: &nbsp;</p>



<ul class="wp-block-list">
<li><strong><code>hardDiskScrubInterval</code></strong>: Determines how often the automatic scrubbing process runs. Valid options are:
<ul class="wp-block-list">
<li><code>daily</code>: Every day</li>



<li><code>weekly</code>: Every week</li>



<li><code>biweekly</code>: Every two weeks (default)</li>



<li><code>none</code>: Disables automatic scrubbing and stops any running process.</li>



<li><em>Example:</em> To set weekly scrubbing: <code>CellCLI> ALTER CELL hardDiskScrubInterval=weekly</code>.  </li>
</ul>
</li>



<li><strong><code>hardDiskScrubStartTime</code></strong>: Sets when the next scheduled scrubbing process will start. Valid options are:
<ul class="wp-block-list">
<li>A specific date and time (e.g., in &#8216;YYYY-MM-DDTHH:MI:SS-TZ&#8217; format).</li>



<li><code>now</code>: Triggers the next scrubbing cycle to start immediately (after the current cycle finishes, or for the first run).</li>



<li><em>Example:</em> To start at a specific time: <code>CellCLI> ALTER CELL hardDiskScrubStartTime='2024-10-26T02:00:00-07:00'</code>.  </li>
</ul>
</li>
</ul>



<p>To view the current scrubbing settings, use the command: <code>CellCLI&gt; LIST CELL ATTRIBUTES hardDiskScrubInterval, hardDiskScrubStartTime</code></p>



<p>Note that configuration is done on a per-cell basis, meaning these settings apply to all hard disks within a specific storage server. However, the &#8220;Adaptive Scrubbing Schedule&#8221; feature <sup></sup> can automatically adjust the <em>effective</em> run frequency for specific disks identified as problematic, although the base schedule is configured cell-wide. &nbsp;</p>



<h3 class="wp-block-heading">B. Monitoring Scrubbing Activity</h3>



<p>Several methods are available to understand the status and impact of the scrubbing process:</p>



<ul class="wp-block-list">
<li><strong>CellCLI Metrics:</strong>
<ul class="wp-block-list">
<li>The most direct way to see real-time scrubbing activity is using the <code>LIST METRICCURRENT</code> command. Specifically, the <code>CD_IO_BY_R_SCRUB_SEC</code> metric shows the read I/O generated by scrubbing in MB/second for each hard disk (CD). Non-zero values indicate active scrubbing on that disk.  </li>



<li><em>Example Command:</em> <code>CellCLI> LIST METRICCURRENT WHERE name = 'CD_IO_BY_R_SCRUB_SEC'</code></li>



<li>Other related metrics (discoverable with <code>LIST METRICDEFINITION WHERE name like '%SCRUB%'</code>) might provide additional information about scrubbing wait times or resource usage.</li>
</ul>
</li>



<li><strong>Cell Alert Logs:</strong>
<ul class="wp-block-list">
<li>Informational messages indicating the start (<code>Begin scrubbing celldisk</code>) and finish (<code>Finished scrubbing celldisk</code>) of scrubbing operations are logged in the cell alert logs. These logs can be examined using ADRCI (Automatic Diagnostic Repository Command Interpreter) or directly from files under the <code>$CELLTRACE</code> directory. Messages related to errors encountered during scrubbing or disk issues will also appear in these logs.  </li>



<li><em>Example Command:</em> <code>CellCLI> LIST ALERTHISTORY WHERE message LIKE '%scrubbing%'</code></li>
</ul>
</li>



<li><strong>AWR Reports (Automatic Workload Repository):</strong>
<ul class="wp-block-list">
<li>AWR reports, particularly in their Exadata-specific sections, provide aggregated information about scrubbing I/O activity that occurred during a specific snapshot period. Look for metrics labeled &#8216;scrub I/O&#8217; in the report.  </li>



<li>Seeing high &#8216;scrub I/O&#8217; in AWR during periods of low application I/O is normal and expected. However, understanding whether high scrub I/O correlates with performance degradation requires analyzing the overall system load, IORM configuration, and other sections in AWR like &#8216;Exadata OS I/O Stats&#8217;. AWR provides historical context for evaluating impact over time, while CellCLI metrics offer a real-time view.  </li>
</ul>
</li>



<li><strong>Real-Time Insight:</strong>
<ul class="wp-block-list">
<li>If configured, scrubbing metrics like <code>CD_IO_BY_R_SCRUB_SEC</code> can be sent to a preferred dashboard for visual monitoring of scrubbing activity across all Exadata cells.  </li>
</ul>
</li>



<li><strong>ASM Views:</strong>
<ul class="wp-block-list">
<li>While Exadata scrubbing doesn&#8217;t directly log to <code>V$ASM_OPERATION</code>, if scrubbing triggers an ASM repair or a subsequent rebalance, those operations <em>can</em> be monitored in <code>V$ASM_OPERATION</code>. The <code>V$ASM_DISK_STAT</code> view might also reflect I/O patterns related to scrubbing or repair.  </li>
</ul>
</li>
</ul>



<h3 class="wp-block-heading">C. Starting, Stopping, and Checking Status</h3>



<ul class="wp-block-list">
<li><strong>Starting:</strong> Scrubbing starts automatically based on the <code>hardDiskScrubInterval</code> and <code>hardDiskScrubStartTime</code> settings. The <code>hardDiskScrubStartTime=now</code> setting can be used to trigger the next cycle immediately. There isn&#8217;t a direct command like &#8220;start scrubbing now.&#8221;  </li>



<li><strong>Stopping:</strong> To stop and disable automatic scrubbing, use the <code>hardDiskScrubInterval=none</code> command. This will also stop any currently running scrubbing process.  </li>



<li><strong>Status Check:</strong> There is no single &#8220;scrubbing status&#8221; command. The status is inferred through the monitoring methods described above (CellCLI metrics, logs, AWR) by looking at active I/O rates and log messages.</li>
</ul>



<h3 class="wp-block-heading">D. Table 1: Essential CellCLI Commands for Exadata Hard Disk Scrubbing</h3>



<p>The following table summarizes the key CellCLI commands used to manage and monitor the Exadata hard disk scrubbing process:</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><th>Command</th><th>Purpose</th><th>Example</th><th>Sources</th></tr><tr><td>`ALTER CELL hardDiskScrubInterval = [daily\</td><td>weekly\</td><td>biweekly\</td><td></td></tr><tr><td>`ALTER CELL hardDiskScrubStartTime = [&#8216;&lt;timestamp&gt;&#8217;\</td><td>now]`</td><td>Sets the start time for the next scheduled scrubbing operation.</td><td><code>ALTER CELL hardDiskScrubStartTime=now</code></td></tr><tr><td><code>LIST CELL ATTRIBUTES hardDiskScrubInterval, hardDiskScrubStartTime</code></td><td>Displays the current scrubbing schedule configuration.</td><td><code>LIST CELL ATTRIBUTES hardDiskScrubInterval, hardDiskScrubStartTime</code></td><td></td></tr><tr><td><code>LIST METRICCURRENT WHERE name = 'CD_IO_BY_R_SCRUB_SEC'</code></td><td>Monitors the real-time scrubbing I/O rate for each hard disk.</td><td><code>LIST METRICCURRENT WHERE name = 'CD_IO_BY_R_SCRUB_SEC'</code></td><td></td></tr><tr><td><code>LIST ALERTHISTORY WHERE message LIKE '%scrubbing%'</code></td><td>Checks logs for scrubbing start/finish/error messages.</td><td><code>LIST ALERTHISTORY WHERE message LIKE '%scrubbing%'</code></td><td><sup></sup></td></tr></tbody></table></figure>



<h2 class="wp-block-heading">IV. Performance Impacts of the Scrubbing Process</h2>



<p>While designed to proactively protect data integrity, Exadata Automatic Hard Disk Scrubbing does have an impact on system resources, particularly the I/O subsystem. Understanding and managing this impact is crucial.</p>



<h3 class="wp-block-heading">A. Resource Consumption (CPU, I/O)</h3>



<p>The primary resource consumed by the scrubbing process is <strong>Disk I/O</strong>.<sup></sup> The operation involves reading sectors from the hard disks. On an otherwise idle system or disk, the scrubbing process can significantly increase disk utilization, potentially reaching close to 100% for the disk being scanned.<sup></sup> &nbsp;</p>



<p><strong>CPU consumption</strong> on the storage server (Cell) for the scrubbing check itself is generally low, as it&#8217;s largely an I/O-bound operation. However, if scrubbing detects an error and triggers a repair via ASM, that repair process (reading the good copy and writing it to the bad location) can consume additional resources (CPU and network) across cells and potentially database nodes, although the Exadata architecture aims to minimize this impact.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">B. Designed Operating Window (Low I/O Utilization)</h3>



<p>A key design principle to minimize the performance impact of Exadata scrubbing is that the process only runs when the storage server detects low average I/O utilization.<sup></sup> This threshold is commonly cited as 25%.<sup></sup> &nbsp;</p>



<p>The system automatically pauses or throttles scrubbing activity when I/O demand from the database workload exceeds this threshold.<sup></sup> This mechanism aims to prevent scrubbing from significantly impacting production workloads. &nbsp;</p>



<p>However, there&#8217;s a nuance to the &#8220;25% utilization&#8221; threshold. It may not mean absolute idleness. There could be a persistent background I/O load running just below this threshold (e.g., 20-24%). Adding the scrubbing I/O on top of this existing load will increase the total I/O. While Exadata I/O Resource Management (IORM) prioritizes user I/O <sup></sup>, even the minimal added load from scrubbing could potentially have a noticeable effect, especially for applications highly sensitive to very low latency. Therefore, while &#8220;low impact&#8221; is the goal, &#8220;zero impact&#8221; is not guaranteed. &nbsp;</p>



<h3 class="wp-block-heading">C. Interaction with I/O Resource Management (IORM)</h3>



<p>Exadata I/O Resource Management (IORM) plays a critical role in managing the performance impact of background tasks like scrubbing.<sup></sup> IORM prioritizes and schedules I/O requests within the storage server based on configured resource plans.<sup></sup> &nbsp;</p>



<p>IORM automatically prioritizes database workload I/O (e.g., user queries, OLTP transactions) over background I/O processes like scrubbing.<sup></sup> This ensures minimal impact on application performance from scrubbing activity. IORM plans can be configured to manage resources among different databases or workloads, indirectly affecting the amount of resources available for background tasks like scrubbing.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">D. Potential Performance Impact and Mitigation Methods</h3>



<p>Despite being designed for low impact, it should be acknowledged that scrubbing can cause spikes in disk utilization and potentially increase latency, especially in situations where the system isn&#8217;t completely idle even when the &#8220;idle&#8221; threshold is met.<sup></sup> The concern about performance impact, though often associated with general ASM scrubbing, can also apply to Exadata scrubbing.<sup></sup> &nbsp;</p>



<p>To mitigate this potential impact, consider these strategies:</p>



<ul class="wp-block-list">
<li><strong>Scheduling:</strong> The most effective mitigation is to schedule the scrubbing process using <code>hardDiskScrubStartTime</code> and <code>hardDiskScrubInterval</code> during periods of genuinely low system activity (e.g., midnight, weekends).  </li>



<li><strong>Monitoring:</strong> Regularly assess when scrubbing runs and its actual impact in your specific environment using AWR  and CellCLI metrics.  </li>



<li><strong>IORM Settings:</strong> Ensure IORM is configured appropriately for your workload priorities.  </li>



<li><strong>Adaptive Scheduling:</strong> Leverage Exadata&#8217;s adaptive scheduling feature. This automatically adjusts the frequency based on need, potentially reducing unnecessary runs on healthy disks.  </li>
</ul>



<h3 class="wp-block-heading">E. Factors Affecting Scrubbing Duration</h3>



<p>The time required to complete a scrubbing cycle depends on several factors:</p>



<ul class="wp-block-list">
<li><strong>Disk Size and Type:</strong> Larger capacity hard disks naturally take longer to scan. Estimates like 8-12 hours for a 4TB disk  or 1-2 hours per terabyte when idle  have been mentioned. Modern High Capacity (HC) drives are much larger (18TB in X9M , 22TB in X10M ), implying potentially much longer scrub times.  </li>



<li><strong>System Load:</strong> Since scrubbing pauses when user workload increases , the busier the system, the longer the <strong>total wall-clock time</strong> required to complete a scrub cycle. On a busy system, completing a cycle could take days.  </li>



<li><strong>Number of Errors Found:</strong> If many bad sectors are found, the time spent coordinating repairs with ASM can increase the total duration.  </li>



<li><strong>ASM Rebalance Activity:</strong> If scrubbing triggers a larger ASM rebalance operation, that separate process will consume its own resources and take time.  </li>



<li><strong>Configured Interval:</strong> While not affecting a single run&#8217;s duration, the interval determines how frequently the process starts.</li>
</ul>



<p>It&#8217;s noteworthy that duration estimates in documentation (S2 vs S9) vary significantly. This highlights that estimates heavily depend on the Exadata generation (disk sizes/speeds), software version (potential efficiency improvements), and most importantly, the actual workload pattern and resulting &#8220;idle&#8221; time on the specific system. Relying on monitoring in your own environment is more accurate than general estimates. For instance, one observation noted a scrubbing rate of approximately 115MB/s per disk.<sup></sup> At this rate, <em>continuously</em> scanning a 22TB disk (X10M <sup></sup>) would take roughly 54 hours. Given that scrubbing runs intermittently based on load <sup></sup>, the actual completion time could be considerably longer. &nbsp;</p>



<h2 class="wp-block-heading">V. Key Benefits of the Exadata Scrubbing Process</h2>



<p>Exadata Automatic Hard Disk Scrubbing is a valuable feature that significantly contributes to the data integrity and high availability capabilities of the Exadata platform.</p>



<h3 class="wp-block-heading">A. Proactive Detection of Latent Errors and Silent Data Corruption</h3>



<p>Its most fundamental benefit is the proactive discovery of physical media errors <em>before</em> they are encountered during normal database operations.<sup></sup> This prevents &#8220;silent&#8221; data corruption, where errors occur on disk but remain undetected until the data is read (which could be much later).<sup></sup> By checking data blocks that haven&#8217;t been accessed recently <sup></sup>, it ensures such hidden threats are uncovered. &nbsp;</p>



<h3 class="wp-block-heading">B. Enhanced Data Integrity and Reliability</h3>



<p>By detecting physical errors and enabling their repair, the scrubbing process directly contributes to the overall data integrity and reliability of the Exadata platform.<sup></sup> This feature complements other protection layers like Oracle HARD (Hardware Assisted Resilient Data) checks <sup></sup>, ASM mirroring <sup></sup>, and database-level checks <sup></sup>, providing robust defense against data corruption. &nbsp;</p>



<h3 class="wp-block-heading">C. Automatic Repair Mechanism</h3>



<p>A significant advantage is that the feature automates not just detection but also the initiation of the repair process. In typical bad sector scenarios, both error detection <em>and</em> the triggering of repair via ASM happen automatically, requiring no manual intervention.<sup></sup> This reduces administrative overhead and ensures timely correction of detected issues. &nbsp;</p>



<h3 class="wp-block-heading">D. Complements Other Exadata High Availability Features</h3>



<p>Scrubbing is part of Exadata&#8217;s comprehensive Maximum Availability Architecture (MAA) strategy.<sup></sup> It works alongside features like redundant hardware components <sup></sup>, Oracle RAC for instance continuity <sup></sup>, ASM for storage virtualization and redundancy <sup></sup>, HARD for I/O path validation <sup></sup>, and potentially Data Guard for disaster recovery.<sup></sup> &nbsp;</p>



<p>This reinforces Exadata&#8217;s &#8220;defense in depth&#8221; approach to data protection. HARD checks the I/O path during writes <sup></sup>; database checks can verify logical structure <sup></sup>; ASM provides redundant copies of data <sup></sup>; and scrubbing proactively inspects the physical media at rest.<sup></sup> No single feature covers all possible scenarios, but working together, they provide robust protection. Scrubbing forms a critical layer in this strategy, specifically targeting latent physical errors that might be missed by other mechanisms. &nbsp;</p>



<h2 class="wp-block-heading">VI. Evolution of the Scrubbing Feature Across Exadata Versions</h2>



<p>The Exadata Automatic Hard Disk Scrubbing feature has evolved along with the platform itself.</p>



<h3 class="wp-block-heading">A. Feature Introduction</h3>



<p>The Automatic Hard Disk Scrub and Repair feature was first introduced with <strong>Oracle Exadata System Software version 11.2.3.3.0</strong>.<sup></sup> At that time, specific minimum database/Grid Infrastructure versions like 11.2.0.4 or 12.1.0.2 were required for the feature to function.<sup></sup> &nbsp;</p>



<h3 class="wp-block-heading">B. Adaptive Scrubbing Schedule</h3>



<p>A significant enhancement arrived with <strong>Exadata System Software version 12.1.2.3.0</strong>: the Adaptive Scrubbing Schedule.<sup></sup> With this feature, if the scrubbing process finds a bad sector on a disk, the Cell Software automatically schedules the <em>next</em> scrubbing job for <em>that specific disk</em> to run more frequently (typically weekly).<sup></sup> This temporarily overrides the cell-wide <code>hardDiskScrubInterval</code> setting for that disk. If the subsequent, more frequent run finds no errors, the disk&#8217;s schedule reverts to the global <code>hardDiskScrubInterval</code> setting.<sup></sup> This feature also requires specific minimum Grid Infrastructure versions to operate.<sup></sup> &nbsp;</p>



<p>This adaptive approach makes scrubbing more efficient. Instead of frequently scanning all disks, it focuses more attention only on disks showing potential issues. This conserves I/O resources on healthy disks while providing quicker follow-up checks on suspect ones.</p>



<h3 class="wp-block-heading">C. Other Related Developments (Post-12.1.2.3.0)</h3>



<p>Available documentation primarily focuses on the introduction of the scrubbing feature and the adaptive scheduling enhancement. Detailed information about significant changes to algorithms, performance tuning (beyond IORM interaction), or reporting in later versions (e.g., post-12.x, 18.x, 19.x, 20.x, 21.x, 22.x, 23.x <sup></sup>) is not provided in the reviewed sources.<sup></sup> Consulting the release notes for specific Exadata System Software versions might be necessary for details on newer developments. &nbsp;</p>



<h3 class="wp-block-heading">D. Table 2: Evolution of Key Exadata Scrubbing Features</h3>



<p>The following table summarizes the key milestones in the development of the Exadata scrubbing feature:</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><th>Exadata Software Version</th><th>Key Feature/Enhancement</th><th>Description</th><th>Sources</th></tr><tr><td>11.2.3.3.0</td><td>Automatic Hard Disk Scrub and Repair (Introduction)</td><td>Introduced the core feature for automatic, periodic inspection and initiation of repair via ASM.</td><td></td></tr><tr><td>12.1.2.3.0</td><td>Adaptive Scrubbing Schedule</td><td>Automatically increases scrubbing frequency (e.g., to weekly) for disks where bad sectors were recently detected.</td><td><sup></sup></td></tr><tr><td>Post-12.1.2.3.0</td><td>(Other Enhancements Unspecified)</td><td>(Specific major enhancements for later versions are not detailed in the provided documentation)</td><td></td></tr></tbody></table></figure>



<h2 class="wp-block-heading">VII. Configuration and Best Practices</h2>



<p>To maximize the benefits of the Exadata Automatic Hard Disk Scrubbing feature, proper configuration and adherence to Oracle&#8217;s Maximum Availability Architecture (MAA) principles are important.</p>



<h3 class="wp-block-heading">A. Default Settings and Configuration Options</h3>



<ul class="wp-block-list">
<li><strong>Default Schedule:</strong> By default, the scrubbing process is configured to run <strong>every two weeks (<code>biweekly</code>)</strong>.  </li>



<li><strong>Configuration Options:</strong> The <code>hardDiskScrubInterval</code> (<code>daily</code>, <code>weekly</code>, <code>biweekly</code>, <code>none</code>) and <code>hardDiskScrubStartTime</code> (<code>&lt;timestamp></code>, <code>now</code>) attributes can be set via CellCLI.  </li>



<li><strong>No Intensity/Priority Setting:</strong> There is no direct CellCLI setting to control the &#8220;intensity&#8221; or &#8220;priority&#8221; of the scrubbing process itself. Its impact is primarily managed by the idle-time logic and IORM.  </li>
</ul>



<h3 class="wp-block-heading">B. Recommended Scheduling Strategies for Production Environments</h3>



<ul class="wp-block-list">
<li><strong>Use Defaults:</strong> For many environments, the default bi-weekly schedule and the automatic execution during low I/O periods are sufficient.  </li>



<li><strong>Customize Start Time:</strong> Rather than relying solely on <code>now</code> or random times, explicitly setting <code>hardDiskScrubStartTime</code> to known low-load periods (e.g., 2 AM Sunday morning) offers a more controlled approach.  </li>



<li><strong>Assess Workload:</strong> On very busy, 24/7 systems, evaluate if the <code>biweekly</code> interval allows enough time for the process to complete. If not, consider <code>weekly</code>, but closely monitor the performance impact. Disabling scrubbing (<code>none</code>) is generally not recommended unless there&#8217;s a specific, temporary reason, as it forfeits the proactive detection benefit.  </li>



<li><strong>Align with Maintenance Windows:</strong> Coordinate scrubbing schedules with other planned maintenance windows if possible, although the automatic throttling mechanism should prevent major conflicts.  </li>



<li><strong>Monitor Completion:</strong> Check logs to ensure scrubbing cycles complete successfully within the planned interval. If cycles consistently fail to complete due to high load, the scheduling strategy needs review.  </li>
</ul>



<h3 class="wp-block-heading">C. Importance of ASM Redundancy</h3>



<ul class="wp-block-list">
<li><strong>High Redundancy Recommendation:</strong> Using <strong>High Redundancy (3 copies)</strong> for ASM disk groups on Exadata is strongly recommended, especially for production databases.  </li>



<li><strong>Rationale:</strong> While scrubbing works with Normal Redundancy (2 copies), High Redundancy provides significantly better protection against data loss during the repair window (especially if an unrelated second failure occurs). Scrubbing&#8217;s repair capability depends on having a healthy mirror copy available.  </li>



<li><strong>Requirements:</strong> Properly implementing High Redundancy typically requires at least 5 failure groups (often 3 storage cells + 2 quorum disks on database servers for Quarter/Eighth Rack configurations).  </li>
</ul>



<h3 class="wp-block-heading">D. Integration with Overall MAA Strategy</h3>



<p>Scrubbing is just one part of the MAA best practices recommended by Oracle for Exadata <sup></sup>: &nbsp;</p>



<ul class="wp-block-list">
<li><strong>Regular Health Checks:</strong> Run the <code>exachk</code> utility regularly (e.g., monthly) or rely on AHF (Autonomous Health Framework) to run it automatically to validate configuration against best practices, including storage and ASM settings.  </li>



<li><strong>Use Standby Database:</strong> While Exadata scrubbing and HARD checks protect against many issues, a physical standby database (Data Guard) on a separate Exadata system is critical for comprehensive protection against site failures, certain logical corruptions, and as a secondary validation source.  </li>



<li><strong>Monitoring:</strong> Implement comprehensive monitoring (OEM, AWR, CellCLI metrics, logs, Real-Time Insight) to track system health, performance, and background activities like scrubbing.  </li>



<li><strong>Testing:</strong> Validate recovery procedures and understand the behavior of features like scrubbing and ASM rebalance in your test environment.  </li>
</ul>



<h3 class="wp-block-heading">E. Table 3: Exadata Scrubbing Configuration Attributes and Best Practices</h3>



<p>This table consolidates key configuration parameters and actionable recommendations:</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><th>Parameter/Area</th><th>Configuration/Setting</th><th>Default</th><th>Recommendation</th><th>Sources</th></tr><tr><td><code>hardDiskScrubInterval</code></td><td><code>daily</code>, <code>weekly</code>, <code>biweekly</code>, <code>none</code></td><td><code>biweekly</code></td><td>Start with default. Consider <code>weekly</code> for busy systems if needed, monitoring impact. Avoid <code>none</code>.</td><td></td></tr><tr><td><code>hardDiskScrubStartTime</code></td><td><code>&lt;timestamp&gt;</code>, <code>now</code></td><td>None</td><td>Explicitly set to a known low-load window (e.g., weekend night).</td><td></td></tr><tr><td>ASM Redundancy</td><td>Normal (2 copies), High (3 copies)</td><td>Normal</td><td>Use <strong>High Redundancy</strong> for production disk groups to maximize repair success probability.</td><td></td></tr><tr><td>Monitoring</td><td>CellCLI Metrics, Cell Logs, AWR, ASM Views, <code>exachk</code></td><td>None</td><td>Regularly monitor scrubbing activity, completion status, performance impact, and overall system health (<code>exachk</code>).</td><td><sup></sup></td></tr><tr><td>Scheduling Strategy</td><td>Workload-dependent</td><td>Idle-based</td><td>Schedule during predictably low-load times; ensure cycles complete.</td><td><sup></sup></td></tr><tr><td>MAA Integration</td><td>Part of overall HA</td><td>None</td><td>Integrate with Data Guard, regular health checks, and robust monitoring per MAA guidelines.</td><td><sup></sup></td></tr></tbody></table></figure>



<h2 class="wp-block-heading">VIII. Conclusion</h2>



<p>Oracle Exadata Automatic Hard Disk Scrub and Repair is a proactive defense mechanism crucial for maintaining data integrity and high availability on the Exadata platform. By periodically scanning hard disks on storage servers for physical errors, this feature detects latent corruptions, especially in infrequently accessed data, before they can impact applications.</p>



<p>The core strength of the scrubbing process lies in the integration between Exadata System Software and Oracle ASM. While the Cell Software detects the error, ASM manages the automatic repair process using mirrored copies. The effectiveness of this repair capability is directly tied to the correctly configured redundancy of ASM disk groups, particularly High Redundancy, which is strongly recommended for production environments.</p>



<p>From a performance perspective, the scrubbing process is designed to run during periods of low I/O utilization detected by the system and is managed by IORM. This aims to minimize the impact on production workloads. However, it remains important for administrators to monitor scrubbing activity via CellCLI metrics, alert logs, and AWR reports, and potentially adjust the schedule based on their environment&#8217;s specific workload patterns.</p>



<p>Introduced in Exadata 11.2.3.3.0 and enhanced with Adaptive Scheduling in 12.1.2.3.0, this feature is an integral part of Exadata&#8217;s multi-layered data protection strategy (including HARD checks, ASM mirroring, RAC, Data Guard, etc.). Properly configuring and operating Exadata Automatic Hard Disk Scrubbing is critical for preserving data integrity, preventing unexpected outages, and maximizing the value of the Exadata investment. For best results, scrubbing configuration and operation should be considered within the framework of Oracle MAA best practices, supported by regular system health checks (<code>exachk</code>) and comprehensive monitoring.</p>
<p>The post <a rel="nofollow" href="https://www.bugraparlayan.com.tr/comprehensive-guide-to-oracle-exadata-automatic-hard-disk-scrubbing.html">Comprehensive Guide to Oracle Exadata Automatic Hard Disk Scrubbing</a> appeared first on <a rel="nofollow" href="https://www.bugraparlayan.com.tr">Bugra Parlayan | Oracle Database &amp; Exadata Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
