{"id":770,"date":"2017-05-02T17:34:43","date_gmt":"2017-05-02T14:34:43","guid":{"rendered":"http:\/\/surgery.moscow\/smos\/?p=770"},"modified":"2020-05-08T13:58:42","modified_gmt":"2020-05-08T10:58:42","slug":"mssql-%d0%bf%d1%83%d1%82%d0%b5%d0%b2%d0%be%d0%b4%d0%b8%d1%82%d0%b5%d0%bb%d1%8c-%d0%bf%d0%be-%d0%b2%d0%be%d0%bf%d1%80%d0%be%d1%81%d0%b0%d0%bc-%d0%be%d0%bf%d1%82%d0%b8%d0%bc%d0%b8%d0%b7%d0%b8%d1%86","status":"publish","type":"post","link":"https:\/\/surgery.moscow\/smos\/2017\/05\/02\/mssql-%d0%bf%d1%83%d1%82%d0%b5%d0%b2%d0%be%d0%b4%d0%b8%d1%82%d0%b5%d0%bb%d1%8c-%d0%bf%d0%be-%d0%b2%d0%be%d0%bf%d1%80%d0%be%d1%81%d0%b0%d0%bc-%d0%be%d0%bf%d1%82%d0%b8%d0%bc%d0%b8%d0%b7%d0%b8%d1%86\/","title":{"rendered":"MSSQL \u043f\u0443\u0442\u0435\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u043f\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438"},"content":{"rendered":"<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0444\u0430\u0439\u043b \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 name_db \u0441\u0436\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0434\u043e 1 \u041c\u0411. \u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0435 <strong>DBCC SHRINKFILE<\/strong> \u0441\u0436\u0430\u0442\u044c \u0444\u0430\u0439\u043b, \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0435\u0447\u044c \u0435\u0433\u043e, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 SIMPLE \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p><strong>USE<\/strong> [name_db]<br \/>\n<strong>GO<\/strong><br \/>\n&#8212; Truncate the log by changing the database recovery model to SIMPLE.<br \/>\n<strong>ALTER DATABASE<\/strong> [name_db]<br \/>\n<strong>SET RECOVERY SIMPLE;<\/strong><br \/>\n<strong>GO<\/strong><br \/>\n&#8212; Shrink the truncated log file to 1 MB.<br \/>\n<strong>DBCC SHRINKFILE<\/strong> (name_db_log, 1);<br \/>\n<strong>GO<\/strong><br \/>\n&#8212; Reset the database recovery model.<br \/>\n<strong>ALTER DATABASE<\/strong> [name_db]<br \/>\n<strong>SET RECOVERY FULL;<\/strong><br \/>\n<strong> GO<\/strong><\/p>\n<p>https:\/\/msdn.microsoft.com\/ru-ru\/library\/ms189493.aspx<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0444\u0430\u0439\u043b \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 name_db \u0441\u0436\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0434\u043e 1 \u041c\u0411. \u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0435 DBCC SHRINKFILE \u0441\u0436\u0430\u0442\u044c \u0444\u0430\u0439\u043b,<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,22],"tags":[],"class_list":["post-770","post","type-post","status-publish","format-standard","hentry","category-internet","category-technology"],"_links":{"self":[{"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/posts\/770","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/comments?post=770"}],"version-history":[{"count":4,"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/posts\/770\/revisions"}],"predecessor-version":[{"id":775,"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/posts\/770\/revisions\/775"}],"wp:attachment":[{"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/media?parent=770"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/categories?post=770"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/surgery.moscow\/smos\/wp-json\/wp\/v2\/tags?post=770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}