<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: pouya basiri</title>
    <description>The latest articles on DEV Community by pouya basiri (@pouya_basiri).</description>
    <link>https://dev.to/pouya_basiri</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4263920%2F2cab5c73-2479-4053-88c0-835903e75c0c.png</url>
      <title>DEV Community: pouya basiri</title>
      <link>https://dev.to/pouya_basiri</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pouya_basiri"/>
    <language>en</language>
    <item>
      <title>OraclePoolLab: Understanding Connection Pooling Through Reproducible Experiments</title>
      <dc:creator>pouya basiri</dc:creator>
      <pubDate>Mon, 30 Nov 2026 11:57:23 +0000</pubDate>
      <link>https://dev.to/pouya_basiri/oraclepoollab-understanding-connection-pooling-through-reproducible-experiments-1coj</link>
      <guid>https://dev.to/pouya_basiri/oraclepoollab-understanding-connection-pooling-through-reproducible-experiments-1coj</guid>
      <description>&lt;p&gt;&lt;strong&gt;OraclePoolLab&lt;/strong&gt; is a .NET 8+ console application that turns Oracle connection pooling assumptions into measurable, reproducible experiments. Investigate connection lifecycles, pool exhaustion, transaction enlistment, and performance characteristics in a safe, isolated environment.&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;Repository&lt;/strong&gt;: &lt;a href="https://github.com/PouyaBasiri/OracleLab" rel="noopener noreferrer"&gt;PouyaBasiri/OracleLab&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Oracle connection pooling is powerful but misunderstood. Developers often ask:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;❓ What happens when I open a connection and forget to dispose of it?&lt;/li&gt;
&lt;li&gt;❓ How does &lt;code&gt;TransactionScope&lt;/code&gt; interact with the connection pool?&lt;/li&gt;
&lt;li&gt;❓ Why is my first query slow, but subsequent ones are fast?&lt;/li&gt;
&lt;li&gt;❓ What does &lt;code&gt;ClearPool&lt;/code&gt; actually do?&lt;/li&gt;
&lt;li&gt;❓ How do dead pooled connections behave?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These questions are hard to answer without hands-on experimentation. Reading documentation isn't enough—you need to &lt;em&gt;see&lt;/em&gt; the pool in action.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Solution: OraclePoolLab
&lt;/h2&gt;

&lt;p&gt;OraclePoolLab provides &lt;strong&gt;eight reproducible scenarios&lt;/strong&gt; that let you observe connection pooling behavior in real time, with diagnostics from Oracle's &lt;code&gt;V$SESSION&lt;/code&gt; system view.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Scenarios
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. &lt;strong&gt;&lt;code&gt;check&lt;/code&gt;&lt;/strong&gt; — Verify Connectivity
&lt;/h4&gt;

&lt;p&gt;Print ODP.NET and Oracle versions. Confirm your environment is set up correctly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dotnet run -- check
&lt;span class="c"&gt;# Output:&lt;/span&gt;
&lt;span class="c"&gt;#   ODP.NET assembly : 23.1.0.0&lt;/span&gt;
&lt;span class="c"&gt;#   Server version   : 11.2.0.4.0&lt;/span&gt;
&lt;span class="c"&gt;#   Current user     : APP_USER&lt;/span&gt;
&lt;span class="c"&gt;#   Service name     : MYSERVICE&lt;/span&gt;
&lt;span class="c"&gt;#   Connection OK.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  2. &lt;strong&gt;&lt;code&gt;leak&lt;/code&gt;&lt;/strong&gt; — Connection Leak Demonstration
&lt;/h4&gt;

