{"id":19,"date":"2008-03-25T10:01:00","date_gmt":"2008-03-25T09:01:00","guid":{"rendered":"https:\/\/iddlesblog.wordpress.com\/2008\/03\/25\/flushing-sql-transaction-logs\/"},"modified":"2008-03-25T10:01:00","modified_gmt":"2008-03-25T09:01:00","slug":"flushing-sql-transaction-logs","status":"publish","type":"post","link":"https:\/\/iddles.co.uk\/index.php\/2008\/03\/25\/flushing-sql-transaction-logs\/","title":{"rendered":"Flushing SQL Transaction Logs"},"content":{"rendered":"<p>Can never remember the syntax so here is is as a reminder:<br \/>\nMake the database current then run<br \/>\n<span style=\"color:#0000ff;font-size:x-small;\"><span style=\"color:#0000ff;font-size:x-small;\"><font size=\"2\" color=\"#0000ff\"><\/p>\n<blockquote><p><em>DBCC<\/em><\/p><\/blockquote>\n<p><\/font><\/span><\/p>\n<blockquote><p>\u00a0<\/p><\/blockquote>\n<p><\/span><\/p>\n<blockquote><p><em><span style=\"font-size:x-small;\"> SHRINKFILE<\/span><span style=\"color:#808080;font-size:x-small;\">(<\/span><span style=\"color:#ff0000;font-size:x-small;\">&#8216;Foo_LOG&#8217;<\/span><span style=\"color:#808080;font-size:x-small;\">,<\/span><span style=\"font-size:x-small;\">1<\/span><span style=\"color:#808080;font-size:x-small;\">)<em><span style=\"color:#808080;font-size:x-small;\"><em><font size=\"2\" color=\"#808080\">\u00a0<br \/>\n<\/font><\/em><\/span>\u00a0<br \/>\n<\/em><\/span><\/em><span style=\"color:#0000ff;font-size:x-small;\"><span style=\"color:#0000ff;font-size:x-small;\"><font size=\"2\" color=\"#0000ff\"><em>BACKUP<\/em><br \/>\n<\/font><\/span>\u00a0<br \/>\n<\/span><br \/>\n<em><span style=\"font-size:x-small;\"> <\/span><span style=\"color:#ff00ff;font-size:x-small;\">LOG Foo<\/span><span style=\"font-size:x-small;\">\u00a0<\/span><span style=\"color:#0000ff;font-size:x-small;\">WITH<\/span><span style=\"font-size:x-small;\"> TRUNCATE_ONLY <em><span style=\"font-size:x-small;\"><em><font size=\"2\">\u00a0<br \/>\n<\/font><\/em><\/span>\u00a0<br \/>\n<\/em><\/span><\/em><span style=\"color:#0000ff;font-size:x-small;\"><span style=\"color:#0000ff;font-size:x-small;\"><font size=\"2\" color=\"#0000ff\"><em>DBCC<\/em><br \/>\n<\/font><\/span>\u00a0<br \/>\n<\/span><br \/>\n<em><span style=\"font-size:x-small;\"> SHRINKFILE<\/span><span style=\"color:#808080;font-size:x-small;\">(<\/span><span style=\"color:#ff0000;font-size:x-small;\">&#8216;Foo_LOG&#8217;<\/span><span style=\"color:#808080;font-size:x-small;\">,<\/span><span style=\"font-size:x-small;\">1<\/span><span style=\"color:#808080;font-size:x-small;\">)<em><span style=\"color:#808080;font-size:x-small;\"><em><font size=\"2\" color=\"#808080\">\u00a0<br \/>\n<\/font><\/em><\/span>\u00a0<br \/>\n<\/em><\/span><\/em><span style=\"font-size:x-small;\"><em>go<\/em><br \/>\n<span style=\"font-size:x-small;\"><font size=\"2\">\u00a0<br \/>\n<\/font><\/span>\u00a0<br \/>\n<\/span><\/p><\/blockquote>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/iddles.co.uk\/aggbug.aspx?PostID=6434\" alt=\"\" width=\"1\" height=\"1\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Can never remember the syntax so here is is as a reminder: Make the database current then run DBCC \u00a0 SHRINKFILE(&#8216;Foo_LOG&#8217;,1)\u00a0 \u00a0 BACKUP \u00a0 LOG Foo\u00a0WITH TRUNCATE_ONLY \u00a0 \u00a0 DBCC \u00a0 SHRINKFILE(&#8216;Foo_LOG&#8217;,1)\u00a0 \u00a0 go \u00a0 \u00a0<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[17],"tags":[33,49,51],"class_list":["post-19","post","type-post","status-publish","format-standard","hentry","category-windows","tag-flush","tag-sql-server","tag-transaction-log","post-preview"],"_links":{"self":[{"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/19","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=19"}],"version-history":[{"count":0,"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/19\/revisions"}],"wp:attachment":[{"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=19"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/categories?post=19"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iddles.co.uk\/index.php\/wp-json\/wp\/v2\/tags?post=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}