<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Soni Sharma  on Medium]]></title>
        <description><![CDATA[Stories by Soni Sharma  on Medium]]></description>
        <link>https://medium.com/@sonisharmadataops?source=rss-fc3fd6b55ed5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*YnZ5qDrbQPBxATa8</url>
            <title>Stories by Soni Sharma  on Medium</title>
            <link>https://medium.com/@sonisharmadataops?source=rss-fc3fd6b55ed5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 05:12:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sonisharmadataops/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[One DBA community can change your career!]]></title>
            <link>https://medium.com/@sonisharmadataops/one-dba-community-can-change-your-career-92e0c0878b6f?source=rss-fc3fd6b55ed5------2</link>
            <guid isPermaLink="false">https://medium.com/p/92e0c0878b6f</guid>
            <category><![CDATA[dba]]></category>
            <category><![CDATA[community-database]]></category>
            <dc:creator><![CDATA[Soni Sharma ]]></dc:creator>
            <pubDate>Sun, 18 Oct 2026 09:34:16 GMT</pubDate>
            <atom:updated>2026-10-18T09:34:16.453Z</atom:updated>
            <content:encoded><![CDATA[<p>One DBA community can change your career!</p><p>This community has truly changed my life, and I’m grateful to be part of it.</p><p>Whether it’s technical guidance or something new you want to learn, you can ask questions anytime. The members are proactive and always willing to share their knowledge and help you grow.</p><p>Join us to learn, connect, share job opportunities, and grow together!</p><p>🔗 Join our DBA WhatsApp Community:</p><p>https://chat.whatsapp.com/LoEzz7QCMcI0sZHAcwkoIn</p><p>Let’s grow together, one connection at a time! 💻</p><p>#DBA #DatabaseCommunity #CareerGrowth #Networking</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92e0c0878b6f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Incident Management: When Technical Decisions, Management Pressure, and Database Governance Collide]]></title>
            <link>https://medium.com/@sonisharmadataops/incident-management-when-technical-decisions-management-pressure-and-database-governance-collide-79dce56de9c4?source=rss-fc3fd6b55ed5------2</link>
            <guid isPermaLink="false">https://medium.com/p/79dce56de9c4</guid>
            <dc:creator><![CDATA[Soni Sharma ]]></dc:creator>
            <pubDate>Sun, 18 Oct 2026 06:05:45 GMT</pubDate>
            <atom:updated>2026-10-18T06:05:45.474Z</atom:updated>
            <content:encoded><![CDATA[<p>In database operations, some of the most challenging incidents are not caused by a database failure, a poorly written query, or a missing index.</p><p>They happen when technical decisions, business urgency, unclear ownership, and communication gaps collide.</p><p>As a Database Administrator (DBA), I have come to understand that incident management is not just about resolving technical issues. It is also about managing risk, setting boundaries, communicating clearly, and making decisions that protect the business.</p><p>The Conflict: DBA vs. Development</p><p>One of the most common challenges in IT organizations is the difference in priorities between development teams and database teams.</p><p>Development teams prioritize delivery. They want faster access, quicker deployments, realistic test data, and fewer blockers.</p><p>DBA teams prioritize stability, security, integrity, and recoverability. They must ensure that database changes do not compromise production systems, customer data, availability, or compliance requirements.</p><p>Neither perspective is inherently wrong.</p><p>The conflict begins when delivery pressure overrides established controls, responsibilities become unclear, or database access is treated as a convenience rather than a governed privilege.</p><p>Developers may need database access to troubleshoot issues and validate application behavior. However, that does not automatically mean unrestricted access to production databases or customer information is appropriate.</p><p>Similarly, DBAs should not become bottlenecks simply because they control database access.</p><p>The objective should be controlled collaboration, not a battle for ownership.</p><p>Why DBAs Often Carry the Responsibility</p><p>A database is more than a place where application data is stored. It is a critical business asset.</p><p>A single incorrect command can:</p><ul><li>Delete or modify business-critical records.</li><li>* Expose sensitive customer information.</li><li>* Disrupt application availability.</li><li>* Compromise backup and recovery objectives.</li><li>* Create audit, regulatory, and contractual risks.</li></ul><p>When an incident occurs, the questions are rarely limited to who executed the command.</p><p>Leadership must also ask:</p><ul><li>Was the requirement clearly defined?</li><li>* Was the scope documented?</li><li>* Were the appropriate approvals obtained?</li><li>* Did the person executing the activity understand its impact?</li><li>* Were access controls and safeguards adequate?</li><li>* Was the activity validated and documented afterward?</li></ul><p>Accountability should follow both responsibility and authority. A DBA cannot reasonably be expected to guarantee safe database operations if the organization bypasses its controls, leaves approval responsibilities ambiguous, or grants excessive privileges without governance.</p><p>At the same time, DBAs must take ownership of their processes, communicate risks early, and ensure that technical safeguards are effective.</p><p>Incident Management Is More Than Fixing the Problem</p><p>A mature incident management process has several stages:</p><ol><li>Contain the risk.</li><li>Stop the activity if necessary, protect affected systems, and prevent further impact.</li></ol><p>2. Establish the facts.</p><p>Review logs, timestamps, commands, access records, approvals, and the actual state of the database. Avoid assumptions and blame.</p><p>3. Recover and validate.</p><p>Restore the intended system state using an approved recovery or remediation plan. Validate data integrity and application functionality.</p><p>4. Preserve evidence.</p><p>Maintain execution logs, audit records, change tickets, and relevant communications. Do not alter or discard evidence to make the incident appear resolved.</p><p>5. Communicate transparently.</p><p>Inform the appropriate stakeholders about what happened, what is confirmed, what remains uncertain, and what actions are pending.</p><p>6. Prevent recurrence.</p><p>Conduct a blameless post-incident review, identify control failures, assign corrective actions, and track them to completion.</p><p>An incident is not truly resolved simply because the database is running again. The organization must also understand why the incident happened and reduce the likelihood of it happening again.</p><p>The Role of Management</p><p>Management sometimes faces pressure to deliver a demonstration, meet a deadline, or satisfy a client requirement. Under these circumstances, technical safeguards can appear to slow progress.</p><p>However, effective leadership does not ask teams to choose between delivery and governance.</p><p>It establishes a framework in which both are achievable.</p><p>That means defining ownership, requiring documented approvals for high-risk activities, supporting least-privilege access, and ensuring that technical teams have the authority and resources needed to enforce agreed controls.</p><p>When a DBA raises a legitimate risk, the discussion should focus on the risk, available alternatives, and the decision-making process – not on whether the DBA is being cooperative.</p><p>Equally, DBAs must explain risks in business terms rather than relying exclusively on technical jargon.</p><p>For example, instead of saying, “We cannot perform this operation,” a stronger response is:</p><p>“This operation could expose customer data. We can meet the requirement using synthetic data or an approved, controlled dataset, with the necessary authorization and validation.”</p><p>That is how technical expertise becomes a business solution.</p><p>Building a Better Working Relationship</p><p>The solution is not to give DBAs absolute control or to give developers unrestricted access.</p><p>It is to establish clear, enforceable boundaries.</p><ul><li>Role-based access control: Grant only the permissions required for each role.</li><li>* Separation of duties: Separate request, approval, execution, and validation responsibilities for high-risk activities where practical.</li><li>* Written approvals: Document the purpose, scope, environment, data classification, and authorization before sensitive operations.</li><li>* Safe test environments: Use synthetic or appropriately anonymized data wherever possible.</li><li>* Change management: Require impact assessment, rollback planning, and post-change validation.</li><li>* Auditable execution: Preserve logs and evidence for review.</li><li>* Shared ownership: Make development, DBA, security, and management jointly responsible for following the agreed process.</li></ul><p>These controls should be proportionate to the risk. Routine development work should remain efficient, while activities involving production systems, sensitive data, or destructive changes should receive stronger safeguards.</p><p>My Key Takeaway</p><p>A good DBA is not someone who says “no” to every request.</p><p>A good DBA understands the business requirement, evaluates the risk, proposes safer alternatives, and ensures that critical database operations are performed with the right controls.</p><p>Likewise, a good development team understands that database access is not merely a technical convenience. It carries responsibility for the confidentiality, integrity, and availability of business data.</p><p>And good management creates an environment where raising a technical concern is viewed as responsible engineering – not resistance.</p><p>The goal of incident management is not to prove which team was right. It is to protect the business, establish the facts, restore trust, and ensure the same failure does not happen again.</p><p>Because in the end, database security and operational reliability are not the DBA team’s responsibility alone.</p><p>They are an organizational responsibility.</p><p>⸻</p><p>What has your experience been with the balance between development speed, database governance, and management expectations?</p><p>#IncidentManagement #DatabaseAdministration #DBA #DevOps #DataGovernance #DatabaseSecurity #ITLeadership #RiskManagement</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79dce56de9c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Oracle Flashback Database: The DBA’s Time Machine]]></title>
            <link>https://medium.com/@sonisharmadataops/oracle-flashback-database-the-dbas-time-machine-33af96302e42?source=rss-fc3fd6b55ed5------2</link>
            <guid isPermaLink="false">https://medium.com/p/33af96302e42</guid>
            <category><![CDATA[oracle-database]]></category>
            <category><![CDATA[dba]]></category>
            <category><![CDATA[dba-training-courses]]></category>
            <dc:creator><![CDATA[Soni Sharma ]]></dc:creator>
            <pubDate>Sat, 29 Aug 2026 15:37:32 GMT</pubDate>
            <atom:updated>2026-08-29T15:37:32.084Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BdA0vty0fnGM3Ct_jIxtAQ.png" /></figure><p><strong>Imagine this.</strong></p><p>It’s 2:15 PM.</p><p>Everything is normal. The application is running, users are connected, and the database is healthy.</p><p>Then a developer calls:</p><p><em>“I accidentally deleted the production data.”</em></p><p>You check the database.</p><p>The command was already committed.</p><pre>DELETE FROM orders;<br>COMMIT;</pre><p>Your first thought is:</p><p><strong>“Where is my backup?”</strong></p><p>But there may be a faster question:</p><p><strong>“Do we have Flashback Database enabled?”</strong></p><p>This is where one of Oracle Database’s most interesting recovery technologies comes into the picture:</p><h3>Flashback Database</h3><p>Think of Flashback Database as a <strong>time machine for your database</strong>.</p><p>Instead of rebuilding the database from a backup, Oracle can rewind the database to an earlier point in time.</p><h3>What Exactly Is Flashback?</h3><p>Flashback Database allows a DBA to move the <strong>entire database</strong> back to a previous point in time.</p><p>For example:</p><pre>10:00 AM<br>Database is healthy<br>      ↓<br>11:00 AM<br>Application deployment<br>      ↓<br>12:00 PM<br>Bad SQL executed<br>      ↓<br>12:05 PM<br>Problem discovered<br>      ↓<br>FLASHBACK<br>      ↓<br>11:59 AM<br>Database returns to an earlier state</pre><p>That is the basic idea.</p><p>You are essentially telling Oracle:</p><blockquote><strong><em>“Take me back to the way the database looked before the mistake.”</em></strong></blockquote><h3>Why Is This Useful?</h3><p>Database failures aren’t always hardware failures.</p><p>Sometimes the database is perfectly healthy — but <strong>a human made a mistake</strong>.</p><p>And human mistakes are surprisingly common.</p><p>For example:</p><pre>UPDATE customers<br>SET credit_limit = 0;</pre><p>Someone forgot the WHERE clause.</p><p>Or:</p><pre>DELETE FROM orders;</pre><p>Again, no WHERE clause.</p><p>Or perhaps a deployment script contains:</p><pre>DROP TABLE customer_history;</pre><p>The database itself didn’t fail.</p><p>The problem is that <strong>someone told the database to do the wrong thing</strong>.</p><p>This is called a <strong>logical failure</strong>.</p><p>And Flashback can be extremely useful for this type of problem.</p><h3>Flashback vs RMAN: The Difference Every DBA Should Know</h3><p>A common beginner question is:</p><blockquote><em>“If I have RMAN, why do I need Flashback?”</em></blockquote><p>Because they solve different problems.</p><p>Think about it like this:</p><pre>DATABASE PROBLEM<br>                     │<br>          ┌──────────┴──────────┐<br>          │                     │<br>          ↓                     ↓<br>    Logical mistake       Physical failure<br>          │                     │<br>          ↓                     ↓<br>      Flashback               RMAN</pre><h3>Example 1 — Logical mistake</h3><p>A developer accidentally deletes data.</p><pre>DELETE<br>  ↓<br>COMMIT<br>  ↓<br>Flashback may help</pre><h3>Example 2 — Physical failure</h3><p>A database datafile is lost because of a storage failure.</p><pre>Datafile LOST<br>     ↓<br>Restore backup<br>     ↓<br>Recover with RMAN</pre><p>So remember:</p><blockquote><strong><em>Flashback is not a replacement for RMAN.</em></strong></blockquote><p>A serious Oracle DBA needs both concepts.</p><h3>What Happens Behind the Scenes?</h3><p>Now let’s look at the interesting part.</p><p>How can Oracle actually go backward in time?</p><p>Oracle uses <strong>flashback logs</strong>.</p><p>These logs are stored in the <strong>Fast Recovery Area</strong>, commonly called the <strong>FRA</strong>.</p><p>Conceptually:</p><pre>DATABASE<br>                   │<br>                   ↓<br>             Flashback Logs<br>                   │<br>                   ↓<br>          Fast Recovery Area<br>                   │<br>                   ↓<br>             Earlier State</pre><p>When Flashback Database is enabled, Oracle maintains the information required to reconstruct database blocks from an earlier point.</p><p>The available flashback window depends on your configuration, workload, storage capacity, and retention requirements.</p><h3>First Requirement: ARCHIVELOG Mode</h3><p>Before enabling Flashback Database, the database needs to be running in <strong>ARCHIVELOG mode</strong>.</p><p>Check it:</p><pre>ARCHIVE LOG LIST;</pre><p>Or:</p><pre>SELECT log_mode<br>FROM v$database;</pre><p>If you see:</p><pre>ARCHIVELOG</pre><p>you’re good on this requirement.</p><p>If you see:</p><pre>NOARCHIVELOG</pre><p>you need to enable ARCHIVELOG mode before using Flashback Database.</p><p>And remember:</p><pre>ARCHIVELOG ≠ FLASHBACK</pre><p>They are related, but they are <strong>not the same thing</strong>.</p><h3>What Is the Fast Recovery Area?</h3><p>The Fast Recovery Area is Oracle’s designated recovery storage area.</p><p>It can contain recovery-related files such as:</p><ul><li>Archived redo logs</li><li>Flashback logs</li><li>RMAN backup files</li><li>Control file backups</li><li>Other recovery files</li></ul><p>Check the configuration:</p><pre>SHOW PARAMETER db_recovery_file_dest;</pre><p>Check the size:</p><pre>SHOW PARAMETER db_recovery_file_dest_size;</pre><p>For a small development lab, you might configure:</p><pre>ALTER SYSTEM SET db_recovery_file_dest_size=10G<br>SCOPE=BOTH;</pre><p>The correct FRA size in a real environment should be calculated based on workload and recovery requirements.</p><h3>Is Flashback Temporary?</h3><p>This confuses many beginners.</p><p>Suppose you execute:</p><pre>ALTER DATABASE FLASHBACK ON;</pre><p>Is Flashback enabled only until the next restart?</p><p><strong>No.</strong></p><p>The Flashback Database setting remains enabled across normal database restarts.</p><p>You can verify it:</p><pre>SELECT flashback_on<br>FROM v$database;</pre><p>If you see:</p><pre>YES</pre><p>Flashback Database is enabled.</p><h3>How to Enable Flashback Database</h3><p>Once ARCHIVELOG mode and the FRA are configured, enabling Flashback is straightforward.</p><p>Connect as SYSDBA:</p><pre>sqlplus / as sysdba</pre><p>Shutdown:</p><pre>SHUTDOWN IMMEDIATE;</pre><p>Start the database in MOUNT mode:</p><pre>STARTUP MOUNT;</pre><p>Enable Flashback:</p><pre>ALTER DATABASE FLASHBACK ON;</pre><p>Open the database:</p><pre>ALTER DATABASE OPEN;</pre><p>Verify:</p><pre>SELECT flashback_on<br>FROM v$database;</pre><p>Expected:</p><pre>FLASHBACK_ON<br>------------<br>YES</pre><p>Congratulations.</p><p>Your database now has a <strong>time machine</strong>.</p><h3>What If You Want to Turn It Off?</h3><p>Flashback Database isn’t permanent in the sense that you can never disable it.</p><p>You can turn it off.</p><pre>SHUTDOWN IMMEDIATE;</pre><pre>STARTUP MOUNT;</pre><pre>ALTER DATABASE FLASHBACK OFF;</pre><pre>ALTER DATABASE OPEN;</pre><p>Verify:</p><pre>SELECT flashback_on<br>FROM v$database;</pre><p>Result:</p><pre>NO</pre><p>Notice something important:</p><p><strong>Turning Flashback OFF does not automatically turn ARCHIVELOG OFF.</strong></p><p>They are separate database settings.</p><h3>Flashback Is Bigger Than Flashback Database</h3><p>Another common beginner mistake is thinking that “Flashback” means only one feature.</p><p>Oracle actually provides several Flashback technologies.</p><h3>1. Flashback Query</h3><p>Want to see what data looked like earlier?</p><p>You can query historical data.</p><p>For example:</p><pre>SELECT *<br>FROM employees<br>AS OF TIMESTAMP<br>SYSTIMESTAMP - INTERVAL &#39;10&#39; MINUTE;</pre><p>This can allow you to see an earlier version of the data, subject to available undo.</p><h3>2. Flashback Table</h3><p>Maybe only one table was affected.</p><p>You don’t necessarily want to rewind the entire database.</p><p>That’s where Flashback Table can be useful.</p><p>Conceptually:</p><pre>Database<br>│<br>├── EMPLOYEES      ← Recover this table<br>├── CUSTOMERS<br>├── ORDERS<br>└── PRODUCTS</pre><h3>3. Flashback Drop</h3><p>Someone dropped a table.</p><pre>DROP TABLE employees;</pre><p>Depending on the circumstances, the recycle bin can allow the table to be recovered:</p><pre>FLASHBACK TABLE employees<br>TO BEFORE DROP;</pre><p>This is one of the first Flashback features many Oracle beginners enjoy learning because the result feels almost magical.</p><h3>4. Flashback Database</h3><p>And finally, the big one:</p><pre>Entire Database<br>       ↓<br>Rewind<br>       ↓<br>Earlier Point in Time</pre><p>This is what we mean by <strong>Flashback Database</strong>.</p><h3>A Real DBA Scenario</h3><p>Let’s return to our original incident.</p><p>It is 2:15 PM.</p><p>The developer accidentally modified important data at 2:00 PM.</p><p>You discover the problem at 2:10 PM.</p><p>Your recovery decision might look like this:</p><pre>Problem discovered<br>                      │<br>                      ↓<br>             What actually happened?<br>                      │<br>          ┌───────────┴───────────┐<br>          │                       │<br>          ↓                       ↓<br>    Logical mistake         Physical failure<br>          │                       │<br>          ↓                       ↓<br>    Check Flashback             RMAN<br>          │<br>          ↓<br>   Suitable recovery point?<br>          │<br>          ↓<br>       Flashback</pre><p>This is where a DBA’s judgment matters.</p><p>Knowing commands is not enough.</p><p>You need to know <strong>which recovery technology to use and why</strong>.</p><h3>Flashback Doesn’t Mean “No Backups Needed”</h3><p>This is probably the most important lesson.</p><p>Never tell your manager:</p><blockquote><em>“We don’t need backups because Flashback is enabled.”</em></blockquote><p>That would be a serious mistake.</p><p>Flashback Database has limitations.</p><p>For example, if storage containing your database files is physically destroyed, Flashback logs cannot magically recreate a lost disk.</p><p>That’s where RMAN backups become critical.</p><p>A good recovery strategy looks more like:</p><pre>Oracle Database<br>                     │<br>        ┌────────────┴────────────┐<br>        │                         │<br>        ↓                         ↓<br>     Flashback                   RMAN<br>        │                         │<br>        ↓                         ↓<br>Fast logical recovery      Backup/disaster recovery</pre><p>Use the right tool for the right problem.</p><h3>Flashback in a Development Environment</h3><p>Flashback can be particularly useful in <strong>development and testing</strong>.</p><p>Imagine a developer wants to test a database deployment.</p><p>Without a quick recovery mechanism:</p><pre>Test<br> ↓<br>Deployment<br> ↓<br>Something breaks<br> ↓<br>Restore backup<br> ↓<br>Recover<br> ↓<br>Test again</pre><p>With a suitable Flashback strategy:</p><pre>Known-good state<br>      ↓<br>Deployment<br>      ↓<br>Testing<br>      ↓<br>Problem<br>      ↓<br>Flashback<br>      ↓<br>Known-good state<br>      ↓<br>Test again</pre><p>This can make repeated testing much easier.</p><h3>The DBA Cheat Sheet</h3><p>Here are the commands worth remembering.</p><h3>Check ARCHIVELOG</h3><pre>ARCHIVE LOG LIST;</pre><h3>Check Flashback</h3><pre>SELECT flashback_on<br>FROM v$database;</pre><h3>Check database mode</h3><pre>SELECT name, log_mode<br>FROM v$database;</pre><h3>Check FRA</h3><pre>SHOW PARAMETER db_recovery_file_dest;</pre><h3>Check FRA size</h3><pre>SHOW PARAMETER db_recovery_file_dest_size;</pre><h3>Enable Flashback</h3><pre>SHUTDOWN IMMEDIATE;<br>STARTUP MOUNT;</pre><pre>ALTER DATABASE FLASHBACK ON;</pre><pre>ALTER DATABASE OPEN;</pre><h3>Disable Flashback</h3><pre>SHUTDOWN IMMEDIATE;<br>STARTUP MOUNT;</pre><pre>ALTER DATABASE FLASHBACK OFF;</pre><pre>ALTER DATABASE OPEN;</pre><h3>The Three Things to Remember</h3><p>If you’re preparing for an Oracle DBA interview, remember these three statements:</p><h3>1. Flashback Database rewinds the database</h3><pre>Current State<br>     ↓<br>Flashback<br>     ↓<br>Earlier State</pre><h3>2. Flashback does not replace RMAN</h3><pre>Flashback → Fast logical recovery<br>RMAN      → Backup and disaster recovery</pre><h3>3. ARCHIVELOG and Flashback are different</h3><pre>ARCHIVELOG<br>    ↓<br>Archived Redo</pre><pre>FLASHBACK<br>    ↓<br>Flashback Logs</pre><p>Both are important, but they serve different purposes.</p><h3>Final Thought</h3><p>A database administrator isn’t just responsible for keeping a database <strong>running</strong>.</p><p>A DBA must also be prepared for the moment when something goes wrong.</p><p>Sometimes the problem isn’t a crashed server.</p><p>Sometimes it isn’t a failed disk.</p><p>Sometimes it’s simply:</p><pre>DELETE FROM customers;<br>COMMIT;</pre><p>And that’s when technologies like Flashback become extremely valuable.</p><p>The real power of Flashback isn’t that it makes mistakes impossible.</p><p><strong>It’s that it can make some mistakes reversible.</strong></p><p>And for a DBA, that’s a powerful capability to have.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33af96302e42" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PostgreSQL pg_hba.conf: The Security Gatekeeper of Your Database]]></title>
            <link>https://medium.com/@sonisharmadataops/postgresql-pg-hba-conf-the-security-gatekeeper-of-your-database-9b5846b78d6a?source=rss-fc3fd6b55ed5------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b5846b78d6a</guid>
            <category><![CDATA[postgresql-database]]></category>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[postgresql-tutorials]]></category>
            <category><![CDATA[postgres]]></category>
            <dc:creator><![CDATA[Soni Sharma ]]></dc:creator>
            <pubDate>Mon, 24 Aug 2026 17:37:10 GMT</pubDate>
            <atom:updated>2026-08-24T17:37:10.497Z</atom:updated>
            <content:encoded><![CDATA[<p>A PostgreSQL database can be up and running, port 5432 can be open, and the username and password can be correct – yet the connection can still fail</p><p>One of the first places a PostgreSQL DBA should look is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*UKR9RiXmx5wDpchyclog0w@2x.jpeg" /></figure><p>pg_hba.conf</p><p>Think of it as the security gatekeeper of PostgreSQL. It decides who can connect, from where, to which database, and which authentication method must be used.</p><p>What is pg_hba.conf?</p><p>pg_hba.conf stands for Host-Based Authentication Configuration File.</p><p>A typical rule looks like:</p><p>TYPE. DATABASE. USER. ADDRESS. METHOD</p><p>host. all. all. 192.168.1.0/24. scram-sha-256</p><p>This means clients from the specified network can connect to PostgreSQL databases using SCRAM authentication.</p><p>The 5 important fields</p><ol><li>TYPE</li></ol><p>Defines the connection type:</p><p>local</p><p>host</p><p>hostssl</p><p>hostnossl</p><p>For example:</p><p>local. all. all. peer</p><p>is commonly used for local connections.</p><p>2. DATABASE</p><p>Specifies which database the rule applies to:</p><p>all</p><p>mydb</p><p>postgres</p><p>3. USER</p><p>Specifies the PostgreSQL role:</p><p>app_user</p><p>dba_user</p><p>all</p><p>4. ADDRESS</p><p>Defines where the connection can originate from.</p><p>For one server:</p><p>10.10.10.20/32</p><p>For a subnet:</p><p>10.10.10.0/24</p><p>5. METHOD</p><p>Defines how the user will authenticate.</p><p>Common methods include:</p><p>trust</p><p>peer</p><p>password</p><p>md5</p><p>scram-sha-256</p><p>reject</p><p>For modern PostgreSQL environments, scram-sha-256 is generally preferred for password authentication.</p><p>The most important rule: First match wins</p><p>PostgreSQL reads pg_hba.conf from top to bottom.</p><p>As soon as it finds a matching rule, it uses that rule.</p><p>For example:</p><p>host. all. all. 0.0.0.0/0. trust</p><p>host. mydb. app1. 10.10.10.20/32. scram-sha-256</p><p>The second rule will never be reached for a connection matching the first rule.</p><p>That’s why rule order matters.</p><p>Finding the file</p><p>Don’t guess where pg_hba.conf is located.</p><p>Run:</p><p>SHOW hba_file;</p><p>You can also check configuration errors with:</p><p>SELECT line_number, error</p><p>FROM pg_hba_file_rules</p><p>WHERE error IS NOT NULL;</p><p>Do I need to restart PostgreSQL?</p><p>Usually, no.</p><p>After modifying pg_hba.conf, reload the configuration:</p><p>SELECT pg_reload_conf();</p><p>A reload is normally enough; a full PostgreSQL restart is not required.</p><p>Troubleshooting connection failures</p><p>If you receive:</p><p>FATAL: no pg_hba.conf entry for host “10.10.10.20&quot;,</p><p>user “app_user”, database “mydb”</p><p>don’t immediately reset the password.</p><p>Check:</p><ul><li>Client IP address</li><li>* Database name</li><li>* PostgreSQL username</li><li>* Connection type</li><li>* pg_hba.conf rules</li><li>* Rule order</li><li>* Authentication method</li></ul><p>DBA takeaway</p><p>When troubleshooting PostgreSQL connectivity, remember:</p><p>Network</p><p>. ↓</p><p>Port 5432</p><p>. ↓</p><p>pg_hba.conf</p><p>. ↓</p><p>Authentication</p><p>. ↓</p><p>Database privileges</p><p>pg_hba.conf is not just another configuration file. It is one of the first security boundaries between your PostgreSQL server and its clients.</p><p>As a DBA, understanding how it works can save you from blindly changing passwords, opening firewalls, or restarting databases when the real problem is simply an HBA rule.</p><p>Know your pg_hba.conf – because PostgreSQL won’t let anyone through the door without it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b5846b78d6a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MongoDB Architecture: A Complete Guide]]></title>
            <link>https://medium.com/@sonisharmadataops/mongodb-architecture-a-complete-guide-f26acb8d693d?source=rss-fc3fd6b55ed5------2</link>
            <guid isPermaLink="false">https://medium.com/p/f26acb8d693d</guid>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[mongodb-atlas]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <dc:creator><![CDATA[Soni Sharma ]]></dc:creator>
            <pubDate>Thu, 20 Aug 2026 19:01:52 GMT</pubDate>
            <atom:updated>2026-08-20T19:03:08.664Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*he7Y1VxoOev6gzgIqyM-vw@2x.jpeg" /></figure><p>MongoDB is a document-oriented NoSQL database designed for high performance, scalability, flexibility, and high availability. Unlike traditional relational databases such as Oracle or PostgreSQL, MongoDB does not primarily store data in rows and columns. Instead, it stores data as BSON documents organized into collections.</p><p>MongoDB architecture is designed to support both simple standalone deployments and highly available, horizontally scalable production environments.</p><p>At a high level, MongoDB architecture can be understood through five major components:</p><ul><li>mongod</li><li>* mongos</li><li>* Replica Sets</li><li>* Shards</li><li>* Config Servers</li></ul><p>⸻</p><ol><li>MongoDB Data Model</li></ol><p>Before understanding the architecture, it is important to understand how MongoDB organizes data.</p><p>The hierarchy is:</p><p>Database → Collection → Document → Fields</p><p>For example:</p><p>MongoDB</p><p>. |</p><p>. + – shopDB</p><p>. |</p><p>. + – products</p><p>. |</p><p>. + – Document</p><p>. {</p><p>. “_id”: 101,</p><p>. “name”: “Laptop”,</p><p>. “price”: 55000,</p><p>. “category”: “Electronics”,</p><p>. “stock”: true</p><p>. }</p><p>Database</p><p>A MongoDB server can contain multiple databases.</p><p>For example:</p><p>shopDB</p><p>merchantDB</p><p>customerDB</p><p>Collection</p><p>A collection is similar to a table in a relational database.</p><p>For example:</p><p>shopDB</p><p>. |</p><p>. + – products</p><p>. + – customers</p><p>. + – orders</p><p>Document</p><p>A document is similar to a row in an RDBMS, but it is much more flexible.</p><p>Example:</p><p>{</p><p>. “_id”: 101,</p><p>. “name”: “Laptop”,</p><p>. “price”: 55000,</p><p>. “category”: “Electronics”</p><p>}</p><p>MongoDB stores documents internally in BSON (Binary JSON) format.</p><p>⸻</p><p>2. Core MongoDB Components</p><p>mongod</p><p>mongod is the primary MongoDB database server process.</p><p>It is responsible for:</p><ul><li>Storing data</li><li>* Processing database operations</li><li>* Managing indexes</li><li>* Handling client requests</li><li>* Managing replication</li><li>* Performing database operations</li></ul><p>Whenever an application connects directly to a MongoDB server, the request is ultimately handled by a mongod process.</p><p>For example:</p><p>Application</p><p>. |</p><p>. v</p><p>. mongod</p><p>. |</p><p>. v</p><p>MongoDB Data</p><p>In a standalone deployment, a single mongod process may provide the entire database service.</p><p>⸻</p><p>3. Replica Set Architecture</p><p>For production environments, MongoDB commonly uses Replica Sets to provide high availability and redundancy.</p><p>A replica set consists of multiple MongoDB nodes.</p><p>A typical configuration is:</p><p>. PRIMARY</p><p>. |</p><p>. + – – – -+ – – – -+</p><p>. |. |</p><p>. v. v</p><p>. SECONDARY. SECONDARY</p><p>Primary</p><p>The Primary node receives write operations.</p><p>For example:</p><p>Application</p><p>. |</p><p>. v</p><p>. PRIMARY</p><p>. |</p><p>. + – – &gt; Data</p><p>Secondary</p><p>Secondary nodes replicate data from the primary.</p><p>. PRIMARY</p><p>. |</p><p>. + – – – -+ – – – -+</p><p>. |. |</p><p>. v. v</p><p>. SECONDARY. SECONDARY</p><p>If the primary becomes unavailable, the replica set can elect another eligible member as the new primary.</p><p>This provides high availability.</p><p>⸻</p><p>4. Replication</p><p>MongoDB replication is based on the oplog (operations log).</p><p>The primary records database operations in its oplog. Secondary members continuously replicate those operations.</p><p>Conceptually:</p><p>Application</p><p>. |</p><p>. v</p><p>. PRIMARY</p><p>. |</p><p>. |. Oplog</p><p>. |</p><p>. + – – – – – +</p><p>. |. |</p><p>. v. v</p><p>Secondary. Secondary</p><p>The major benefits are:</p><ul><li>High availability</li><li>* Automatic failover</li><li>* Data redundancy</li><li>* Read scalability in appropriate workloads</li><li>* Disaster recovery support</li></ul><p>⸻</p><p>5. Sharding</p><p>When a MongoDB database becomes very large or requires high throughput, sharding can be used.</p><p>Sharding means distributing data across multiple servers.</p><p>Instead of storing all data on one server:</p><p>. MongoDB</p><p>. |</p><p>. + – – – – -+ – – – – -+</p><p>. |. |. |</p><p>. v. v. v</p><p>. Server 1. Server 2. Server 3</p><p>MongoDB distributes the data across multiple shards.</p><p>Each shard normally contains a replica set in a production deployment.</p><p>For example:</p><p>. Application</p><p>. |</p><p>. v</p><p>. mongos</p><p>. Query Router</p><p>. / |. \</p><p>. / |. \</p><p>. v. v. v</p><p>. Shard 1. Shard 2. Shard 3</p><p>. Replica. Replica. Replica</p><p>. Set. Set. Set</p><p>This architecture provides horizontal scalability.</p><p>Instead of continuously increasing the CPU, RAM, and storage of one server, additional servers can be added to the cluster.</p><p>⸻</p><p>6. mongos</p><p>mongos is the query router used in a sharded MongoDB cluster.</p><p>Applications generally connect to mongos, rather than connecting directly to individual shards.</p><p>The flow is:</p><p>Application</p><p>. |</p><p>. v</p><p>. mongos</p><p>. |</p><p>. + – – – – -&gt; Shard 1</p><p>. |</p><p>. + – – – – -&gt; Shard 2</p><p>. |</p><p>. + – – – – -&gt; Shard 3</p><p>mongos determines which shard or shards should receive a query.</p><p>For example, if a query targets data belonging to Shard 2, the router can direct the request appropriately.</p><p>This makes the sharded cluster appear to the application as a single logical MongoDB database.</p><p>⸻</p><p>7. Config Servers</p><p>A sharded MongoDB cluster also requires Config Servers.</p><p>Config Servers store important metadata about the cluster.</p><p>They maintain information such as:</p><ul><li>Shard configuration</li><li>* Chunk metadata</li><li>* Database and collection distribution</li><li>* Cluster configuration information</li></ul><p>A production configuration typically uses a Config Server Replica Set.</p><p>Conceptually:</p><p>. Config Server Replica Set</p><p>. Config 1</p><p>. |</p><p>. + – – -+ – – -+</p><p>. |. |</p><p>. v. v</p><p>Config 2. Config 3</p><p>The config servers work together with mongos to help the cluster understand where data is located.</p><p>⸻</p><p>8. Complete MongoDB Sharded Architecture</p><p>Putting the components together:</p><p>. Application</p><p>. |</p><p>. v</p><p>. mongos</p><p>. Query Router</p><p>. |</p><p>. + – – – – – – – – -+ – – – – – – – – -+</p><p>. |. |. |</p><p>. v. v. v</p><p>. Shard 1. Shard 2. Shard 3</p><p>. Replica Set. Replica Set. Replica Set</p><p>. |. |. |</p><p>. Primary. Primary. Primary</p><p>. / \ / \ / \</p><p>. S. S. S. S. S. S</p><p>. + – – – – – – – – – +</p><p>. |. Config Servers. |</p><p>. |. Replica Set. |</p><p>. + – – – – – – – – – +</p><p>Here:</p><ul><li>Application sends database requests.</li><li>* mongos routes queries.</li><li>* Shards store the actual application data.</li><li>* Replica sets provide redundancy within each shard.</li><li>* Config servers maintain cluster metadata.</li></ul><p>⸻</p><p>9. How a Query Travels Through MongoDB</p><p>Consider an application executing:</p><p>db.orders.find({ customer_id: 1001 })</p><p>In a sharded environment, the flow can be:</p><p>Application</p><p>. |</p><p>. v</p><p>. mongos</p><p>. |</p><p>. v</p><p>Determine target shard</p><p>. |</p><p>. v</p><p>. Shard 2</p><p>. |</p><p>. v</p><p>. Primary/Secondary</p><p>. |</p><p>. v</p><p>Return result</p><p>. |</p><p>. v</p><p>Application</p><p>If MongoDB can determine the target shard using the shard key, it can route the query directly to the appropriate shard.</p><p>If the query does not contain sufficient shard-key information, MongoDB may need to query multiple shards. This is known as a scatter-gather query.</p><p>Therefore, choosing an appropriate shard key is an important part of MongoDB architecture and performance design.</p><p>⸻</p><p>10. Standalone vs Replica Set vs Sharded Cluster</p><p>Architecture	Main Purpose</p><p>Standalone	Development, testing, simple workloads</p><p>Replica Set	High availability and redundancy</p><p>Sharded Cluster	Horizontal scalability and very large workloads</p><p>Sharded Cluster + Replica Sets	Production-scale availability and scalability</p><p>A typical production architecture may therefore look like:</p><p>. Application</p><p>. |</p><p>. mongos</p><p>. |</p><p>. + – – – – – – – + – – – – – – – +</p><p>. |. |. |</p><p>. v. v. v</p><p>. Shard 1. Shard 2. Shard 3</p><p>. Replica Set. Replica Set. Replica Set</p><p>⸻</p><p>11. Advantages of MongoDB Architecture</p><p>High Availability</p><p>Replica sets provide redundancy and automatic failover.</p><p>Horizontal Scalability</p><p>Sharding allows MongoDB to distribute data and workload across multiple servers.</p><p>Flexible Data Model</p><p>Documents can contain different fields and nested structures, making MongoDB suitable for applications with evolving data models.</p><p>Performance</p><p>MongoDB supports indexes and document-oriented access patterns that can provide efficient application performance when the data model and indexes are designed correctly.</p><p>Distributed Architecture</p><p>MongoDB can distribute both data and workload across multiple machines.</p><p>⸻</p><p>12. Important DBA Perspective</p><p>From a MongoDB DBA perspective, understanding architecture is essential before moving into administration and troubleshooting.</p><p>A MongoDB DBA should understand:</p><ol><li>MongoDB installation</li><li>2. mongod configuration</li><li>3. Databases and collections</li><li>4. Users and roles</li><li>5. Authentication and authorization</li><li>6. Index management</li><li>7. Replica sets</li><li>8. Oplog</li><li>9. Elections and failover</li><li>10. Backup and restore</li><li>11. Monitoring</li><li>12. Performance troubleshooting</li><li>13. Sharding</li><li>14. Balancer</li><li>15. Chunk distribution</li><li>16. Config servers</li><li>17. mongos</li><li>18. Security</li><li>19. Capacity planning</li><li>20. Disaster recovery</li></ol><p>⸻</p><p>Conclusion</p><p>MongoDB architecture is built around a simple document model but can scale into a sophisticated distributed database platform.</p><p>The most important concepts to remember are:</p><p>mongod</p><p>. ↓</p><p>Database Server</p><p>Replica Set</p><p>. ↓</p><p>High Availability</p><p>mongos</p><p>. ↓</p><p>Query Routing</p><p>Shard</p><p>. ↓</p><p>Data Distribution</p><p>Config Servers</p><p>. ↓</p><p>Cluster Metadata</p><p>A standalone MongoDB deployment may use only mongod, while a highly available deployment uses Replica Sets. For large-scale workloads, MongoDB can use Sharding, where mongos routes queries to multiple shards and Config Servers maintain cluster metadata.</p><p>Understanding these components provides the foundation for learning MongoDB DBA operations, including backup and restore, replication, monitoring, performance tuning, security, and production troubleshooting.</p><p>In short: MongoDB combines a flexible document model with replication and horizontal scaling to build highly available and scalable database systems.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f26acb8d693d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Before You Shut It Down: A Production DBA Guide to RMAN Backup, Oracle 12c Shutdown and Startup on…]]></title>
            <link>https://medium.com/@sonisharmadataops/before-you-shut-it-down-a-production-dba-guide-to-rman-backup-oracle-12c-shutdown-and-startup-on-1cb9db4dd223?source=rss-fc3fd6b55ed5------2</link>
            <guid isPermaLink="false">https://medium.com/p/1cb9db4dd223</guid>
            <category><![CDATA[dba-training-courses]]></category>
            <category><![CDATA[oracle-database]]></category>
            <category><![CDATA[dba]]></category>
            <category><![CDATA[production-database]]></category>
            <dc:creator><![CDATA[Soni Sharma ]]></dc:creator>
            <pubDate>Thu, 30 Jul 2026 05:16:22 GMT</pubDate>
            <atom:updated>2026-07-30T07:17:05.487Z</atom:updated>
            <content:encoded><![CDATA[<h3>Before You Shut It Down: A Production DBA Guide to RMAN Backup, Oracle 12c Shutdown and Startup on Azure</h3><p>A production database shutdown is not just:</p><pre>SHUTDOWN IMMEDIATE;</pre><p>When a planned infrastructure activity requires an Oracle database running on an Azure VM to be stopped, the DBA should first establish a safe recovery point, verify the backup, stop Oracle cleanly, and validate everything again after the activity.</p><p>This article covers only the <strong>DBA-side procedure</strong>.</p><p><strong>Backup → Validate → Stop → Shutdown → Activity → Startup → Verify</strong></p><blockquote><strong><em>DBA Note: SAFETY</em></strong><em><br>Never start a production shutdown until you have confirmed the server, database, backup status, and approved maintenance window.</em></blockquote><h3>1. Confirm Where You Are</h3><p><strong>Note: IDENTITY</strong></p><p>Before doing anything, connect to the Azure VM as the Oracle software owner and confirm the server.</p><pre>hostname<br>whoami<br>date<br>echo $ORACLE_SID<br>echo $ORACLE_HOME</pre><p>Check the Oracle instance:</p><pre>ps -ef | grep [p]mon</pre><p>For example:</p><pre>oracle   2145   1   0   ora_pmon_PROD</pre><p>The PMON process tells us that the PROD Oracle instance is running.</p><p>Do not perform a production activity based only on the hostname. Verify the database from Oracle as well.</p><h3>2. Connect to the Database</h3><p><strong>Note: CONNECT</strong></p><pre>sqlplus / as sysdba</pre><p>Confirm the instance:</p><pre>SELECT instance_name, host_name, status<br>FROM v$instance;</pre><p>Confirm the database:</p><pre>SELECT name, open_mode, database_role, log_mode<br>FROM v$database;</pre><p>For a normal primary production database, we would expect something similar to:</p><pre>OPEN_MODE       READ WRITE<br>DATABASE_ROLE   PRIMARY<br>LOG_MODE        ARCHIVELOG</pre><p>The important point is to confirm that you are connected to the <strong>correct production database</strong> before running RMAN or shutdown commands.</p><h3>3. Check ARCHIVELOG Mode</h3><p><strong>Note: REDO</strong></p><p>Run:</p><pre>ARCHIVE LOG LIST;</pre><p>For an online RMAN backup while the database remains open, the database should be in ARCHIVELOG mode.</p><p>Example:</p><pre>Database log mode              Archive Mode<br>Automatic archival             Enabled</pre><p>Do not change the archive mode as part of this activity. This is only a verification step.</p><h3>4. Check Backup Destination Space</h3><p><strong>Note: SPACE</strong></p><p>Before starting a full backup, verify available space on the backup filesystem.</p><pre>df -h</pre><p>For example, if backups are stored under /backup, check:</p><pre>df -h /backup</pre><p>A backup failing because the destination filesystem became full is something we want to discover before the maintenance window progresses.</p><h3>5. Take the Full RMAN Backup</h3><p><strong>Note: BACKUP</strong></p><p>Connect to RMAN:</p><pre>rman target /</pre><p>For this maintenance activity, we will take:</p><p><strong>Full database backup + archive logs + control file + SPFILE</strong></p><p>Run:</p><pre>RUN {<br>    BACKUP AS COMPRESSED BACKUPSET DATABASE<br>        TAG &#39;PRE_MAINT_FULL&#39;;</pre><pre>    SQL &#39;ALTER SYSTEM ARCHIVE LOG CURRENT&#39;;</pre><pre>    BACKUP AS COMPRESSED BACKUPSET ARCHIVELOG ALL<br>        TAG &#39;PRE_MAINT_ARCH&#39;;</pre><pre>    BACKUP CURRENT CONTROLFILE<br>        TAG &#39;PRE_MAINT_CTL&#39;;</pre><pre>    BACKUP SPFILE<br>        TAG &#39;PRE_MAINT_SPFILE&#39;;<br>}</pre><h3>What did we back up?</h3><p>BACKUP DATABASE backs up the database datafiles.</p><p>ARCHIVELOG ALL backs up the available archived redo logs required for recovery.</p><p>CURRENT CONTROLFILE protects the current control file.</p><p>SPFILE protects the server parameter file.</p><p>The backup is created as an RMAN <strong>backup set</strong>, and COMPRESSED reduces the storage requirement at the cost of some additional CPU work.</p><blockquote><strong><em>DBA Note: FULL</em></strong><em><br></em><em>BACKUP DATABASE is a full backup. Do not confuse it with </em><em>BACKUP INCREMENTAL LEVEL 0 DATABASE. A Level 0 backup participates in the incremental backup strategy.</em></blockquote><h3>6. Why Switch the Archive Log?</h3><p><strong>Note: SWITCH</strong></p><p>Inside the backup we ran:</p><pre>SQL &#39;ALTER SYSTEM ARCHIVE LOG CURRENT&#39;;</pre><p>This forces the current redo log to be archived.</p><p>We then back up the archive logs:</p><pre>BACKUP AS COMPRESSED BACKUPSET ARCHIVELOG ALL;</pre><p>This is important because the database remains open while the datafile backup is running. Transactions can continue to generate redo during that period.</p><p>The archived redo logs provide the redo needed to recover the backed-up datafiles to a consistent recovery point.</p><h3>7. Check Whether the Backup Completed</h3><p><strong>Note: STATUS</strong></p><p>Do not shut down the database just because the RMAN prompt returned.</p><p>First check:</p><pre>LIST BACKUP SUMMARY;</pre><p>For more detail:</p><pre>LIST BACKUP OF DATABASE;</pre><p>Check archive log backups:</p><pre>LIST BACKUP OF ARCHIVELOG ALL;</pre><p>You can also query the backup job history from SQL*Plus:</p><pre>SELECT<br>    session_key,<br>    input_type,<br>    status,<br>    start_time,<br>    end_time,<br>    input_bytes_display,<br>    output_bytes_display<br>FROM v$rman_backup_job_details<br>ORDER BY start_time DESC;</pre><p>The relevant backup should show:</p><pre>COMPLETED</pre><p>If you see:</p><pre>FAILED<br>COMPLETED WITH ERRORS</pre><p>investigate the RMAN output before proceeding with the shutdown.</p><h3>8. Validate the RMAN Backup</h3><p><strong>Note: VALIDATE</strong></p><p>This is one of the most important steps.</p><p>From RMAN:</p><pre>RESTORE DATABASE VALIDATE;</pre><p>This does <strong>not restore the database</strong>.</p><p>RMAN reads the backups required for the restore and checks whether they can be used without actually writing restored datafiles.</p><p>For the control file:</p><pre>RESTORE CONTROLFILE VALIDATE;</pre><p>For the SPFILE:</p><pre>RESTORE SPFILE VALIDATE;</pre><p>You can also validate backup sets:</p><pre>VALIDATE BACKUPSET ALL;</pre><h3>Two different checks</h3><pre>LIST BACKUP SUMMARY;</pre><p>answers:</p><p><strong>What backups does RMAN know about?</strong></p><p>Whereas:</p><pre>RESTORE DATABASE VALIDATE;</pre><p>answers a more important operational question:</p><p><strong>Can RMAN read the backups required to restore this database?</strong></p><blockquote><strong><em>DBA Note: TRUST</em></strong><em><br>A backup job showing </em><em>COMPLETED is good. A successful validation provides stronger evidence that the backup is usable. Periodic real restore and recovery testing remains the ultimate test of the backup strategy.</em></blockquote><h3>9. Check Current Sessions</h3><p><strong>Note: USERS</strong></p><p>Before shutting down production, application traffic should already be stopped or controlled according to the approved change plan.</p><p>As DBA, verify current user sessions:</p><pre>SELECT username, status, machine, program<br>FROM v$session<br>WHERE username IS NOT NULL<br>ORDER BY username;</pre><p>Check active sessions specifically:</p><pre>SELECT sid, serial#, username, status, machine, program<br>FROM v$session<br>WHERE username IS NOT NULL<br>AND status = &#39;ACTIVE&#39;;</pre><p>Do not start killing sessions simply because they appear in v$session.</p><p>The purpose here is to understand what is connected before shutdown.</p><h3>10. Shut Down the Database</h3><p><strong>Note: STOP</strong></p><p>Connect:</p><pre>sqlplus / as sysdba</pre><p>Run:</p><pre>SHUTDOWN IMMEDIATE;</pre><p>A successful shutdown should show:</p><pre>Database closed.<br>Database dismounted.<br>ORACLE instance shut down.</pre><h3>Why SHUTDOWN IMMEDIATE?</h3><p>For planned maintenance, SHUTDOWN IMMEDIATE is generally the appropriate choice.</p><p>Oracle stops new connections, disconnects existing sessions, rolls back uncommitted transactions, closes the database, dismounts it, and terminates the instance.</p><p>Do not use:</p><pre>SHUTDOWN ABORT;</pre><p>as the normal production shutdown method.</p><blockquote><strong><em>DBA Note: PATIENCE</em></strong><em><br></em><em>IMMEDIATE does not mean &quot;finish in one second.&quot; Large uncommitted transactions may require time to roll back.</em></blockquote><h3>11. Verify the Database Is Down</h3><p><strong>Note: CONFIRM</strong></p><p>After shutdown:</p><pre>ps -ef | grep [p]mon</pre><p>The PMON process for the target database should no longer exist.</p><p>For example, before shutdown:</p><pre>ora_pmon_PROD</pre><p>After shutdown, ora_pmon_PROD should not be present.</p><p>If the server contains multiple databases, PMON processes for the other databases may still exist.</p><h3>12. Stop the Listener</h3><p><strong>Note: LISTENER</strong></p><p>If the approved activity requires all Oracle database services on this VM to be stopped, check the listener:</p><pre>lsnrctl status</pre><p>Then stop it:</p><pre>lsnrctl stop</pre><p>Verify:</p><pre>lsnrctl status</pre><p>It should report that the listener is not running.</p><h3>Important production point</h3><p>Do not automatically stop a listener for every database shutdown.</p><p>One listener may service multiple databases. If another database on the VM must remain available, stopping the listener can affect its connectivity.</p><p>For a complete VM-level maintenance activity where all Oracle services on that VM are expected to be down, stopping the listener is appropriate.</p><blockquote><strong><em>DBA Note: IMPACT</em></strong><em><br>Know what uses the listener before stopping it.</em></blockquote><h3>13. Hand Over for the Azure Activity</h3><p><strong>Note: HANDOVER</strong></p><p>At this point, from the DBA side:</p><pre>RMAN full backup completed<br>Backup validated<br>Database shut down<br>Database PMON no longer running<br>Listener stopped, if required</pre><p>The DBA can confirm that Oracle services are down and the infrastructure team can proceed with the approved Azure VM activity.</p><p>The Azure infrastructure activity itself is outside the scope of this DBA procedure.</p><h3>14. After the Activity, Verify the VM First</h3><p><strong>Note: STORAGE</strong></p><p>Once the Azure VM is returned to the DBA, do not immediately type STARTUP.</p><p>First check:</p><pre>hostname<br>uptime<br>date</pre><p>Check filesystems:</p><pre>df -h</pre><p>Check Oracle environment:</p><pre>echo $ORACLE_SID<br>echo $ORACLE_HOME</pre><p>Check whether the database has already started automatically:</p><pre>ps -ef | grep [p]mon</pre><p>This is important.</p><p>If PMON already exists for your database, investigate its state before issuing another startup command.</p><h3>15. Start the Listener</h3><p><strong>Note: NETWORK</strong></p><p>If the listener was stopped and has not started automatically:</p><pre>lsnrctl start</pre><p>Check:</p><pre>lsnrctl status</pre><p>Confirm that the listener is running successfully.</p><h3>16. Start the Database</h3><p><strong>Note: STARTUP</strong></p><p>Connect:</p><pre>sqlplus / as sysdba</pre><p>Check the current instance state first if needed.</p><p>Then start the database:</p><pre>STARTUP;</pre><p>Expected output:</p><pre>ORACLE instance started.</pre><pre>Total System Global Area ...<br>Fixed Size ...<br>Variable Size ...<br>Database Buffers ...<br>Redo Buffers ...</pre><pre>Database mounted.<br>Database opened.</pre><p>The sequence is:</p><pre>NOMOUNT<br>   ↓<br>MOUNT<br>   ↓<br>OPEN</pre><p>For a normal primary production database, we expect the database to finish in OPEN mode.</p><h3>17. Validate the Database After Startup</h3><p><strong>Note: HEALTH</strong></p><p>Check:</p><pre>SELECT instance_name, status, startup_time<br>FROM v$instance;</pre><p>Then:</p><pre>SELECT name, open_mode, database_role, log_mode<br>FROM v$database;</pre><p>Expected:</p><pre>STATUS          OPEN<br>OPEN_MODE       READ WRITE<br>DATABASE_ROLE   PRIMARY<br>LOG_MODE        ARCHIVELOG</pre><p>Do not stop validation simply because SQL*Plus displayed:</p><pre>Database opened.</pre><p>The database must be checked after startup.</p><h3>18. Check Datafiles and Tablespaces</h3><p><strong>Note: FILES</strong></p><p>Check datafiles:</p><pre>SELECT file#, name, status<br>FROM v$datafile<br>ORDER BY file#;</pre><p>Check tablespaces:</p><pre>SELECT tablespace_name, status<br>FROM dba_tablespaces<br>ORDER BY tablespace_name;</pre><p>For normal permanent application tablespaces, verify that the expected tablespaces are online.</p><h3>19. Verify Archive Generation</h3><p><strong>Note: ARCHIVE</strong></p><p>After startup, force a log switch:</p><pre>ALTER SYSTEM SWITCH LOGFILE;</pre><p>Check recent archived logs:</p><pre>SELECT sequence#, first_time, next_time, archived, status<br>FROM v$archived_log<br>ORDER BY sequence# DESC<br>FETCH FIRST 10 ROWS ONLY;</pre><p>This helps verify that redo generation and archiving are working after the activity.</p><h3>20. Check Listener and Database Services</h3><p><strong>Note: SERVICE</strong></p><p>At OS level:</p><pre>lsnrctl status</pre><p>At database level:</p><pre>SELECT name<br>FROM v$services<br>ORDER BY name;</pre><p>Verify that the required database service is available and registered with the listener.</p><p>Remember:</p><pre>tnsping &lt;SERVICE_NAME&gt;</pre><p>can help test Oracle Net reachability, but tnsping alone does not prove that an application can successfully authenticate and use the database.</p><h3>21. Review the Alert Log</h3><p><strong>Note: ALERT</strong></p><p>After startup, review the Oracle alert log.</p><p>Using ADRCI:</p><pre>adrci</pre><p>Then:</p><pre>show homes</pre><p>Set the appropriate database ADR home and review recent alert entries:</p><pre>show alert -tail 100</pre><p>Look for unexpected:</p><pre>ORA-<br>Errors<br>Recovery messages<br>Datafile errors<br>Archive errors<br>I/O errors</pre><p>A database can reach OPEN and still have problems that require DBA attention.</p><h3>Production DBA Flow</h3><p>For students, remember the activity in this order:</p><pre>VERIFY<br>   ↓<br>BACKUP<br>   ↓<br>VALIDATE<br>   ↓<br>SESSIONS<br>   ↓<br>SHUTDOWN<br>   ↓<br>LISTENER<br>   ↓<br>AZURE ACTIVITY<br>   ↓<br>OS CHECK<br>   ↓<br>LISTENER<br>   ↓<br>STARTUP<br>   ↓<br>DATABASE CHECK<br>   ↓<br>ARCHIVE CHECK<br>   ↓<br>ALERT LOG</pre><h3>Commands Worth Remembering</h3><pre># Check Oracle instance<br>ps -ef | grep [p]mon</pre><pre># Connect SQL*Plus<br>sqlplus / as sysdba</pre><pre># Connect RMAN<br>rman target /</pre><pre># Full database backup<br>BACKUP AS COMPRESSED BACKUPSET DATABASE;</pre><pre># Archive current redo<br>SQL &#39;ALTER SYSTEM ARCHIVE LOG CURRENT&#39;;</pre><pre># Backup archive logs<br>BACKUP AS COMPRESSED BACKUPSET ARCHIVELOG ALL;</pre><pre># Backup control file<br>BACKUP CURRENT CONTROLFILE;</pre><pre># Backup SPFILE<br>BACKUP SPFILE;</pre><pre># Check backups<br>LIST BACKUP SUMMARY;</pre><pre># Validate restore from backup<br>RESTORE DATABASE VALIDATE;</pre><pre># Shutdown<br>SHUTDOWN IMMEDIATE;</pre><pre># Listener<br>lsnrctl status<br>lsnrctl stop<br>lsnrctl start</pre><pre># Startup<br>STARTUP;</pre><h3>Final Takeaway</h3><p>For a production DBA, shutdown and startup is not a two-command activity.</p><p>The real procedure is:</p><p><strong>Know where you are. Take the backup. Verify it. Shut down cleanly. Confirm Oracle is down. After the infrastructure activity, verify the environment, start Oracle, and prove that the database is healthy.</strong></p><p>And for students, remember one rule:</p><p><strong>Never trust a production backup only because the backup command finished. Check it before you depend on it.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1cb9db4dd223" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PostgreSQL Architecture for an Oracle DBA]]></title>
            <link>https://medium.com/@sonisharmadataops/postgresql-architecture-for-an-oracle-dba-cab30019474b?source=rss-fc3fd6b55ed5------2</link>
            <guid isPermaLink="false">https://medium.com/p/cab30019474b</guid>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[oracle-database]]></category>
            <category><![CDATA[postgresql-database]]></category>
            <dc:creator><![CDATA[Soni Sharma ]]></dc:creator>
            <pubDate>Sun, 26 Jul 2026 17:24:20 GMT</pubDate>
            <atom:updated>2026-07-26T17:24:20.112Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3k6vtKzOSwPxNK5YSZ3tGg.png" /></figure><p>One important lesson when moving from Oracle to PostgreSQL is:</p><p><strong>Do not try to find an exact Oracle equivalent for every PostgreSQL component.</strong></p><p>Oracle and PostgreSQL are both relational database management systems, but their internal architectures are different.</p><p>Understanding those differences is more useful than memorising a mapping table.</p><h3>1. PostgreSQL Cluster</h3><p>The word <strong>cluster</strong> can initially confuse Oracle DBAs.</p><p>In PostgreSQL, a database cluster generally means a <strong>collection of databases managed by one PostgreSQL server installation/instance of the server using one data directory</strong>.</p><p>It does <strong>not automatically mean RAC-style clustering</strong>.</p><p>A PostgreSQL server can contain multiple databases:</p><pre>PostgreSQL Cluster<br>        |<br>        |---- postgres<br>        |<br>        |---- application_db<br>        |<br>        |---- reporting_db<br>        |<br>        |---- training_db</pre><p>Each database can contain schemas, and schemas contain objects such as tables, views, sequences and functions.</p><p>Conceptually:</p><pre>PostgreSQL Cluster<br>        ↓<br>     Database<br>        ↓<br>      Schema<br>        ↓<br> Tables / Views / Sequences / Functions</pre><p>Understanding this hierarchy early makes many PostgreSQL concepts easier.</p><p><strong>2. The PostgreSQL Server Process</strong></p><p>When PostgreSQL starts, the main server process traditionally called the <strong>postmaster</strong> is responsible for managing the server and accepting incoming connections.</p><p>A simplified view is:</p><pre>Client<br>                 |<br>                 v<br>        PostgreSQL Server<br>          (postmaster)<br>                 |<br>        -------------------<br>        |        |        |<br>        v        v        v<br>     Backend  Backend  Backend<br>     Process  Process  Process</pre><pre>PostgreSQL traditionally uses a process-per-connection architecture.</pre><p>When clients connect, PostgreSQL creates backend processes to handle their sessions.</p><p>For Oracle DBAs, this is an area worth studying rather than trying to directly map PostgreSQL processes to Oracle PMON, SMON, DBWn and LGWR.</p><h3>3. PostgreSQL Background Processes</h3><p>Oracle DBAs are familiar with:</p><pre>DBWn<br>LGWR<br>CKPT<br>SMON<br>PMON<br>ARCn<br>MMON</pre><p>PostgreSQL has its own background processes and mechanisms.</p><p>Some important ones include:</p><p><strong>Checkpointer</strong> -participates in checkpoint processing.</p><p><strong>Background Writer-</strong>helps write dirty shared buffers to storage.</p><p><strong>WAL Writer</strong> -writes WAL buffers to WAL files.</p><p><strong>Autovacuum-</strong>automatically performs vacuum/analyse-related maintenance where required.</p><p><strong>Archiver-</strong>archives completed WAL segments when WAL archiving is configured.</p><p>You do not need to memorise every process on day one.</p><p>Understand <strong>why each process exists</strong> and then observe them in your lab.</p><p><strong>4. Shared Memory</strong></p><p>Oracle DBAs already understand the importance of memory management through the SGA and PGA.</p><p>PostgreSQL also uses shared memory and per-session/per-operation memory, but its memory model and parameters are different.</p><p>One of the first parameters you will encounter is:</p><pre>shared_buffers</pre><p>You will later encounter parameters such as:</p><pre>work_mem<br>maintenance_work_mem<br>effective_cache_size<br>wal_buffers</pre><p>Do not simply assume:</p><p><strong>SGA = shared_buffers</strong></p><p>That is an oversimplification.</p><p>Instead, understand what each PostgreSQL parameter controls and how PostgreSQL also relies heavily on the operating system’s filesystem cache.</p><h3>5. WAL -Write-Ahead Logging</h3><p>For an Oracle DBA, WAL is one of the most important PostgreSQL concepts to learn.</p><p>Oracle has redo.</p><p>PostgreSQL has <strong>WAL -Write-Ahead Log</strong>.</p><p>The basic idea is durability: the required WAL record is written before the corresponding changed data page needs to be persisted to its final location.</p><p>A simplified flow is:</p><pre>Application<br>     |<br>     v<br>Transaction<br>     |<br>     v<br>Data Modification<br>     |<br>     +-----------&gt; WAL<br>     |<br>     v<br>Changed Data Pages</pre><pre>WAL is fundamental to PostgreSQL features such as:</pre><p><strong>Crash recovery</strong></p><p><strong>Point-in-Time Recovery</strong></p><p><strong>Physical replication</strong></p><p><strong>Backup and recovery</strong></p><p>So when learning PostgreSQL, don’t stop at:</p><p><em>WAL = Oracle Redo</em></p><p>Go deeper.</p><p>Learn:</p><p><strong>WAL segments</strong></p><p><strong>LSN — Log Sequence Number</strong></p><p><strong>Checkpoints</strong></p><p><strong>WAL archiving</strong></p><p><strong>Recovery</strong></p><p><strong>Replication</strong></p><p>That knowledge becomes critical when you move into production administration.</p><h3>6. MVCC, VACUUM and Autovacuum</h3><p>This is one area where Oracle DBAs should spend extra time.</p><p>PostgreSQL uses <strong>MVCC — Multi-Version Concurrency Control</strong>.</p><p>Consider:</p><pre>UPDATE employee<br>SET salary = 70000<br>WHERE employee_id = 101;</pre><pre>At a simplified level, PostgreSQL does not just overwrite the old tuple in place.</pre><p>The update creates a new tuple version, while the old version can remain until it is no longer visible to transactions and can eventually be cleaned up.</p><p>That introduces concepts such as:</p><pre>MVCC<br>  ↓<br>Old Tuple Versions<br>  ↓<br>Dead Tuples<br>  ↓<br>VACUUM<br>  ↓<br>Autovacuum</pre><pre>If dead tuples accumulate excessively, they can contribute to table/index bloat and performance issues.</pre><p>This is why <strong>VACUUM and autovacuum are not optional topics for a PostgreSQL DBA</strong>.</p><p>Learn them early.</p><p>Oracle vs PostgreSQL -A DBA’s Quick Reference</p><p>Here is a useful starting point, but remember that these are conceptual comparisons rather than exact equivalents.</p><p><strong>SQL*Plus | </strong><strong>psql</strong><br> Oracle DBAs use SQL*Plus as a command-line interface, while PostgreSQL provides psql.</p><p><strong>Redo Logs | WAL</strong><br> Oracle uses redo logs to record database changes. PostgreSQL uses <strong>Write-Ahead Logging (WAL)</strong>.</p><p><strong>Archived Redo Logs | Archived WAL</strong><br> Oracle archives redo logs for recovery. PostgreSQL can archive completed WAL segments for recovery and replication purposes.</p><p><strong>Data Dictionary | System Catalogs</strong><br> Oracle provides dictionary views such as DBA_USERS and DBA_TABLES. PostgreSQL provides system catalogs such as pg_database, pg_roles, and pg_class.</p><p><strong>PFILE / SPFILE | </strong><strong>postgresql.conf</strong><br> Oracle uses PFILE and SPFILE for database parameters. PostgreSQL primarily uses postgresql.conf for server configuration.</p><p><strong>Oracle Network Configuration | </strong><strong>postgresql.conf and </strong><strong>pg_hba.conf</strong><br> PostgreSQL uses configuration settings along with pg_hba.conf to control client authentication and database access.</p><p><strong>RMAN | Physical Backup and Recovery</strong><br> PostgreSQL does not have an exact RMAN equivalent. Native capabilities include pg_basebackup, WAL archiving, and Point-in-Time Recovery (PITR), supplemented by third-party backup tools.</p><p><strong>Data Pump | </strong><strong>pg_dump and </strong><strong>pg_restore</strong><br> For logical backup and restore, PostgreSQL provides pg_dump, pg_restore, and pg_dumpall.</p><p><strong>AWR / ASH | PostgreSQL Statistics and Monitoring</strong><br> PostgreSQL provides statistics views and extensions such as pg_stat_activity and pg_stat_statements, along with external monitoring tools.</p><p><strong>Data Guard | Streaming Replication</strong><br> PostgreSQL supports physical streaming replication for primary and standby architectures. The capabilities and architecture differ from Oracle Data Guard, so this is a conceptual comparison rather than an exact equivalent.</p><p><strong>SCN | LSN</strong><br> PostgreSQL uses <strong>Log Sequence Numbers (LSNs)</strong> to represent positions in the WAL stream. Oracle SCNs and PostgreSQL LSNs are related to change/recovery tracking but are <strong>not direct equivalents</strong>.</p><p><strong><em>Oracle DBA Tip:</em></strong><em> Use these comparisons to make PostgreSQL easier to understand initially, but avoid looking for a one-to-one Oracle equivalent for every PostgreSQL component. Focus on how PostgreSQL implements each concept.</em></p><p>Use these comparisons to understand a concept.</p><p>Do not use them to assume both databases behave identically.</p><h3>How Much Time Does It Take to Learn PostgreSQL?</h3><p>There is no exact number because it depends on your Oracle experience and how much time you spend practising.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cab30019474b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Much Time Does It Take to Learn PostgreSQL If You’re Already an Oracle DBA?]]></title>
            <link>https://medium.com/@sonisharmadataops/how-much-time-does-it-take-to-learn-postgresql-if-youre-already-an-oracle-dba-edc56fd0c2a5?source=rss-fc3fd6b55ed5------2</link>
            <guid isPermaLink="false">https://medium.com/p/edc56fd0c2a5</guid>
            <category><![CDATA[postgresql-database]]></category>
            <category><![CDATA[postgresql-tutorials]]></category>
            <category><![CDATA[postgresql]]></category>
            <dc:creator><![CDATA[Soni Sharma ]]></dc:creator>
            <pubDate>Sun, 26 Jul 2026 16:54:26 GMT</pubDate>
            <atom:updated>2026-07-26T16:54:26.577Z</atom:updated>
            <content:encoded><![CDATA[<p>A Practical Beginner-to-Advanced Roadmap for Oracle DBAs Moving to PostgreSQL</p><p>If you have been working as an Oracle DBA and are thinking about learning PostgreSQL, one of the first questions that probably comes to mind is:</p><p><strong>“How much time will it take?”</strong></p><p>The good news is that you are <strong>not starting from zero</strong>.</p><p>As an Oracle DBA, you already understand databases, SQL, transactions, backup and recovery, users and privileges, tablespaces, performance tuning, high availability, Linux, monitoring, and production troubleshooting.</p><p>What you need to learn is <strong>how PostgreSQL approaches those same problems differently</strong>.</p><p>With regular hands-on practice, an experienced Oracle DBA can become comfortable with PostgreSQL fundamentals in around <strong>2–4 weeks</strong>, start handling common PostgreSQL DBA activities in <strong>4–8 weeks</strong>, and build a solid working foundation in approximately <strong>2–3 months</strong>.</p><p>That doesn’t make someone a PostgreSQL expert in three months. Real expertise comes from production experience, troubleshooting, failures, recovery scenarios, performance problems, upgrades, and migrations.</p><p>But the transition is much faster than learning database administration for the first time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lF0R_HXDGlNbW7y8Hu2cwA.png" /></figure><h3>Why PostgreSQL Is Easier to Learn When You Already Know Oracle</h3><p>When I started exploring PostgreSQL, many concepts immediately felt familiar.</p><p>A database is still a database.</p><p>We still need to answer the same questions:</p><p>How is data stored?</p><p>How are users authenticated?</p><p>How do we take backups?</p><p>How do we recover after a failure?</p><p>How do we identify slow SQL?</p><p>How do we manage memory?</p><p>How do we replicate data to another server?</p><p>How do we monitor sessions?</p><p>How do we troubleshoot blocking?</p><p>How do we protect the database?</p><p>The <strong>requirements are similar. The implementation is different.</strong></p><p>For example, an Oracle DBA is familiar with concepts such as:</p><p><strong>SGA, PGA, DBWn, LGWR, CKPT, redo logs, archive logs, RMAN, Data Guard, tablespaces, datafiles and SQL*Plus.</strong></p><p>In PostgreSQL, you will start hearing:</p><p><strong>shared_buffers, work_mem, WAL, WAL writer, checkpointer, autovacuum, pg_dump, pg_restore, pg_basebackup, streaming replication and psql.</strong></p><p>This is why your Oracle knowledge becomes an advantage.</p><p>Instead of learning <em>why backup and recovery are required</em>, you are learning <strong>how PostgreSQL performs backup and recovery</strong>.</p><h3>My PostgreSQL 15 Lab Setup</h3><p>For this learning journey, I installed <strong>PostgreSQL 15 on Linux</strong> and started with basic validation.</p><p>The screenshot below is from my PostgreSQL 15 lab after completing the setup.</p><p>The first commands I recommend running are:</p><p>SELECT version();</p><p>SELECT current_database();</p><p>SELECT current_user;</p><p>SELECT datname<br>FROM pg_database;</p><p>\duThese simple commands confirm the PostgreSQL version, current database, connected user, available databases, and roles.</p><p>For an Oracle DBA, you can already start making associations:</p><p>Oracle PostgreSQL<br> — — — — — — — — — — — — — — — — — — — — — — — — <br>SQL*Plus psql<br>DBA_USERS \du / pg_roles<br>V$DATABASE current_database()<br>SELECT * FROM v$version SELECT version()</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rFXtVGfskSlXchCjQ-P92w.png" /></figure><p>And this is where the learning becomes interesting.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=edc56fd0c2a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Oracle Performance Tuning: The Role of HugePages,]]></title>
            <link>https://medium.com/@sonisharmadataops/oracle-performance-tuning-the-role-of-hugepages-87f3489e12d1?source=rss-fc3fd6b55ed5------2</link>
            <guid isPermaLink="false">https://medium.com/p/87f3489e12d1</guid>
            <category><![CDATA[dba]]></category>
            <category><![CDATA[performance-tuning]]></category>
            <dc:creator><![CDATA[Soni Sharma ]]></dc:creator>
            <pubDate>Tue, 30 Jun 2026 15:51:14 GMT</pubDate>
            <atom:updated>2026-06-30T15:51:14.024Z</atom:updated>
            <content:encoded><![CDATA[<h2>Oracle Performance Tuning: The Role of HugePages, Memory Calculation, Database Size, and OS-Level Parameters</h2><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*HoZVrOdJMdwoBWE4wOz5vA@2x.jpeg" /></figure><p>Introduction</p><p>Oracle database performance is heavily influenced by how efficiently memory resources are allocated and managed. Improper memory configuration can lead to excessive CPU utilization, paging, swapping, and overall poor database performance.</p><p>Among the critical components of Oracle memory management, HugePages play a significant role in optimizing large memory environments. However, HugePages sizing cannot be performed in isolation. Factors such as database size, workload characteristics, Oracle memory requirements (SGA/PGA), and operating system kernel parameters must all be considered.</p><p>This article explains the importance of HugePages, how database size impacts memory sizing, and the essential operating system parameters required for optimal Oracle database performance.</p><ol><li>Understanding Oracle Memory Architecture</li></ol><p>Oracle memory is broadly divided into two major areas:</p><p>System Global Area (SGA)</p><p>The SGA is a shared memory region that stores:</p><ul><li>Database Buffer Cache</li><li>* Shared Pool</li><li>* Large Pool</li><li>* Java Pool</li><li>* Streams Pool</li><li>* Redo Log Buffer</li></ul><p>The SGA is allocated when the database instance starts and is shared among all user processes.</p><p>Program Global Area (PGA)</p><p>PGA is private memory allocated to each server process. It contains:</p><ul><li>Sort areas</li><li>* Hash areas</li><li>* Session information</li><li>* Stack space</li></ul><p>Unlike the SGA, PGA is not shared.</p><p>Total Oracle Memory = SGA + PGA</p><p>⸻</p><p>2. How Database Size Influences Memory Sizing</p><p>Database size alone does not determine memory requirements, but it significantly impacts memory planning.</p><p>Small Databases (&lt; 500 GB)</p><p>Typical characteristics:</p><ul><li>Lower concurrent users</li><li>* Smaller buffer cache requirement</li><li>* Moderate SQL workload</li></ul><p>Example:</p><ul><li>SGA: 4 – 16 GB</li><li>* PGA: 2 – 8 GB</li></ul><p>Medium Databases (500 GB – 5 TB)</p><p>Typical characteristics:</p><ul><li>High transaction volume</li><li>* Larger working data set</li><li>* Increased SQL execution</li></ul><p>Example:</p><ul><li>SGA: 16 – 128 GB</li><li>* PGA: 8 – 64 GB</li></ul><p>Large Databases (&gt; 5 TB)</p><p>Typical characteristics:</p><ul><li>Thousands of concurrent sessions</li><li>* Heavy OLTP or mixed workloads</li><li>* Large buffer cache requirement</li></ul><p>Example:</p><ul><li>SGA: 128 GB to several TB</li><li>* PGA: 64 GB to hundreds of GB</li></ul><p>For example:</p><p>A 20 TB production database supporting 500+ retail stores may require:</p><ul><li>SGA = 300 GB</li><li>* PGA = 100 GB</li></ul><p>Total Oracle Memory:</p><p>300 GB + 100 GB = 400 GB</p><p>However, the final sizing should always consider:</p><ul><li>Active data set size</li><li>* Concurrent users</li><li>* Workload type (OLTP/DSS)</li><li>* SQL execution patterns</li><li>* AWR recommendations</li><li>* Historical memory utilization</li></ul><p>⸻</p><p>3. Why HugePages Are Important</p><p>Linux normally manages memory using 4 KB pages.</p><p>For very large SGAs, Oracle may require millions of memory pages.</p><p>Example:</p><p>SGA = 256 GB</p><p>256 GB / 4 KB</p><p>≈ 67 million pages</p><p>Managing millions of small pages creates significant overhead.</p><p>HugePages solve this problem by using larger memory pages, typically:</p><p>2 MB per page</p><p>For the same 256 GB SGA:</p><p>256 GB / 2 MB</p><p>= 131072 HugePages</p><p>This drastically reduces page table entries and CPU overhead.</p><p>⸻</p><p>4. Benefits of HugePages</p><p>a) Reduced CPU Consumption</p><p>The operating system maintains fewer page tables.</p><p>Result:</p><ul><li>Lower CPU usage</li><li>* Faster memory access</li></ul><p>b) Prevents Swapping</p><p>SGA memory allocated using HugePages is locked into physical RAM.</p><p>This prevents:</p><p>Paging</p><p>Swapping</p><p>Performance degradation</p><p>c) Improved Throughput</p><p>Large production databases often experience:</p><ul><li>Faster SQL execution</li><li>* Reduced latency</li><li>* Better response times</li></ul><p>d) Faster Instance Startup</p><p>Oracle can map fewer pages during startup.</p><p>e) Lower TLB Misses</p><p>HugePages improve CPU cache efficiency by reducing Translation Lookaside Buffer (TLB) misses.</p><p>⸻</p><p>5. HugePages Calculation</p><p>HugePages are primarily calculated based on SGA size.</p><p>Example</p><p>Assume:</p><p>SGA_TARGET = 300 GB</p><p>HugePage Size = 2 MB</p><p>Calculation:</p><p>300 GB × 1024 = 307200 MB</p><p>307200 MB / 2 MB</p><p>= 153600 HugePages</p><p>Linux parameter:</p><p>vm.nr_hugepages=153600</p><p>Always leave additional memory for:</p><ul><li>Operating system</li><li>* PGA</li><li>* File system cache</li><li>* Monitoring tools</li><li>* Backup utilities</li></ul><p>Example:</p><p>Server RAM = 512 GB</p><p>Recommended allocation:</p><p>SGA = 300 GB</p><p>PGA = 100 GB</p><p>OS Reserve = 50 GB</p><p>Others = 20 GB</p><p>HugePages should only cover the SGA portion.</p><p>⸻</p><p>6. Determining Memory Allocation</p><p>A commonly used guideline:</p><p>OLTP Systems</p><p>SGA = 60 – 70% of RAM</p><p>PGA = 20 – 25% of RAM</p><p>OS = Remaining memory</p><p>DSS/Data Warehouse Systems</p><p>SGA = 50 – 60%</p><p>PGA = 30 – 40%</p><p>OS = Remaining</p><p>Example:</p><p>Server RAM = 256 GB</p><p>SGA = 160 GB</p><p>PGA = 60 GB</p><p>OS Reserve = 36 GB</p><p>⸻</p><p>7. Essential OS-Level Kernel Parameters</p><p>Proper Linux kernel tuning is equally important.</p><p>Shared Memory Parameters</p><p>kernel.shmmax</p><p>Defines maximum size of a shared memory segment.</p><p>Example:</p><p>kernel.shmmax=171798691840</p><p>(For 160 GB SGA)</p><p>kernel.shmall</p><p>Defines total shared memory pages.</p><p>Calculation:</p><p>kernel.shmall = shmmax / PAGE_SIZE</p><p>Example:</p><p>171798691840 / 4096</p><p>= 41943040</p><p>⸻</p><p>Semaphores</p><p>Oracle uses semaphores for process synchronization.</p><p>kernel.sem = 250 32000 100 128</p><p>Format:</p><p>SEMMSL SEMMNS SEMOPM SEMMNI</p><p>⸻</p><p>File Descriptors</p><p>Maximum number of open files:</p><p>fs.file-max = 6815744</p><p>⸻</p><p>Network Parameters</p><p>net.core.rmem_default = 262144</p><p>net.core.rmem_max = 4194304</p><p>net.core.wmem_default = 262144</p><p>net.core.wmem_max = 1048576</p><p>Useful for:</p><ul><li>Data Guard</li><li>* RMAN</li><li>* RAC interconnect</li></ul><p>⸻</p><p>8. User Resource Limits</p><p>In /etc/security/limits.conf:</p><p>oracle soft nofile 1024</p><p>oracle hard nofile 65536</p><p>oracle soft nproc 2047</p><p>oracle hard nproc 16384</p><p>oracle soft stack 10240</p><p>oracle hard stack 32768</p><p>oracle soft memlock unlimited</p><p>oracle hard memlock unlimited</p><p>memlock is mandatory for HugePages.</p><p>⸻</p><p>9. Monitoring HugePages</p><p>Check HugePages configuration:</p><p>grep Huge /proc/meminfo</p><p>Sample output:</p><p>HugePages_Total: 153600</p><p>HugePages_Free: 1200</p><p>HugePages_Rsvd: 1500</p><p>HugePages_Surp: 0</p><p>Hugepagesize: 2048 kB</p><p>Verify Oracle usage:</p><p>grep Huge /proc/meminfo</p><p>If HugePages_Free remains very high after database startup, Oracle may not be using HugePages correctly.</p><p>⸻</p><p>Conclusion</p><p>Memory tuning is one of the most critical aspects of Oracle database performance optimization. Database size, workload characteristics, and concurrent activity directly influence SGA and PGA sizing. HugePages significantly enhance performance by reducing CPU overhead, preventing swapping, and improving memory management efficiency.</p><p>For large enterprise databases, proper HugePages configuration combined with optimized Linux kernel parameters ensures stable, scalable, and high-performing Oracle environments.</p><p>A well-tuned Oracle server is not achieved merely by increasing RAM; it is achieved through intelligent memory planning, correct HugePages sizing, and proper operating system tuning.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87f3489e12d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Oracle Patching: The 10-Minute Checklist That Can Save U 10 Hours of Troubleshooting]]></title>
            <link>https://medium.com/@sonisharmadataops/oracle-patching-the-10-minute-checklist-that-can-save-u-10-hours-of-troubleshooting-6018ea7604f6?source=rss-fc3fd6b55ed5------2</link>
            <guid isPermaLink="false">https://medium.com/p/6018ea7604f6</guid>
            <category><![CDATA[performance-optimization]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[dba]]></category>
            <category><![CDATA[database-administration]]></category>
            <category><![CDATA[database-design]]></category>
            <dc:creator><![CDATA[Soni Sharma ]]></dc:creator>
            <pubDate>Mon, 22 Jun 2026 14:29:46 GMT</pubDate>
            <atom:updated>2026-06-22T14:29:46.332Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*dbnXQnQaVb1mnWYkmxjPxg@2x.jpeg" /></figure><p>Last week, one of my LinkedIn connections reached out to me while performing an Oracle DBaaS/ExaCS database upgrade. The upgrade was failing with internal errors, and after several rounds of troubleshooting, the root cause turned out to be something very basic.</p><p>Disk space.</p><p>That conversation reminded me of an important lesson:</p><p>Most patch failures don’t happen because of the patch. They happen because we skip the prerequisites.</p><p>After working on Oracle environments, I’ve realized that a simple pre-patching checklist can save hours of debugging.</p><p>Step 1: Read the Patch README</p><p>Before downloading or applying anything, read the README carefully.</p><p>It tells u:</p><ul><li>Supported Oracle versions</li><li>* Required OPatch version</li><li>* Conflicts with existing patches</li><li>* Special instructions</li><li>* Post-patch activities</li></ul><p>Skipping the README is the fastest way to create unnecessary issues.</p><p>Step 2: Verify OPatch Version</p><p>$ORACLE_HOME/OPatch/opatch version</p><p>Always ensure the installed OPatch version matches the patch requirement.</p><p>Step 3: Check Oracle Inventory</p><p>$ORACLE_HOME/OPatch/opatch lsinventory</p><p>Verify:</p><ul><li>Oracle Home is healthy</li><li>* Previous patches are correctly registered</li><li>* No inventory corruption exists</li></ul><p>Step 4: Run Conflict Checks</p><p>One command I never skip:</p><p>opatch prereq CheckConflictAgainstOHWithDetail \</p><p>-phBaseDir &lt;patch_location&gt;</p><p>This helps identify incompatible patches before they become production problems.</p><p>Whether u’re patching:</p><ul><li>Standalone Database</li><li>* RAC</li><li>* DBaaS</li><li>* ExaCS</li></ul><p>This step is critical.</p><p>Step 5: Verify Disk Space</p><p>Don’t just check one filesystem.</p><p>Run:</p><p>df -h</p><p>Check:</p><ul><li>Oracle Home</li><li>* Grid Home</li><li>* /tmp</li><li>* Archive destinations</li><li>* Backup locations</li></ul><p>Low disk space can trigger misleading internal errors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*MnNq6IUg24mWx5KHhzTAWA@2x.jpeg" /></figure><p>Step 6: Validate Cluster Health (RAC / ExaCS)</p><p>Before patching:</p><p>crsctl check cluster -all</p><p>crsctl stat res -t</p><p>Ensure all resources are ONLINE.</p><p>Step 7: Verify Invalid Components</p><p>SELECT comp_name, status</p><p>FROM dba_registry;</p><p>Everything should ideally be VALID.</p><p>Then check invalid objects:</p><p>SELECT COUNT(*)</p><p>FROM dba_objects</p><p>WHERE status=’INVALID’;</p><p>If required:</p><p>@?/rdbms/admin/utlrp.sql</p><p>⸻</p><p>Step 8: Take a Valid Backup</p><p>Never patch production without a rollback plan.</p><p>Verify:</p><ul><li>RMAN backup</li><li>* Restore strategy</li><li>* Recovery window</li><li>* Snapshot (if available)</li></ul><p>A backup is useful only if it can actually be restored.</p><p>⸻</p><p>Step 9: Monitor During Patching</p><p>Keep an eye on:</p><ul><li>Alert log</li><li>* OPatch logs</li><li>* sqlpatch logs</li><li>* CRS status</li><li>* Disk utilization</li></ul><p>The first error is usually the real error.</p><p>Everything after that is often a side effect.</p><p>⸻</p><p>Step 10: Validate After Patching</p><p>Confirm the database version:</p><p>SELECT * FROM v$version;</p><p>Check SQL patches:</p><p>SELECT patch_id,</p><p>. action,</p><p>. status</p><p>FROM dba_registry_sqlpatch;</p><p>Verify services, applications, and listener status before handing the environment back to users.</p><p>My biggest takeaway</p><p>In my experience, 90% of Oracle patching issues are caused by missing prerequisites, not Oracle itself.</p><p>I’ve seen failures caused by:</p><ul><li>Low disk space</li><li>* Patch conflicts</li><li>* Wrong OPatch version</li><li>* Inventory issues</li><li>* Invalid components</li><li>* Skipped prerequisite checks</li></ul><p>We often spend hours investigating an “internal error” that could have been avoided with a 10-minute validation.</p><p>Final Thought</p><p>The best DBA isn’t the one who fixes patch failures the fastest.</p><p>It’s the one who prevents them before they happen.</p><p>Before ur next maintenance window, ask urself one question:</p><p>“Have I really completed all the prerequisites?”</p><p>That answer might save u an entire night of troubleshooting.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6018ea7604f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>