{"id":4258,"date":"2025-06-16T10:15:14","date_gmt":"2025-06-16T10:15:14","guid":{"rendered":"https:\/\/w3buddy.com\/?p=4258"},"modified":"2026-01-15T12:44:14","modified_gmt":"2026-01-15T07:14:14","slug":"how-to-check-if-your-oracle-database-is-multitenant-cdb-or-non-cdb","status":"publish","type":"post","link":"https:\/\/w3buddy.com\/blog\/how-to-check-if-your-oracle-database-is-multitenant-cdb-or-non-cdb\/","title":{"rendered":"How to Check If Your Oracle Database Is Multitenant (CDB or non-CDB)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Oracle introduced the <strong>Multitenant Architecture<\/strong> starting in version 12c. This allows multiple <strong>Pluggable Databases (PDBs)<\/strong> to exist inside a single <strong>Container Database (CDB)<\/strong>, bringing flexibility for consolidation, management, and cloning. However, not all databases are CDBs\u2014especially in earlier versions or depending on how the database was created.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This post will show you <strong>how to check whether your Oracle database is a CDB (multitenant)<\/strong> or a <strong>traditional non-CDB<\/strong>, using simple SQL queries.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Quick Version-Based Clarity<\/h2>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>Oracle Version<\/th><th>Multitenant Architecture<\/th><\/tr><\/thead><tbody><tr><td>11g and earlier<\/td><td>\u274c Not supported (always non-CDB)<\/td><\/tr><tr><td>12c, 18c, 19c<\/td><td>\u2705 Optional (can be CDB or non-CDB)<\/td><\/tr><tr><td>21c and above<\/td><td>\u2705 Mandatory (always CDB)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">So if you&#8217;re using Oracle 12c\u201319c, you need to check explicitly using SQL whether it&#8217;s a CDB or not.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 How to Check If It&#8217;s a CDB or non-CDB<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You can use the following SQL statements to confirm the architecture of your Oracle database.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Check Using <code>V$DATABASE<\/code><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SQL> SELECT cdb FROM v$database;\n\nCDB\n---\nYES<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Result:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>YES<\/code> \u2192 It&#8217;s a <strong>CDB<\/strong> (Container Database)<\/li>\n\n\n\n<li><code>NO<\/code> \u2192 It&#8217;s a <strong>non-CDB<\/strong> (Traditional database)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2. Check Using <code>V$PDBS<\/code><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SQL> SELECT name FROM v$pdbs;\n\nNAME\n--------------------------------------------------------------------------------\nPDB$SEED\nFREEPDB1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Interpretation:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Returns rows<\/strong> \u2192 Database contains <strong>Pluggable Databases<\/strong> \u2192 It is a <strong>CDB<\/strong>.<\/li>\n\n\n\n<li><strong>No rows selected<\/strong> \u2192 Database has <strong>no PDBs<\/strong> \u2192 It is a <strong>non-CDB<\/strong>.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Sample Outputs<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Traditional Database (non-CDB)<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code><code>SQL> SELECT cdb FROM v$database;\n\nCDB\n---\nNO\n\nSQL> SELECT name FROM v$pdbs;\n\nno rows selected<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 This confirms a traditional architecture (non-CDB).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Multitenant Database (CDB)<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code><code>SQL> SELECT cdb FROM v$database;\n\nCDB\n---\nYES\n\nSQL> SELECT name FROM v$pdbs;\n\nNAME\n----------\nORCLPDB1<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 This confirms a multitenant setup with a pluggable database.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Does This Matter to Users?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For application users or developers, there&#8217;s typically <strong>no functional difference<\/strong> in how they connect or use the database. But for <strong>DBAs<\/strong>, this distinction is critical\u2014especially for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Backup and recovery planning<\/li>\n\n\n\n<li>Database refresh and cloning<\/li>\n\n\n\n<li>Data Guard and patching strategies<\/li>\n\n\n\n<li>Upgrade planning<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Knowing whether your DB is multitenant helps ensure the correct procedures and tools are used.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udccc Summary<\/h2>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>Check<\/th><th>Use<\/th><\/tr><\/thead><tbody><tr><td><code>SELECT cdb FROM v$database;<\/code><\/td><td>Tells if the DB is a CDB or not<\/td><\/tr><tr><td><code>SELECT name FROM v$pdbs;<\/code><\/td><td>Lists PDBs if present<\/td><\/tr><tr><td>Oracle Version<\/td><td>Gives a quick idea of likely architecture<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Oracle introduced the Multitenant Architecture starting in version 12c. This allows multiple Pluggable Databases (PDBs) to exist inside a single Container Database (CDB), bringing flexibility for consolidation, management, and cloning. However, not all databases are CDBs\u2014especially in earlier versions or depending on how the database was created. This post will show you how to check [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"googlesitekit_rrm_CAowu461DA:productID":"","footnotes":""},"categories":[1225],"tags":[],"class_list":["post-4258","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/4258","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/comments?post=4258"}],"version-history":[{"count":1,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/4258\/revisions"}],"predecessor-version":[{"id":4259,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/4258\/revisions\/4259"}],"wp:attachment":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/media?parent=4258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/categories?post=4258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/tags?post=4258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}