{"id":2393,"date":"2024-03-24T15:54:25","date_gmt":"2024-03-24T07:54:25","guid":{"rendered":"http:\/\/www.plm.cn\/?p=2393"},"modified":"2024-03-28T17:15:01","modified_gmt":"2024-03-28T09:15:01","slug":"sqlserver-2008-%e4%bb%a5%e4%b8%8a%e7%89%88%e6%9c%ac%e6%95%b0%e6%8d%ae%e5%ba%93%e6%97%a5%e5%bf%97%e6%b8%85%e7%90%86%ef%bc%88%e4%ba%b2%e6%b5%8b%ef%bc%89","status":"publish","type":"post","link":"http:\/\/www.plm.cn\/2393\/","title":{"rendered":"SQLServer 2008 \u4ee5\u4e0a\u7248\u672c\u6570\u636e\u5e93\u65e5\u5fd7\u6e05\u7406\uff08\u4eb2\u6d4b\uff09"},"content":{"rendered":"

\u5f53\u6570\u636e\u5e93\u7684\u65e5\u5fd7\u6587\u4ef6\u592a\u5927\u7684\u60c5\u51b5\u4e0b\uff0cSQLServer 2008 \u4ee5\u4e0a\u7248\u672c\u8fdb\u884c\u6570\u636e\u5e93\u65e5\u5fd7\u6e05\u7406\uff0c\u9700\u8981\u91c7\u7528\u7684\u65b9\u6cd5\u5982\u4e0b\uff08\u6267\u884c\u524d \u5c06\u6570\u636e\u5e93\u540d \u6539\u6210\u4f60\u9700\u8981\u6e05\u7406\u7684\u6570\u636e\u540d\u79f0\uff09<\/p>\n

\"\"<\/p>\n


\n
–1\uff09\u67e5\u8be2\u6307\u5b9a\u6570\u636e\u5e93\u7684 <\u6570\u636e\u5e93\u65e5\u5fd7\u6587\u4ef6\u540d\u79f0<\/span>>\u00a0 \uff0c\u901a\u8fc7\u4e0b\u9762\u7684sql\u7684\u8bed\u53e5\u67e5\u8be2\u5230<\u6570\u636e\u5e93\u65e5\u5fd7\u6587\u4ef6\u540d\u79f0>\uff0c\u66ff\u6362\u5230\u4e0b\u9762sql\u7684<\u6570\u636e\u5e93\u65e5\u5fd7\u6587\u4ef6\u540d\u79f0<\/span>><\/div>\n
USE [\u6570\u636e\u5e93\u540d<\/span>]<\/div>\n
GO<\/div>\n
SELECT name FROM SYS.database_files WHERE type_desc=’LOG’<\/div>\n
\n
\n<\/div>\n
–2\uff09\u6267\u884c\u540e\u6e05\u7406\u8be5\u6570\u636e\u5e93\u65e5\u5fd7\u6587\u4ef6<\/div>\n
USE [master]<\/div>\n
GO<\/div>\n
ALTER DATABASE [\u6570\u636e\u5e93\u540d<\/span>] SET RECOVERY SIMPLE WITH NO_WAIT<\/div>\n
GO<\/div>\n
ALTER DATABASE [\u6570\u636e\u5e93\u540d<\/span>] SET RECOVERY SIMPLE<\/div>\n
GO<\/div>\n
USE [\u6570\u636e\u5e93\u540d<\/span>]<\/div>\n
GO<\/div>\n
DBCC SHRINKFILE (N’\u6570\u636e\u5e93\u65e5\u5fd7\u6587\u4ef6\u540d\u79f0<\/span>‘ , 0,TRUNCATEONLY)<\/div>\n
GO<\/div>\n
USE [master]<\/div>\n
GO<\/div>\n
ALTER DATABASE [\u6570\u636e\u5e93\u540d<\/span>] SET RECOVERY FULL WITH NO_WAIT<\/div>\n
GO<\/div>\n
ALTER DATABASE [\u6570\u636e\u5e93\u540d<\/span>] SET RECOVERY FULL<\/div>\n
GO<\/div>\n
<\/div>\n","protected":false},"excerpt":{"rendered":"

\u5f53\u6570\u636e\u5e93\u7684\u65e5\u5fd7\u6587\u4ef6\u592a\u5927\u7684\u60c5\u51b5\u4e0b\uff0cSQLServer 2008 \u4ee5\u4e0a\u7248\u672c\u8fdb\u884c\u6570\u636e\u5e93\u65e5\u5fd7\u6e05\u7406\uff0c\u9700\u8981\u91c7\u7528\u7684\u65b9\u6cd5\u5982\u4e0b\uff08 […]<\/p>\n","protected":false},"author":1,"featured_media":2454,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,12],"tags":[14],"class_list":["post-2393","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-plmcenter","category-ssdoc","tag-jiaoben"],"_links":{"self":[{"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/posts\/2393","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/comments?post=2393"}],"version-history":[{"count":3,"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/posts\/2393\/revisions"}],"predecessor-version":[{"id":2456,"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/posts\/2393\/revisions\/2456"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/media\/2454"}],"wp:attachment":[{"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/media?parent=2393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/categories?post=2393"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.plm.cn\/wp-json\/wp\/v2\/tags?post=2393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}