{"id":1800,"date":"2019-05-25T11:35:25","date_gmt":"2019-05-25T11:35:25","guid":{"rendered":"http:\/\/www.theSQLReport.com\/?p=1800"},"modified":"2019-05-26T12:16:14","modified_gmt":"2019-05-26T12:16:14","slug":"upgrading-oracle-errors-out-with-ora-04031-unable-to-allocate-bytes-of-shared-memory-shared-pool","status":"publish","type":"post","link":"https:\/\/www.theSQLReport.com\/?p=1800","title":{"rendered":"Upgrading Oracle errors out with ORA-04031: unable to allocate ## bytes of shared memory (&#8220;shared pool&#8221;"},"content":{"rendered":"<p>While working to get my Oracle database upgraded to a supported version, using the DBUA I was getting the following errors:<\/p>\n<pre>ORA-04031: unable to allocate 704 bytes of shared memory \r\n(\"shared pool\",\"unknown object\",\"PX subheap\",\"qref (kxfpqr)\")<\/pre>\n<p>or in a different upgrade<\/p>\n<pre>ORA-04031: unable to allocate 40 bytes of shared memory \r\n(\"shared pool\",\"SELECT DECODE(null,'','Total...\",\"SQLA\",\"tmp\")<\/pre>\n<p>Unable to find anything helpful in &#8220;My Oracle Support&#8221; (Metalink) or in a Google search, I opened a ticket with Oracle support.\u00a0 After two weeks and uploading many log &amp; trace files,\u00a0 Oracle support final got someone who came back with the following recommendation:<\/p>\n<p>&nbsp;<\/p>\n<p class=\"yiv1432287953MsoNormal\"><em>To resolve this;<\/em><\/p>\n<p class=\"yiv1432287953MsoNormal\"><em>1) set the sga_target to a large value and this will fix the issue<\/em><\/p>\n<p class=\"yiv1432287953MsoNormal\"><em>OR<\/em><\/p>\n<p class=\"yiv1432287953MsoNormal\"><em>2) Reduce the PARALLEL_MAX_SERVERS and CPU_COUNT to a lower value<\/em><\/p>\n<p>&nbsp;<\/p>\n<p>The SGA_TARGET was set larger then many databases that I have already successfully upgraded.<\/p>\n<p>However, my PARALLEL_MAX_SERVERS was set to 1,200.\u00a0 When I reduced that to 200, the upgrade completed successfully.\u00a0\u00a0 Also on the &#8220;Upgrade Options&#8221; tab, I left the &#8220;Select Upgrade Parallelism&#8221; at the default of 4.\u00a0 Before adjusting the PARALLEL_MAX_SERVERS parameter, the higher I set the Upgrade Parallelism, the faster I filled up the shared pool.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While working to get my Oracle database upgraded to a supported version, using the DBUA I was getting the following errors: ORA-04031: unable to allocate 704 bytes of shared memory &hellip; <a class=\"readmore\" href=\"https:\/\/www.theSQLReport.com\/?p=1800\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":1804,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[155,156,158,157],"class_list":["post-1800","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oracle","tag-ora-04031","tag-parallel_max_servers","tag-shared-pool","tag-upgrade"],"_links":{"self":[{"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/1800"}],"collection":[{"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1800"}],"version-history":[{"count":7,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/1800\/revisions"}],"predecessor-version":[{"id":1808,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/1800\/revisions\/1808"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/media\/1804"}],"wp:attachment":[{"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1800"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1800"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1800"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}