{"id":77428,"date":"2026-02-24T16:57:31","date_gmt":"2026-02-24T08:57:31","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/77428.html"},"modified":"2026-02-24T16:57:31","modified_gmt":"2026-02-24T08:57:31","slug":"sqlserver%e6%97%a5%e5%bf%97%e6%96%87%e4%bb%b6%e6%b8%85%e7%90%86","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/77428.html","title":{"rendered":"SQLServer\u65e5\u5fd7\u6587\u4ef6\u6e05\u7406"},"content":{"rendered":"<p>SQL Server \u5b8c\u6574\u6062\u590d\u6a21\u5f0f\u6570\u636e\u4fdd\u62a4\u5f3a&#xff0c;\u4f46\u4e8b\u52a1\u65e5\u5fd7\u5b8c\u6574\u8bb0\u5f55\u4f1a\u4f7f\u65e5\u5fd7\u6587\u4ef6\u5927&#xff0c;\u7ba1\u7406\u590d\u6742&#xff1b;\u7b80\u5355\u6062\u590d\u6a21\u5f0f\u7ba1\u7406\u7b80\u4fbf\u3001\u65e5\u5fd7\u5927\u5c0f\u53ef\u63a7&#xff0c;\u4f46\u6062\u590d\u80fd\u529b\u5f31&#xff0c;\u9009\u62e9\u6062\u590d\u6a21\u5f0f\u8981\u4f9d\u4e1a\u52a1\u9700\u6c42\u3001\u6570\u636e\u91cd\u8981\u6027\u548c\u6570\u636e\u4e22\u5931\u5bb9\u5fcd\u5ea6\u800c\u5b9a\u3002\u65e5\u5fd7&#xff08;.ldf&#xff09;\u6587\u4ef6\u8fc7\u5927\u65f6&#xff0c;\u53ef\u7528\u811a\u672c\u6e05\u7406\u6536\u7f29\u3002<\/p>\n<p>Use testDB &#8211;\u6570\u636e\u5e93\u540d\u79f0<br \/>\nGO<br \/>\nALTER DATABASE testDB<br \/>\nSET RECOVERY SIMPLE WITH NO_WAIT<br \/>\nALTER DATABASE testDB<br \/>\nSET RECOVERY SIMPLE<br \/>\nGO<br \/>\nUSE testDB<br \/>\nDECLARE &#064;logname VARCHAR(150)<br \/>\nSELECT &#064;logname &#061; NAME<br \/>\nFROM   sys.database_files<br \/>\nWHERE  NAME LIKE&#039;%log&#039;<br \/>\nDBCC SHRINKFILE(&#064;logname, 11, TRUNCATEONLY)<br \/>\nGO<\/p>\n<p>ALTER DATABASE testDB<br \/>\nSET RECOVERY FULL WITH NO_WAIT<br \/>\nALTER DATABASE testDB<br \/>\nSET RECOVERY FULL<br \/>\nGO<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SQL Server \u5b8c\u6574\u6062\u590d\u6a21\u5f0f\u6570\u636e\u4fdd\u62a4\u5f3a&#xff0c;\u4f46\u4e8b\u52a1\u65e5\u5fd7\u5b8c\u6574\u8bb0\u5f55\u4f1a\u4f7f\u65e5\u5fd7\u6587\u4ef6\u5927&#xff0c;\u7ba1\u7406\u590d\u6742&#xff1b;\u7b80\u5355\u6062\u590d\u6a21\u5f0f\u7ba1\u7406\u7b80\u4fbf\u3001\u65e5\u5fd7\u5927\u5c0f\u53ef\u63a7&#xff0c;\u4f46\u6062\u590d\u80fd\u529b\u5f31&#xff0c;\u9009\u62e9\u6062\u590d\u6a21\u5f0f\u8981\u4f9d\u4e1a\u52a1\u9700\u6c42\u3001\u6570\u636e\u91cd\u8981\u6027\u548c\u6570\u636e\u4e22\u5931\u5bb9\u5fcd\u5ea6\u800c\u5b9a\u3002\u65e5\u5fd7&#xff08;.ldf&#xff09;\u6587\u4ef6\u8fc7\u5927\u65f6&#xff0c;\u53ef\u7528\u811a\u672c\u6e05\u7406\u6536\u7f29\u3002Use testDB &#8211;\u6570\u636e\u5e93\u540d\u79f0<br \/>\nGO<br \/>\nALTER DATABASE testDB<br \/>\nSET RECOVERY SIMPL<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[768,538,100],"topic":[],"class_list":["post-77428","post","type-post","status-publish","format-standard","hentry","category-server","tag-sql","tag-sqlserver","tag-100"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SQLServer\u65e5\u5fd7\u6587\u4ef6\u6e05\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/77428.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQLServer\u65e5\u5fd7\u6587\u4ef6\u6e05\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"SQL Server \u5b8c\u6574\u6062\u590d\u6a21\u5f0f\u6570\u636e\u4fdd\u62a4\u5f3a&#xff0c;\u4f46\u4e8b\u52a1\u65e5\u5fd7\u5b8c\u6574\u8bb0\u5f55\u4f1a\u4f7f\u65e5\u5fd7\u6587\u4ef6\u5927&#xff0c;\u7ba1\u7406\u590d\u6742&#xff1b;\u7b80\u5355\u6062\u590d\u6a21\u5f0f\u7ba1\u7406\u7b80\u4fbf\u3001\u65e5\u5fd7\u5927\u5c0f\u53ef\u63a7&#xff0c;\u4f46\u6062\u590d\u80fd\u529b\u5f31&#xff0c;\u9009\u62e9\u6062\u590d\u6a21\u5f0f\u8981\u4f9d\u4e1a\u52a1\u9700\u6c42\u3001\u6570\u636e\u91cd\u8981\u6027\u548c\u6570\u636e\u4e22\u5931\u5bb9\u5fcd\u5ea6\u800c\u5b9a\u3002\u65e5\u5fd7&#xff08;.ldf&#xff09;\u6587\u4ef6\u8fc7\u5927\u65f6&#xff0c;\u53ef\u7528\u811a\u672c\u6e05\u7406\u6536\u7f29\u3002Use testDB --\u6570\u636e\u5e93\u540d\u79f0 GO ALTER DATABASE testDB SET RECOVERY SIMPL\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/77428.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-24T08:57:31+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/77428.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/77428.html\",\"name\":\"SQLServer\u65e5\u5fd7\u6587\u4ef6\u6e05\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-02-24T08:57:31+00:00\",\"dateModified\":\"2026-02-24T08:57:31+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/77428.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/77428.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/77428.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQLServer\u65e5\u5fd7\u6587\u4ef6\u6e05\u7406\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SQLServer\u65e5\u5fd7\u6587\u4ef6\u6e05\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/77428.html","og_locale":"zh_CN","og_type":"article","og_title":"SQLServer\u65e5\u5fd7\u6587\u4ef6\u6e05\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"SQL Server \u5b8c\u6574\u6062\u590d\u6a21\u5f0f\u6570\u636e\u4fdd\u62a4\u5f3a&#xff0c;\u4f46\u4e8b\u52a1\u65e5\u5fd7\u5b8c\u6574\u8bb0\u5f55\u4f1a\u4f7f\u65e5\u5fd7\u6587\u4ef6\u5927&#xff0c;\u7ba1\u7406\u590d\u6742&#xff1b;\u7b80\u5355\u6062\u590d\u6a21\u5f0f\u7ba1\u7406\u7b80\u4fbf\u3001\u65e5\u5fd7\u5927\u5c0f\u53ef\u63a7&#xff0c;\u4f46\u6062\u590d\u80fd\u529b\u5f31&#xff0c;\u9009\u62e9\u6062\u590d\u6a21\u5f0f\u8981\u4f9d\u4e1a\u52a1\u9700\u6c42\u3001\u6570\u636e\u91cd\u8981\u6027\u548c\u6570\u636e\u4e22\u5931\u5bb9\u5fcd\u5ea6\u800c\u5b9a\u3002\u65e5\u5fd7&#xff08;.ldf&#xff09;\u6587\u4ef6\u8fc7\u5927\u65f6&#xff0c;\u53ef\u7528\u811a\u672c\u6e05\u7406\u6536\u7f29\u3002Use testDB --\u6570\u636e\u5e93\u540d\u79f0 GO ALTER DATABASE testDB SET RECOVERY SIMPL","og_url":"https:\/\/www.wsisp.com\/helps\/77428.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-02-24T08:57:31+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/77428.html","url":"https:\/\/www.wsisp.com\/helps\/77428.html","name":"SQLServer\u65e5\u5fd7\u6587\u4ef6\u6e05\u7406 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-02-24T08:57:31+00:00","dateModified":"2026-02-24T08:57:31+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/77428.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/77428.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/77428.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"SQLServer\u65e5\u5fd7\u6587\u4ef6\u6e05\u7406"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/77428","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=77428"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/77428\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=77428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=77428"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=77428"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=77428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}