{"id":2027,"date":"2016-07-05T08:36:50","date_gmt":"2016-07-05T08:36:50","guid":{"rendered":"http:\/\/galhano.com\/blog\/?p=2027"},"modified":"2016-07-05T08:46:13","modified_gmt":"2016-07-05T08:46:13","slug":"sql-server-the-transaction-log-for-database-is-full","status":"publish","type":"post","link":"http:\/\/galhano.com\/blog\/?p=2027","title":{"rendered":"SQL Server: The transaction log for database is full"},"content":{"rendered":"<p>Right-click your database in SQL Server Manager, and check the Options page. Switch Recovery Model from <code>Full<\/code> to <code>Simple<\/code> then right-click the database again. Select <code>Tasks<\/code> <code>Shrink<\/code>, <code>Files<\/code>. Shrink the log file to a proper size (I generally stick to 20-25% of the size of the data files).<\/p>\n<p>Switch back to <code>Full Recovery Model<\/code>, and take a full database backup straight away.<\/p>\n<p>You now need to figure out whether you need the ability to recover your database to a point-in-time. If so, schedule regular transaction log and perhaps differential backups according to the requirements of your business.<\/p>\n<p>In case the business can live with a certain amount of data loss, schedule full backups and switch to <code>Simple<\/code> mode.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Right-click your database in SQL Server Manager, and check the Options page. Switch Recovery Model from Full to Simple then right-click the database again. Select Tasks Shrink, Files. Shrink the log file to a proper size (I generally stick to 20-25% of the size of the data files). Switch back to Full Recovery Model, and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"close","ping_status":"close","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-2027","post","type-post","status-publish","format-standard","hentry","category-sql-server","author-admin"],"_links":{"self":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2027","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2027"}],"version-history":[{"count":1,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2027\/revisions"}],"predecessor-version":[{"id":2028,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2027\/revisions\/2028"}],"wp:attachment":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2027"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2027"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}