&lt;p&gt;Compare &lt;strong&gt;buggy code&lt;/strong&gt; (leaked connections) with &lt;strong&gt;proper code&lt;/strong&gt; (using &lt;code&gt;await using&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Leaked code blocks the pool until connections timeout. Proper disposal recycles connections immediately.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Buggy: Connection never returned to pool&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;conn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;OracleConnection&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;connStr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;OpenAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// Oops—no dispose!&lt;/span&gt;

&lt;span class="c1"&gt;// Proper: Connection returned immediately&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;conn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;OracleConnection&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;connStr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;OpenAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// Connection recycled automatically&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  3. &lt;strong&gt;&lt;code&gt;exhaust&lt;/code&gt;&lt;/strong&gt; — Pool Exhaustion Under Slow Queries
&lt;/h4&gt;

&lt;p&gt;Simulate a scenario where all pool connections are blocked by slow queries. Watch the pool deplete in real time without any leaks.&lt;/p&gt;

&lt;p&gt;This demonstrates the difference between:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Leaks&lt;/strong&gt; (connections lost forever)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Exhaustion&lt;/strong&gt; (all connections temporarily in use)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  4. &lt;strong&gt;&lt;code&gt;clearpool&lt;/code&gt;&lt;/strong&gt; — Understand &lt;code&gt;ClearPool&lt;/code&gt; Behavior
&lt;/h4&gt;

&lt;p&gt;Investigate what happens when you call &lt;code&gt;OracleConnection.ClearPool()&lt;/code&gt; on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Idle connections (recycled)&lt;/li&gt;
&lt;li&gt;In-use connections (behavior varies by version)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  5. &lt;strong&gt;&lt;code&gt;scope&lt;/code&gt;&lt;/strong&gt; — &lt;code&gt;TransactionScope&lt;/code&gt; and Connection Retention
&lt;/h4&gt;

&lt;p&gt;Does a &lt;code&gt;TransactionScope&lt;/code&gt; keep the connection checked out, or is it released back to the pool?&lt;/p&gt;

&lt;p&gt;Examine real behavior with actual timings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;scope&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;TransactionScope&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;conn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;OracleConnection&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;connStr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;conn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;OpenAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// Connection remains checked out until scope.Complete()&lt;/span&gt;
&lt;span class="n"&gt;scope&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Complete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// Now connection is recycled&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  6. &lt;strong&gt;&lt;code&gt;warmup&lt;/code&gt;&lt;/strong&gt; — Cold vs. Warm Pool Performance
&lt;/h4&gt;

&lt;p&gt;Compare startup performance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cold pool&lt;/strong&gt;: First request takes ~341 ms (from scratch)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Warm pool&lt;/strong&gt;: Pre-warmed with &lt;code&gt;Min Pool Size = 5&lt;/code&gt; takes ~4 ms&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This shows the massive impact of connection pre-warming.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Cold pool first burst:  341 ms
Warm pool first burst:    4 ms
Speedup:               85x faster
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  7. &lt;strong&gt;&lt;code&gt;deadconn&lt;/code&gt;&lt;/strong&gt; — Dead Pooled Connections (Interactive)
&lt;/h4&gt;

&lt;p&gt;Investigate what happens when a session is terminated on the server while the connection is in the pool.&lt;/p&gt;

&lt;p&gt;This requires DBA privileges to kill a session, so it's interactive.&lt;/p&gt;

&lt;h4&gt;
  
  
  8. &lt;strong&gt;&lt;code&gt;all&lt;/code&gt;&lt;/strong&gt; — Run Everything
&lt;/h4&gt;

&lt;p&gt;Execute all non-interactive scenarios in sequence:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dotnet run -- all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Why This Matters
&lt;/h2&gt;

&lt;p&gt;Connection pooling is &lt;strong&gt;invisible by default&lt;/strong&gt;. When something goes wrong, the symptoms are vague:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"The app hangs after a while"&lt;/li&gt;
&lt;li&gt;"It works fine the first time, but then slows down"&lt;/li&gt;
&lt;li&gt;"Database sessions keep piling up"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With OraclePoolLab, you can:&lt;/p&gt;

&lt;p&gt;✅ &lt;strong&gt;Reproduce issues locally&lt;/strong&gt; in a controlled environment&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Measure behavior&lt;/strong&gt; with timing and session counts&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Verify assumptions&lt;/strong&gt; before they bite you in production&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Learn pooling internals&lt;/strong&gt; by running experiments&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Document findings&lt;/strong&gt; for your team  &lt;/p&gt;


&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;.NET SDK 8.0+&lt;/strong&gt; (supports newer runtimes via RollForward)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Oracle test database&lt;/strong&gt; (not production!)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database account&lt;/strong&gt; with &lt;code&gt;CREATE SESSION&lt;/code&gt; privilege&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Optional for advanced scenarios:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;SELECT&lt;/code&gt; on &lt;code&gt;V$SESSION&lt;/code&gt; for session monitoring&lt;/li&gt;
&lt;li&gt;DBA access for session termination (&lt;code&gt;deadconn&lt;/code&gt; scenario)&lt;/li&gt;
&lt;li&gt;Procedure execution for sleep procedures (&lt;code&gt;exhaust&lt;/code&gt; scenario)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Configuration
&lt;/h3&gt;

&lt;p&gt;Provide the Oracle connection string via environment variable:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PowerShell:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="no"&gt;ORACLE_CONNSTR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"User Id=your_user;Password=***;Data Source=your_host:1521/your_service"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Bash / Zsh:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;ORACLE_CONNSTR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'User Id=your_user;Password=***;Data Source=your_host:1521/your_service'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Run an Experiment
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Clone and navigate to the project&lt;/span&gt;
git clone https://github.com/PouyaBasiri/OracleLab.git
&lt;span class="nb"&gt;cd&lt;/span&gt; OraclePoolLab

&lt;span class="c"&gt;# Verify connectivity&lt;/span&gt;
dotnet run -- check

&lt;span class="c"&gt;# Run the connection leak scenario&lt;/span&gt;
dotnet run -- leak

&lt;span class="c"&gt;# Compare cold vs. warm pool&lt;/span&gt;
dotnet run -- warmup

&lt;span class="c"&gt;# Monitor sessions in real time&lt;/span&gt;
dotnet run -- monitor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Implementation Highlights
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Session Tagging
&lt;/h3&gt;

&lt;p&gt;All connections are tagged with &lt;code&gt;MODULE = 'OraclePoolLab'&lt;/code&gt; so you can find them in &lt;code&gt;V$SESSION&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="no"&gt;SID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;SERIAL&lt;/span&gt;&lt;span class="c1"&gt;#, USERNAME, MODULE, STATUS&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="no"&gt;V&lt;/span&gt;&lt;span class="nv"&gt;$SESSION&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="no"&gt;MODULE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'OraclePoolLab'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This makes it easy to monitor exactly which sessions belong to your experiment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Separate Monitoring Connection
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;monitor&lt;/code&gt; scenario uses a &lt;strong&gt;non-pooled connection&lt;/strong&gt; to avoid consuming pool slots while observing the pool itself.&lt;/p&gt;

&lt;h3&gt;
  
  
  Thread Pool Tuning
&lt;/h3&gt;

&lt;p&gt;The app configures minimum 64 threads to prevent thread-pool ramp-up effects from distorting performance measurements.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="nc"&gt;ThreadPool&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;SetMinThreads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Real-World Scenarios
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Scenario: Why is my app hanging after 20 minutes?
&lt;/h3&gt;

&lt;p&gt;You might suspect a connection leak. Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dotnet run -- leak
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If it reproduces quickly at scale, you've likely found your issue. Check for missing &lt;code&gt;using&lt;/code&gt; statements or proper &lt;code&gt;DisposeAsync()&lt;/code&gt; calls.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scenario: First query is slow, then it's fast
&lt;/h3&gt;

&lt;p&gt;Classic cold-start issue! Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dotnet run -- warmup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This demonstrates pre-warming with &lt;code&gt;Min Pool Size&lt;/code&gt;. Add this to your connection string:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight properties"&gt;&lt;code&gt;&lt;span class="na"&gt;Min Pool Size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Scenario: Database says I have 500 sessions, but app only has 50 connections
&lt;/h3&gt;

&lt;p&gt;You've got a leak or enlistment issue. Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dotnet run -- scope
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Understand how &lt;code&gt;TransactionScope&lt;/code&gt; might be holding connections longer than you think.&lt;/p&gt;




&lt;h2&gt;
  
  
  What You'll Learn
&lt;/h2&gt;

&lt;p&gt;After running OraclePoolLab scenarios, you'll understand:&lt;/p&gt;

&lt;p&gt;📌 &lt;strong&gt;Connection Lifecycle&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How connections move from pool → in-use → back to pool&lt;/li&gt;
&lt;li&gt;What happens on disposal&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📌 &lt;strong&gt;Pool Mechanics&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How distinct connection strings get distinct pools&lt;/li&gt;
&lt;li&gt;Why &lt;code&gt;Min Pool Size&lt;/code&gt; matters for performance&lt;/li&gt;
&lt;li&gt;What &lt;code&gt;Incr Pool Size&lt;/code&gt; and &lt;code&gt;Decr Pool Size&lt;/code&gt; do&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📌 &lt;strong&gt;Transaction Behavior&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How &lt;code&gt;TransactionScope&lt;/code&gt; affects connection retention&lt;/li&gt;
&lt;li&gt;When connections are enlisted and released&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📌 &lt;strong&gt;Performance Characteristics&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cold vs. warm pool startup times&lt;/li&gt;
&lt;li&gt;Impact of connection pre-warming&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📌 &lt;strong&gt;Error Conditions&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dead connection detection&lt;/li&gt;
&lt;li&gt;Pool exhaustion vs. connection leaks&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Technology Stack
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Technology&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Runtime&lt;/td&gt;
&lt;td&gt;.NET 8.0+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Language&lt;/td&gt;
&lt;td&gt;C# 11+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Provider&lt;/td&gt;
&lt;td&gt;Oracle.ManagedDataAccess.Core 23.x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database&lt;/td&gt;
&lt;td&gt;Oracle Database (11g+)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Diagnostics&lt;/td&gt;
&lt;td&gt;Oracle V$SESSION view&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Safety &amp;amp; Limitations
&lt;/h2&gt;

&lt;p&gt;✅ &lt;strong&gt;Safe&lt;/strong&gt;: Designed for dedicated test databases&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Non-destructive&lt;/strong&gt;: No application tables modified&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Observable&lt;/strong&gt;: Sessions tagged for server-side inspection  &lt;/p&gt;

&lt;p&gt;⚠️ &lt;strong&gt;Test environment only&lt;/strong&gt; — never run against production&lt;br&gt;&lt;br&gt;
⚠️ &lt;strong&gt;Version-dependent&lt;/strong&gt; — behavior varies by Oracle and ODP.NET versions&lt;br&gt;&lt;br&gt;
⚠️ &lt;strong&gt;Requires privileges&lt;/strong&gt; — some scenarios need DBA access  &lt;/p&gt;




&lt;h2&gt;
  
  
  Next Steps
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Clone the repository&lt;/strong&gt;: &lt;a href="https://github.com/PouyaBasiri/OracleLab" rel="noopener noreferrer"&gt;PouyaBasiri/OracleLab&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run &lt;code&gt;dotnet run -- check&lt;/code&gt;&lt;/strong&gt; to verify connectivity&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pick a scenario&lt;/strong&gt; that matches your concern (leak? performance? transactions?)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitor with &lt;code&gt;dotnet run -- monitor&lt;/code&gt;&lt;/strong&gt; in another terminal&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Document findings&lt;/strong&gt; for your team&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Questions?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;💬 What connection pooling scenarios would &lt;em&gt;you&lt;/em&gt; like to investigate?&lt;/li&gt;
&lt;li&gt;🐛 Found a bug or unexpected behavior? Open an issue!&lt;/li&gt;
&lt;li&gt;🚀 Built on this idea? Share your extensions!&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  About the Project
&lt;/h2&gt;

&lt;p&gt;OraclePoolLab turns vague pooling questions into measurable, reproducible experiments. It's designed for developers and DBAs who want to understand Oracle connection behavior &lt;em&gt;before&lt;/em&gt; it causes production incidents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Measure the behavior. Verify the assumptions. Understand the pool.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Last updated: 2026-11-30&lt;/em&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;Happy experimenting! 🚀&lt;/em&gt;&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>oracle</category>
      <category>database</category>
      <category>performance</category>
    </item>
  </channel>
</rss>
