{"id":1313,"date":"2012-10-18T14:19:41","date_gmt":"2012-10-18T06:19:41","guid":{"rendered":"http:\/\/learn-house.idv.tw\/?p=1313"},"modified":"2012-10-26T21:23:05","modified_gmt":"2012-10-26T13:23:05","slug":"db2-sql0964c-the-transaction-log-for-the-database-is-full-sqlstate57011","status":"publish","type":"post","link":"https:\/\/learn-house.idv.tw\/?p=1313","title":{"rendered":"DB2 SQL0964C The transaction log for the database is full. SQLSTATE=57011"},"content":{"rendered":"<p>\u7d00\u9304\u4e00\u4e0b\uff0c\u4f5c\u91cf\u6e2c\u5f88\u5bb9\u6613\u6703\u8b93\u8cc7\u6599\u5eab\u585e\u592a\u591a\u6771\u897f\uff0c\u585e\u7206\u5f8c\u6703\u51fa\u73fe\u5f88\u591a\u5947\u602a\u7684\u554f\u984c<\/p>\n<p>\u505aDB2\u7684\u63d2\u5165\u64cd\u4f5c\u5831\u932f<\/p>\n<p>db2 =&gt; insert into atmjobsts  values (&#8216;20090805&#8242;,&#8217;2&#8217;)<br \/>\nDB21034E  The command was processed as an SQL statement because it was not a<br \/>\nvalid Command Line Processor command.  During SQL processing it returned:<br \/>\nSQL0964C  The transaction log for the database is full.  SQLSTATE=57011<\/p>\n<p>\u539f\u56e0\uff1a<\/p>\n<p>\u7de9\u885d\u6c60\u64f4\u5c55\u5931\u6557\uff0c\u7531\u65bc\u53ef\u7528\u7684\u865b\u64ec\u5167\u5b58\u7684\u5927\u5c0f\u4e0d\u8db3<\/p>\n<p><!--more-->&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>\u89e3\u6c7a\uff1a<\/p>\n<p>1. \u67e5\u770b<\/p>\n<p>db2 =&gt; get db cfg<\/p>\n<p>Database Configuration for Database<\/p>\n<p>&#8230;<\/p>\n<p>Log file size (4KB)                         (LOGFILSIZ) = 10240<br \/>\nNumber of primary log files                (LOGPRIMARY) = 13<br \/>\nNumber of secondary log files               (LOGSECOND) = 4<br \/>\nChanged path to log files                  (NEWLOGPATH) =<br \/>\nPath to log files                                       = \/db2data\/db2shjh\/db2inst1\/NODE0000\/SQL00001\/SQLOGDIR\/<br \/>\nOverflow log path                     (OVERFLOWLOGPATH) =<br \/>\nMirror log path                         (MIRRORLOGPATH) =<br \/>\nFirst active log file                                   =<br \/>\nBlock log on disk full                (BLK_LOG_DSK_FUL) = NO<br \/>\nPercent max primary log space by transaction  (MAX_LOG) = 0<br \/>\nNum. of active log files for 1 active UOW(NUM_LOG_SPAN) = 0<\/p>\n<p>&#8230;<\/p>\n<p>2. \u4fee\u6539<\/p>\n<p>\u5f8c\u4f86\u628a\u9019\u500b\u53c3\u6578\u7684\u5927\u5c0f\u76f8\u61c9\u8abf\u6574\u4e86\u4e00\u4e0b\uff0c\u8abf\u6574\u5f8c\u5982\u4e0b\uff1a<\/p>\n<p>Log file size (4KB) (LOGFILSIZ) = 61440<\/p>\n<p>\u8abf\u6574\u65b9\u6cd5\u70ba<\/p>\n<p>update db cfg using LOGFILSIZ 61440<\/p>\n<p>3. \u8abf\u6574\u5f8c\u91cd\u555f\u6578\u64da\u5eab<\/p>\n<p>\u57f7\u884c db2stop \u4f86\u505c\u6b62DB2\u670d\u52d9\uff0c\u5982\u679c\u505c\u6b62\u4e0d\u6389\u53ef\u4ee5\u8003\u616e\u57f7\u884c db2stop force \u5f37\u5236\u505c\u6b62\u3002<br \/>\n\u57f7\u884c db2start \u555f\u52d5DB2\u670d\u52d9\u3002<\/p>\n<p>4. \u67e5\u770b<\/p>\n<p>Log file size (4KB)                         (LOGFILSIZ) = 61440<br \/>\nNumber of primary log files                (LOGPRIMARY) = 13<br \/>\nNumber of secondary log files               (LOGSECOND) = 4<br \/>\nChanged path to log files                  (NEWLOGPATH) =<br \/>\nPath to log files                                       = \/db2data\/db2shjh\/db2inst1\/NODE0000\/SQL00001\/SQLOGDIR\/<br \/>\nOverflow log path                     (OVERFLOWLOGPATH) =<br \/>\nMirror log path                         (MIRRORLOGPATH) =<br \/>\nFirst active log file                                   =<br \/>\nBlock log on disk full                (BLK_LOG_DSK_FUL) = NO<br \/>\nPercent max primary log space by transaction  (MAX_LOG) = 0<br \/>\nNum. of active log files for 1 active UOW(NUM_LOG_SPAN) = 0<\/p>\n<p>5. \u518d\u57f7\u884c \u63d2\u5165\u64cd\u4f5c OK  \u89e3\u6c7a<\/p>\n<p>db2 =&gt; insert into atmjobsts values(&#8216;20090805&#8242;,&#8217;3&#8217;)<br \/>\nDB20000I  The SQL command completed successfully.<\/p>\n<p>\u8cc7\u6599\u4f86\u6e90\uff1ahttp:\/\/www.db2china.net\/home\/space.php?uid=7190&amp;do=blog&amp;id=9009<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7d00\u9304\u4e00\u4e0b\uff0c\u4f5c\u91cf\u6e2c\u5f88\u5bb9\u6613\u6703\u8b93\u8cc7\u6599\u5eab\u585e\u592a\u591a\u6771\u897f\uff0c\u585e\u7206\u5f8c\u6703\u51fa\u73fe\u5f88\u591a\u5947\u602a\u7684\u554f\u984c \u505aDB2\u7684\u63d2\u5165\u64cd\u4f5c\u5831\u932f db2 =&#038;g<span class=\"post-excerpt-end\">&hellip;<\/span><\/p>\n<p class=\"more-link\"><a href=\"https:\/\/learn-house.idv.tw\/?p=1313\" class=\"themebutton\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-1313","post","type-post","status-publish","format-standard","hentry","category-12"],"_links":{"self":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/1313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1313"}],"version-history":[{"count":0,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/1313\/revisions"}],"wp:attachment":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}