{"id":92668,"date":"2024-10-19T07:31:21","date_gmt":"2024-10-18T23:31:21","guid":{"rendered":"https:\/\/server.hk\/cnblog\/92668\/"},"modified":"2024-10-19T07:31:21","modified_gmt":"2024-10-18T23:31:21","slug":"ora-41713-windowlen-%e5%92%8c-windowsize-%e5%b1%ac%e6%80%a7%e7%9a%84%e7%84%a1%e6%95%88%e4%bd%bf%e7%94%a8-oracle-%e5%a0%b1%e9%8c%af-%e6%95%85%e9%9a%9c%e4%bf%ae","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/92668\/","title":{"rendered":"ORA-41713: \u201cwindowlen\u201d \u548c \u201cwindowsize\u201d \u5c6c\u6027\u7684\u7121\u6548\u4f7f\u7528 ORACLE \u5831\u932f \u6545\u969c\u4fee\u5fa9 \u9060\u7a0b\u8655\u7406"},"content":{"rendered":"<h1 id=\"ora-41713-windowlen-%e5%92%8c-windowsize-%e5%b1%ac%e6%80%a7%e7%9a%84%e7%84%a1%e6%95%88%e4%bd%bf%e7%94%a8-oracle-%e5%a0%b1%e9%8c%af-%e6%95%85%e9%9a%9c%e4%bf%ae-xJUGOZZJBV\">ORA-41713: \u201cwindowlen\u201d \u548c \u201cwindowsize\u201d \u5c6c\u6027\u7684\u7121\u6548\u4f7f\u7528 ORACLE \u5831\u932f \u6545\u969c\u4fee\u5fa9 \u9060\u7a0b\u8655\u7406<\/h1>\n<p>\u5728\u4f7f\u7528 Oracle \u6578\u64da\u5eab\u6642\uff0c\u958b\u767c\u8005\u548c\u6578\u64da\u5eab\u7ba1\u7406\u54e1\u53ef\u80fd\u6703\u9047\u5230\u5404\u7a2e\u932f\u8aa4\u4ee3\u78bc\uff0c\u5176\u4e2d\u4e4b\u4e00\u4fbf\u662f ORA-41713\u3002\u9019\u500b\u932f\u8aa4\u901a\u5e38\u8207\u7a97\u53e3\u51fd\u6578\u7684\u4f7f\u7528\u6709\u95dc\uff0c\u7279\u5225\u662f\u6d89\u53ca\u5230 \u201cwindowlen\u201d \u548c \u201cwindowsize\u201d \u5c6c\u6027\u6642\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0e\u9019\u500b\u932f\u8aa4\u7684\u539f\u56e0\u3001\u5f71\u97ff\u4ee5\u53ca\u5982\u4f55\u9032\u884c\u6545\u969c\u4fee\u5fa9\u3002<\/p>\n<h2 id=\"ora-41713-%e9%8c%af%e8%aa%a4%e6%a6%82%e8%bf%b0-xJUGOZZJBV\">ORA-41713 \u932f\u8aa4\u6982\u8ff0<\/h2>\n<p>ORA-41713 \u932f\u8aa4\u7684\u5177\u9ad4\u4fe1\u606f\u70ba\uff1a\u201cwindowlen\u201d \u548c \u201cwindowsize\u201d \u5c6c\u6027\u7684\u7121\u6548\u4f7f\u7528\u3002\u9019\u901a\u5e38\u767c\u751f\u5728\u4f7f\u7528\u7a97\u53e3\u51fd\u6578\u6642\uff0c\u7576\u9019\u4e9b\u5c6c\u6027\u672a\u6b63\u78ba\u8a2d\u7f6e\u6216\u4e0d\u7b26\u5408 Oracle \u6578\u64da\u5eab\u7684\u8981\u6c42\u6642\uff0c\u4fbf\u6703\u5c0e\u81f4\u6b64\u932f\u8aa4\u3002<\/p>\n<h2 id=\"%e7%aa%97%e5%8f%a3%e5%87%bd%e6%95%b8%e7%9a%84%e5%9f%ba%e6%9c%ac%e6%a6%82%e5%bf%b5-xJUGOZZJBV\">\u7a97\u53e3\u51fd\u6578\u7684\u57fa\u672c\u6982\u5ff5<\/h2>\n<p>\u7a97\u53e3\u51fd\u6578\u662f\u4e00\u7a2e\u7279\u6b8a\u7684 SQL \u51fd\u6578\uff0c\u5141\u8a31\u7528\u6236\u5728\u67e5\u8a62\u7d50\u679c\u96c6\u7684\u7279\u5b9a\u7bc4\u570d\u5167\u9032\u884c\u8a08\u7b97\u3002\u9019\u4e9b\u51fd\u6578\u901a\u5e38\u7528\u65bc\u5206\u6790\u548c\u5831\u544a\uff0c\u80fd\u5920\u5728\u4e0d\u6539\u8b8a\u7d50\u679c\u96c6\u7684\u60c5\u6cc1\u4e0b\u9032\u884c\u805a\u5408\u8a08\u7b97\u3002\u7a97\u53e3\u51fd\u6578\u7684\u4f7f\u7528\u9700\u8981\u6307\u5b9a\u4e00\u500b\u7a97\u53e3\uff0c\u9019\u5c31\u662f \u201cwindowlen\u201d \u548c \u201cwindowsize\u201d \u5c6c\u6027\u7684\u4f5c\u7528\u3002<\/p>\n<h2 id=\"%e9%8c%af%e8%aa%a4%e5%8e%9f%e5%9b%a0%e5%88%86%e6%9e%90-xJUGOZZJBV\">\u932f\u8aa4\u539f\u56e0\u5206\u6790<\/h2>\n<p>ORA-41713 \u932f\u8aa4\u7684\u4e3b\u8981\u539f\u56e0\u5305\u62ec\uff1a<\/p>\n<ul>\n<li><strong>\u5c6c\u6027\u8a2d\u7f6e\u4e0d\u7576\uff1a<\/strong>\u5982\u679c \u201cwindowlen\u201d \u548c \u201cwindowsize\u201d \u7684\u503c\u4e0d\u7b26\u5408 Oracle \u7684\u8981\u6c42\uff0c\u5247\u6703\u5c0e\u81f4\u932f\u8aa4\u3002\u4f8b\u5982\uff0c\u8a2d\u7f6e\u7684\u7a97\u53e3\u5927\u5c0f\u8d85\u904e\u4e86\u6578\u64da\u96c6\u7684\u7bc4\u570d\u3002<\/li>\n<li><strong>SQL \u8a9e\u6cd5\u932f\u8aa4\uff1a<\/strong>\u5728\u4f7f\u7528\u7a97\u53e3\u51fd\u6578\u6642\uff0cSQL \u8a9e\u6cd5\u5fc5\u9808\u6b63\u78ba\u3002\u5982\u679c\u8a9e\u6cd5\u4e0d\u6b63\u78ba\uff0c\u5247\u53ef\u80fd\u6703\u5c0e\u81f4\u6b64\u932f\u8aa4\u3002<\/li>\n<li><strong>\u7248\u672c\u4e0d\u517c\u5bb9\uff1a<\/strong>\u67d0\u4e9b\u7248\u672c\u7684 Oracle \u6578\u64da\u5eab\u53ef\u80fd\u4e0d\u652f\u6301\u7279\u5b9a\u7684\u7a97\u53e3\u51fd\u6578\u6216\u5c6c\u6027\uff0c\u9019\u4e5f\u53ef\u80fd\u5c0e\u81f4\u932f\u8aa4\u3002<\/li>\n<\/ul>\n<h2 id=\"%e6%95%85%e9%9a%9c%e4%bf%ae%e5%be%a9%e6%ad%a5%e9%a9%9f-xJUGOZZJBV\">\u6545\u969c\u4fee\u5fa9\u6b65\u9a5f<\/h2>\n<p>\u7576\u9047\u5230 ORA-41713 \u932f\u8aa4\u6642\uff0c\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9a5f\u9032\u884c\u6545\u969c\u4fee\u5fa9\uff1a<\/p>\n<h3 id=\"1-%e6%aa%a2%e6%9f%a5-sql-%e8%aa%9e%e6%b3%95-xJUGOZZJBV\">1. \u6aa2\u67e5 SQL \u8a9e\u6cd5<\/h3>\n<p>\u9996\u5148\uff0c\u6aa2\u67e5 SQL \u8a9e\u53e5\u7684\u8a9e\u6cd5\u662f\u5426\u6b63\u78ba\u3002\u78ba\u4fdd\u6240\u6709\u7684\u7a97\u53e3\u51fd\u6578\u90fd\u6b63\u78ba\u4f7f\u7528\uff0c\u4e26\u4e14 \u201cwindowlen\u201d \u548c \u201cwindowsize\u201d \u7684\u8a2d\u7f6e\u7b26\u5408\u8981\u6c42\u3002<\/p>\n<pre><code>SELECT \n    column1, \n    SUM(column2) OVER (ORDER BY column1 ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS running_total\nFROM \n    your_table;<\/code><\/pre>\n<h3 id=\"2-%e9%a9%97%e8%ad%89%e5%b1%ac%e6%80%a7%e8%a8%ad%e7%bd%ae-xJUGOZZJBV\">2. \u9a57\u8b49\u5c6c\u6027\u8a2d\u7f6e<\/h3>\n<p>\u6aa2\u67e5 \u201cwindowlen\u201d \u548c \u201cwindowsize\u201d \u7684\u8a2d\u7f6e\uff0c\u78ba\u4fdd\u5b83\u5011\u7684\u503c\u5728\u5408\u7406\u7bc4\u570d\u5167\u3002\u4f8b\u5982\uff0c\u78ba\u4fdd\u7a97\u53e3\u5927\u5c0f\u4e0d\u8d85\u904e\u6578\u64da\u96c6\u7684\u5927\u5c0f\u3002<\/p>\n<h3 id=\"3-%e6%9b%b4%e6%96%b0-oracle-%e7%89%88%e6%9c%ac-xJUGOZZJBV\">3. \u66f4\u65b0 Oracle \u7248\u672c<\/h3>\n<p>\u5982\u679c\u4f7f\u7528\u7684 Oracle \u7248\u672c\u4e0d\u652f\u6301\u67d0\u4e9b\u7a97\u53e3\u51fd\u6578\uff0c\u8003\u616e\u5347\u7d1a\u5230\u6700\u65b0\u7248\u672c\uff0c\u4ee5\u7372\u53d6\u6700\u65b0\u7684\u529f\u80fd\u548c\u4fee\u5fa9\u3002<\/p>\n<h3 id=\"4-%e6%9f%a5%e9%96%b1%e5%ae%98%e6%96%b9%e6%96%87%e6%aa%94-xJUGOZZJBV\">4. \u67e5\u95b1\u5b98\u65b9\u6587\u6a94<\/h3>\n<p>\u67e5\u95b1 Oracle \u7684\u5b98\u65b9\u6587\u6a94\uff0c\u4e86\u89e3\u6709\u95dc\u7a97\u53e3\u51fd\u6578\u548c\u5c6c\u6027\u7684\u8a73\u7d30\u4fe1\u606f\uff0c\u9019\u6709\u52a9\u65bc\u66f4\u597d\u5730\u7406\u89e3\u5982\u4f55\u6b63\u78ba\u4f7f\u7528\u9019\u4e9b\u529f\u80fd\u3002<\/p>\n<h2 id=\"%e7%b5%90%e8%ab%96-xJUGOZZJBV\">\u7d50\u8ad6<\/h2>\n<p>ORA-41713 \u932f\u8aa4\u901a\u5e38\u662f\u7531\u65bc\u7a97\u53e3\u51fd\u6578\u7684\u5c6c\u6027\u8a2d\u7f6e\u4e0d\u7576\u5f15\u8d77\u7684\u3002\u901a\u904e\u4ed4\u7d30\u6aa2\u67e5 SQL \u8a9e\u6cd5\u3001\u9a57\u8b49\u5c6c\u6027\u8a2d\u7f6e\u3001\u66f4\u65b0 Oracle \u7248\u672c\u4ee5\u53ca\u67e5\u95b1\u5b98\u65b9\u6587\u6a94\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u89e3\u6c7a\u6b64\u554f\u984c\u3002\u5c0d\u65bc\u9700\u8981\u7a69\u5b9a\u548c\u9ad8\u6548\u6578\u64da\u5eab\u904b\u884c\u7684\u4f01\u696d\u4f86\u8aaa\uff0c\u4e86\u89e3\u9019\u4e9b\u932f\u8aa4\u53ca\u5176\u4fee\u5fa9\u65b9\u6cd5\u662f\u81f3\u95dc\u91cd\u8981\u7684\u3002<\/p>\n<p>\u5982\u9700\u9032\u4e00\u6b65\u4e86\u89e3\u6709\u95dc <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u548c\u5176\u4ed6\u670d\u52d9\u7684\u4fe1\u606f\uff0c\u8acb\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u89e3\u6c7a ORA-41713 \u932f\u8aa4\uff0c\u4e86\u89e3 &#8220;windowlen&#8221; \u548c &#8220;windowsize&#8221; \u5c6c\u6027\u7121\u6548\u4f7f\u7528\u7684\u539f\u56e0\uff0c\u63d0\u4f9b\u6545\u969c\u4fee\u5fa9\u548c\u9060\u7a0b\u8655\u7406\u6307\u5357\u3002<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-92668","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/92668","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=92668"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/92668\/revisions"}],"predecessor-version":[{"id":92669,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/92668\/revisions\/92669"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=92668"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=92668"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=92668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}