{"id":85,"date":"2009-09-25T12:47:36","date_gmt":"2009-09-25T11:47:36","guid":{"rendered":"http:\/\/www.epischel.de\/wordpress\/?p=85"},"modified":"2012-04-09T11:34:05","modified_gmt":"2012-04-09T10:34:05","slug":"oracle-fehlermeldung-too-many-open-cursors","status":"publish","type":"post","link":"https:\/\/www.epischel.de\/wordpress\/2009\/09\/oracle-fehlermeldung-too-many-open-cursors\/","title":{"rendered":"Oracle Fehlermeldung: &#8222;Too many open cursors&#8220;"},"content":{"rendered":"<p>Letztens haben wir nach Hardware- und JDBC-Treiber-Wechsel folgende Fehlermeldung bekommen:<\/p>\n<p>ORA-01000: too many open cursors (oder auf deutsch: maximale anzahl offener cursor \u00fcberschritten)<\/p>\n<p>Tats\u00e4chlich gab es noch 2 Statements im Application-Server, bei das Statement nicht geschlossen wurde. Man findet die betreffenden Statements mit folgendem SQL:<\/p>\n<div id=\"ig-sh-1\" class=\"syntax_hilite\">\n\n\t\t<div class=\"toolbar\">\n\n\t\t<div class=\"view-different-container\">\n\t\t\t\t\t\t<a href=\"#\" class=\"view-different\">&lt; View <span>plain text<\/span> &gt;<\/a>\n\t\t\t\t\t<\/div>\n\n\t\t<div class=\"language-name\">sql<\/div>\n\n\t\t\n\t\t<br clear=\"both\">\n\n\t<\/div>\n\t\n\t<div class=\"code\">\n\t\t<ol class=\"sql\" style=\"font-family:monospace\"><li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\"><span style=\"color: #993333;font-weight: bold\">select<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\">&nbsp; &nbsp; &nbsp; &nbsp; c<span style=\"color: #66cc66\">.<\/span>sid<span style=\"color: #66cc66\">,<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\">&nbsp; &nbsp; &nbsp; &nbsp; c<span style=\"color: #66cc66\">.<\/span>address<span style=\"color: #66cc66\">,<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\">&nbsp; &nbsp; &nbsp; &nbsp; c<span style=\"color: #66cc66\">.<\/span>hash_value<span style=\"color: #66cc66\">,<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\">&nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #993333;font-weight: bold\">COUNT<\/span><span style=\"color: #66cc66\">&#040;<\/span><span style=\"color: #66cc66\">*<\/span><span style=\"color: #66cc66\">&#041;<\/span> &nbsp; &nbsp; &nbsp; <span style=\"color: #993333;font-weight: bold\">as<\/span> <span style=\"color: #ff0000\">&quot;Cursor Copies&quot;<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\"><span style=\"color: #993333;font-weight: bold\">from<\/span> &nbsp; &nbsp;v$open_cursor c<\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\"><span style=\"color: #993333;font-weight: bold\">group<\/span> <span style=\"color: #993333;font-weight: bold\">by<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\">&nbsp; &nbsp; &nbsp; &nbsp; c<span style=\"color: #66cc66\">.<\/span>sid<span style=\"color: #66cc66\">,<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\">&nbsp; &nbsp; &nbsp; &nbsp; c<span style=\"color: #66cc66\">.<\/span>address<span style=\"color: #66cc66\">,<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\">&nbsp; &nbsp; &nbsp; &nbsp; c<span style=\"color: #66cc66\">.<\/span>hash_value<\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\"><span style=\"color: #993333;font-weight: bold\">having<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\">&nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #993333;font-weight: bold\">count<\/span><span style=\"color: #66cc66\">&#040;<\/span><span style=\"color: #66cc66\">*<\/span><span style=\"color: #66cc66\">&#041;<\/span> <span style=\"color: #66cc66\">&gt;<\/span> <span style=\"color: #cc66cc\">2<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\"><span style=\"color: #993333;font-weight: bold\">order<\/span> <span style=\"color: #993333;font-weight: bold\">by<\/span><\/div><\/li>\n<li style=\"font-weight: normal;vertical-align:top\"><div style=\"font: normal normal 1em\/1.2em monospace;margin:0;padding:0;background:none;vertical-align:top\">&nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #cc66cc\">3<\/span> <span style=\"color: #993333;font-weight: bold\">desc<\/span><\/div><\/li>\n<\/ol>\t<\/div>\n\n<\/div>\n\n<p>Unter Umst\u00e4nden kann man im Live-System beobachten, wie die Anzahl der offenen Cursor w\u00e4chst.<\/p>\n<p>Offensichtlich hat uns der vorherige JDBC-Treiber das nicht-Schliessen des Statements vergeben.<\/p>\n<div class=\"syndication-links\"><\/div>","protected":false},"excerpt":{"rendered":"<p>Letztens haben wir nach Hardware- und JDBC-Treiber-Wechsel folgende Fehlermeldung bekommen: ORA-01000: too many open cursors (oder auf deutsch: maximale anzahl offener cursor \u00fcberschritten) Tats\u00e4chlich gab es noch 2 Statements im Application-Server, bei das Statement nicht geschlossen wurde. Man findet die betreffenden Statements mit folgendem SQL: [sql] select c.sid, c.address, c.hash_value, COUNT(*) as &#8222;Cursor Copies&#8220; from&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"mf2_syndication":[],"webmentions_disabled_pings":false,"webmentions_disabled":false,"footnotes":""},"categories":[3,2],"tags":[13,119],"series":[],"class_list":["post-85","post","type-post","status-publish","format-standard","hentry","category-java","category-entwicklung","tag-datenbank","tag-entwicklung","kind-"],"kind":false,"_links":{"self":[{"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/posts\/85","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/comments?post=85"}],"version-history":[{"count":6,"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/posts\/85\/revisions"}],"predecessor-version":[{"id":326,"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/posts\/85\/revisions\/326"}],"wp:attachment":[{"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/media?parent=85"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/categories?post=85"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/tags?post=85"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/series?post=85"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}