{"id":10151,"date":"2017-05-26T08:27:47","date_gmt":"2017-05-26T06:27:47","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/"},"modified":"2017-05-26T08:27:47","modified_gmt":"2017-05-26T06:27:47","slug":"oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/","title":{"rendered":"Oracle 12cR2 &#8211; ORA-44777 &#8211; Pluggable database service cannot be started"},"content":{"rendered":"<h2>By William Sescu<\/h2>\n<p>Have you ever experienced the following error?<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; alter pluggable database pdb2 open;\nalter pluggable database pdb2 open\n*\nERROR at line 1:\nORA-44304: service  does not exist\nORA-44777: Pluggable database service cannot be started.<\/pre>\n<p>The error says, that Oracle is not able to open the pluggable database because a service is missing. At least the default service, which is the name of the pluggable database itself should be there. But in my case, it is not. \u00a0To be honest, I was not aware, that Oracle even allows it, to drop the default service which comes with every PDB. But it is possible.<\/p>\n<p>Let&#8217;s create a simple test case.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; create pluggable database pdb2 admin user pdb2admin identified by manager ROLES = (dba);\n\nPluggable database created.\n\nSQL&gt; alter pluggable database pdb2 open;\n\nPluggable database altered.\n\nSQL&gt; select con_id, name from v$services where con_id = 5;\n\n    CON_ID NAME\n---------- ----------------------------------------------------------------\n         5 pdb2<\/pre>\n<p>Looks good. Have created a pluggable database named pdb2 and it comes with a default service named pdb2. For this test case, I am not using any dictionary hacks or any other crazy stuff like that. I am using the standard dbms_service package to delete my default service.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">-- Delete service manually\n\nSQL&gt; alter session set container=pdb2;\n\nSession altered.\n\nSQL&gt; show con_name\n\nCON_NAME\n------------------------------\nPDB2\n\nSQL&gt; exec dbms_service.STOP_SERVICE(SERVICE_NAME=&gt;'PDB2');\n\nPL\/SQL procedure successfully completed.\n\nSQL&gt; exec dbms_service.DELETE_SERVICE(SERVICE_NAME=&gt;'PDB2');\n\nPL\/SQL procedure successfully completed.\n<\/pre>\n<p>After dropping the service out of the pdb, the CDB still shows it in the v$services view.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; select con_id, name from v$services where con_id = 5;\n\n    CON_ID NAME\n---------- ----------------------------------------------------------------\n         5 pdb2\n<\/pre>\n<p>Ok. Let&#8217;s shutdown the pdb and start it again.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; alter pluggable database pdb2 close;\n\nPluggable database altered.\n\nSQL&gt; alter pluggable database pdb2 open;\nalter pluggable database pdb2 open\n*\nERROR at line 1:\nORA-44304: service  does not exist\nORA-44777: Pluggable database service cannot be started.\n\nSQL&gt;<\/pre>\n<p>Here we go. Now I got the ORA-44777 and the service is also gone.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; select con_id, name from v$services where con_id = 5;\n\nno rows selected<\/pre>\n<p>What is strange, is that the pdb was opened read-write, however, I am not able to connect to it in any way. Of course, not with sqlplus via service, but also not via the alter session set container command. Oracle immediately kicks me out with the famous ORA-03113 error.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; select name, open_mode from v$pdbs where name = 'PDB2';\n\nNAME OPEN_MODE\n-------------------------------- ----------\nPDB2 READ WRITE\n\nSQL&gt; alter session set container=pdb2;\nalter session set container=pdb2\n*\nERROR at line 1:\nORA-03113: end-of-file on communication channel\nProcess ID: 4926\nSession ID: 46 Serial number: 58059<\/pre>\n<p>But now, that we got the issue, and someone accidently dropped the default service, the question is how to recover from it? The only workaround I know, is to unplug and plug it again. By plugging a PDB in, Oracle automatically creates the service.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; alter pluggable database pdb2 close;\n\nPluggable database altered.\n\nSQL&gt; alter pluggable database pdb2 unplug into '\/u01\/app\/oracle\/admin\/CDB\/xml\/pdb2.xml';\n\nPluggable database altered.\n\nSQL&gt; select name, open_mode from v$pdbs where name = 'PDB2';\n\nNAME                     OPEN_MODE\n------------------------ ----------\nPDB2                     MOUNTED\n\nSQL&gt; drop pluggable database PDB2;\n\nPluggable database dropped.\n\nSQL&gt; select name, open_mode from v$pdbs where name = 'PDB2';\n\nno rows selected\n\nSQL&gt; create pluggable database pdb2 using '\/u01\/app\/oracle\/admin\/CDB\/xml\/pdb2.xml' nocopy tempfile reuse;\n\nPluggable database created.\n\nSQL&gt; alter pluggable database pdb2 open;\n\nPluggable database altered.\n\nSQL&gt; select name, open_mode from v$pdbs where name = 'PDB2';\n\nNAME                     OPEN_MODE\n------------------------ ----------\nPDB2                     READ WRITE\n\nSQL&gt; select con_id, name from v$services where name = 'pdb2';\n\n    CON_ID NAME\n---------- ----------------------------------------------------------------\n         6 pdb2<\/pre>\n<h3>Conclusion<\/h3>\n<p>Applications should not work with the default PDB service which comes out of the box with any PDB. This service is for internal use only. And dropping the default service of the pluggable database is also not a good idea, even it works. \ud83d\ude09 From my point of view, Oracle should not allow a DBA to do that.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By William Sescu Have you ever experienced the following error? SQL&gt; alter pluggable database pdb2 open; alter pluggable database pdb2 open * ERROR at line 1: ORA-44304: service does not exist ORA-44777: Pluggable database service cannot be started. The error says, that Oracle is not able to open the pluggable database because a service is [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229],"tags":[1025,353],"type_dbi":[],"class_list":["post-10151","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring","tag-oracle-12cr2","tag-pluggable-database"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Oracle 12cR2 - ORA-44777 - Pluggable database service cannot be started - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Oracle 12cR2 - ORA-44777 - Pluggable database service cannot be started\" \/>\n<meta property=\"og:description\" content=\"By William Sescu Have you ever experienced the following error? SQL&gt; alter pluggable database pdb2 open; alter pluggable database pdb2 open * ERROR at line 1: ORA-44304: service does not exist ORA-44777: Pluggable database service cannot be started. The error says, that Oracle is not able to open the pluggable database because a service is [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-05-26T06:27:47+00:00\" \/>\n<meta name=\"author\" content=\"Oracle Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oracle Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"Oracle 12cR2 &#8211; ORA-44777 &#8211; Pluggable database service cannot be started\",\"datePublished\":\"2017-05-26T06:27:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/\"},\"wordCount\":339,\"commentCount\":0,\"keywords\":[\"Oracle 12cR2\",\"Pluggable Database\"],\"articleSection\":[\"Database Administration &amp; Monitoring\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/\",\"name\":\"Oracle 12cR2 - ORA-44777 - Pluggable database service cannot be started - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2017-05-26T06:27:47+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Oracle 12cR2 &#8211; ORA-44777 &#8211; Pluggable database service cannot be started\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\",\"name\":\"Oracle Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"caption\":\"Oracle Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Oracle 12cR2 - ORA-44777 - Pluggable database service cannot be started - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/","og_locale":"en_US","og_type":"article","og_title":"Oracle 12cR2 - ORA-44777 - Pluggable database service cannot be started","og_description":"By William Sescu Have you ever experienced the following error? SQL&gt; alter pluggable database pdb2 open; alter pluggable database pdb2 open * ERROR at line 1: ORA-44304: service does not exist ORA-44777: Pluggable database service cannot be started. The error says, that Oracle is not able to open the pluggable database because a service is [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/","og_site_name":"dbi Blog","article_published_time":"2017-05-26T06:27:47+00:00","author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"Oracle 12cR2 &#8211; ORA-44777 &#8211; Pluggable database service cannot be started","datePublished":"2017-05-26T06:27:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/"},"wordCount":339,"commentCount":0,"keywords":["Oracle 12cR2","Pluggable Database"],"articleSection":["Database Administration &amp; Monitoring"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/","url":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/","name":"Oracle 12cR2 - ORA-44777 - Pluggable database service cannot be started - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2017-05-26T06:27:47+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-ora-44777-pluggable-database-service-cannot-be-started\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Oracle 12cR2 &#8211; ORA-44777 &#8211; Pluggable database service cannot be started"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee","name":"Oracle Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","caption":"Oracle Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/10151","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=10151"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/10151\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=10151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=10151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=10151"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=10151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}