{"id":56,"date":"2023-10-18T17:22:35","date_gmt":"2023-10-18T09:22:35","guid":{"rendered":"http:\/\/www.x4s.cn\/?p=56"},"modified":"2023-10-18T17:22:35","modified_gmt":"2023-10-18T09:22:35","slug":"sql-server-%e4%ba%8b%e5%8a%a1%e6%97%a5%e5%bf%97%e6%96%87%e4%bb%b6%e8%bf%87%e5%a4%a7-%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88","status":"publish","type":"post","link":"http:\/\/www.x4s.cn\/?p=56","title":{"rendered":"SQL Server \u4e8b\u52a1\u65e5\u5fd7\u6587\u4ef6\u8fc7\u5927 \u89e3\u51b3\u65b9\u6848"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u4e8b\u52a1\u65e5\u5fd7\u6587\u4ef6\uff08Transaction Log File\uff09\u662f\u7528\u6765\u8bb0\u5f55\u6570\u636e\u5e93\u66f4\u65b0\u60c5\u51b5\u7684\u6587\u4ef6\uff0c\u6269\u5c55\u540d\u4e3aldf\u3002\u5f53\u51fa\u73b0\u4ee5\u4e0b\u60c5\u51b5\u65f6\uff0c\u5c31\u4f1a\u62a5\u201c<strong>\u4e8b\u52a1\u65e5\u5fd7\u5df2\u6ee1<\/strong>\u201d\u7684\u9519\u8bef\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u65e5\u5fd7\u6587\u4ef6\u6ca1\u6709\u8bbe\u7f6e\u4e86\u81ea\u52a8\u589e\u957f\uff0c\u5f53\u8bb0\u5f55\u8d85\u8fc7\u521d\u59cb\u5927\u5c0f\uff1b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u65e5\u5fd7\u6587\u4ef6\u8bbe\u7f6e\u4e86\u81ea\u52a8\u589e\u957f\uff0c\u201c\u6700\u5927\u6587\u4ef6\u5927\u5c0f\u201d\u8bbe\u7f6e\u4e86\u5177\u4f53\u7684\u5927\u5c0f\uff08\u59822000M\uff09\uff0c\u5f53\u6587\u4ef6\u8fbe\u5230\u8bbe\u7f6e\u7684\u5927\u5c0f\u65f6\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"toc.0.8613082047960423\">\u89e3\u51b3SQL Server\u6570\u636e\u5e93\u4e8b\u52a1\u65e5\u5fd7\u5df2\u6ee1\u7684\u65b9\u6cd5<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u8981\u89e3\u51b3\u4e8b\u52a1\u65e5\u5fd7\u5df2\u6ee1\u7684\u95ee\u9898\uff0c\u53ef\u4ee5\u91c7\u7528\u4ee5\u4e0b\u4e09\u79cd\u65b9\u6cd5\uff0c\u622a\u65ad\u65e5\u5fd7\u3001\u6536\u7f29\u65e5\u5fd7\u6587\u4ef6\u4ee5\u53ca\u4fee\u6539\u6570\u636e\u5e93\u6062\u590d\u6a21\u5f0f.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"toc.0.233305499839203\">\u4fee\u6539\u6570\u636e\u5e93\u6062\u590d\u6a21\u5f0f<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u5c06\u6570\u636e\u5e93\u6062\u590d\u6a21\u5f0f\u4ece\u201c<strong>\u5b8c\u6574\u6a21\u5f0f<\/strong>\u201d\u6216\u201c<strong>\u5927\u5bb9\u91cf\u65e5\u5fd7\u6062\u590d\u6a21\u5f0f<\/strong>\u201d\u66f4\u6539\u4e3a\u201c<strong>\u7b80\u5355\u6a21\u5f0f<\/strong>\u201d\u53ef\u4ee5\u89e3\u51b3SQL Server\u6570\u636e\u5e93\u4e8b\u52a1\u65e5\u5fd7\u5df2\u6ee1\u95ee\u9898\u3002\u4f46\u662f\uff0c\u8bf7\u6ce8\u610f\u8fd9\u79cd\u65b9\u6cd5\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6570\u636e\u4e22\u5931\u3002\u4ee5\u4e0b\u662f\u4fee\u6539\u6570\u636e\u5e93\u6062\u590d\u6a21\u5f0f\u7684\u6b65\u9aa4\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1. \u5728 SQL Server Management Studio \u4e2d\uff0c\u53f3\u952e\u5355\u51fb\u6570\u636e\u5e93\uff0c\u9009\u62e9\u201c<strong>\u5c5e\u6027<\/strong>\u201d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/img_convert\/6a7ce5d8a3f4cf0ee686b6ca0252faf8.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">2. \u5728\u201c<strong>\u9009\u9879<\/strong>\u201d\u4e2d\uff0c\u5c06\u201c<strong>\u6062\u590d\u6a21\u5f0f<\/strong>\u201d\u8bbe\u7f6e\u4e3a\u201c<strong>\u7b80\u5355<\/strong>\u201d\uff0c\u7136\u540e\u70b9\u51fb\u201c<strong>\u786e\u5b9a<\/strong>\u201d<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/img_convert\/ba96b25c3a294900499c54e5284328c1.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">3. \u5728 SQL Server Management Studio \u4e2d\uff0c\u53f3\u952e\u5355\u51fb\u6570\u636e\u5e93\uff0c\u9009\u62e9\u201c<strong>\u4efb\u52a1<\/strong>\u201d-&gt;\u201c<strong>\u5907\u4efd<\/strong>\u201d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/img_convert\/a9a3afb590284921fda300328268850b.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">4. \u5728\u201c<strong>\u5907\u4efd\u7c7b\u578b<\/strong>\u201d\u4e2d\uff0c\u9009\u62e9\u201c<strong>\u65e5\u5fd7<\/strong>\u201d\uff0c\u70b9\u51fb\u201c<strong>\u786e\u5b9a<\/strong>\u201d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/img_convert\/a731031ce800682b499434ae008d6c28.png\" alt=\"\"\/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"toc.0.9589998807172062\">\u622a\u65ad\u65e5\u5fd7<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u622a\u65ad\u65e5\u5fd7\u662f\u89e3\u51b3SQL Server\u6570\u636e\u5e93\u4e8b\u52a1\u65e5\u5fd7\u5df2\u6ee1\u95ee\u9898\u7684\u8f83\u7b80\u5355\u65b9\u6cd5\u3002\u901a\u8fc7\u622a\u65ad\u65e5\u5fd7\uff0c\u53ef\u4ee5\u6e05\u9664\u65e5\u5fd7\u6587\u4ef6\u4e2d\u7684\u65e7\u6570\u636e\uff0c\u4ece\u800c\u91ca\u653e\u7a7a\u95f4\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u5728\u5bf9\u8c61\u8d44\u6e90\u7ba1\u7406\u5668\u4e2d\uff0c\u8fde\u63a5\u5230 SQL Server \u6570\u636e\u5e93\u5f15\u64ce\u7684\u5b9e\u4f8b\uff0c\u7136\u540e\u5c55\u5f00\u8be5\u5b9e\u4f8b\u3002<\/li>\n\n\n\n<li>\u5c55\u5f00\u201c<strong>\u6570\u636e\u5e93<\/strong>\u201d\uff0c\u518d\u53f3\u952e\u5355\u51fb\u8981\u622a\u65ad\u65e5\u5fd7\u7684\u6570\u636e\u5e93\u3002<\/li>\n\n\n\n<li>\u6307\u5411\u201c<strong>\u4efb\u52a1<\/strong>\u201d\uff0c\u6307\u5411\u201c<strong>\u6536\u7f29<\/strong>\u201d\uff0c\u7136\u540e\u9009\u62e9\u201c<strong>\u6587\u4ef6<\/strong>\u201d\u3002<\/li>\n\n\n\n<li>\u9009\u62e9\u6587\u4ef6\u7684\u6587\u4ef6\u7c7b\u578b\u3002\u53ef\u7528\u7684\u9009\u9879\u5305\u62ec\u201c\u6570\u636e\u201d\u548c\u201c\u65e5\u5fd7\u201d\u6587\u4ef6\u3002\u9ed8\u8ba4\u9009\u9879\u4e3a\u201c\u6570\u636e\u201d\u3002<\/li>\n\n\n\n<li>\u5728\u4e0e\u4ee5\u4e0a\u6240\u9009\u7684\u201c<strong>\u6587\u4ef6\u7c7b\u578b<\/strong>\u201d\u76f8\u5173\u8054\u7684\u6587\u4ef6\u7ec4\u5217\u8868\u4e2d\u9009\u62e9\u6587\u4ef6\u7ec4\u3002<\/li>\n\n\n\n<li>\u4ece\u6240\u9009\u6587\u4ef6\u7ec4\u548c\u6587\u4ef6\u7c7b\u578b\u7684\u53ef\u7528\u6587\u4ef6\u5217\u8868\u4e2d\u9009\u62e9\u6587\u4ef6\u3002<\/li>\n\n\n\n<li>\u9009\u4e2d\u201c<strong>\u91ca\u653e\u672a\u4f7f\u7528\u7684\u7a7a\u95f4<\/strong>\u201d\u9009\u9879\uff0c\u5c06\u4e3a\u64cd\u4f5c\u7cfb\u7edf\u91ca\u653e\u6587\u4ef6\u4e2d\u6240\u6709\u672a\u7528\u7a7a\u95f4\uff0c\u5e76\u5c1d\u8bd5\u5c06\u884c\u91cd\u65b0\u5b9a\u4f4d\u5230\u672a\u5206\u914d\u9875\u3002<\/li>\n\n\n\n<li>\u6839\u636e\u9700\u8981\uff0c\u8f93\u5165\u5728\u6536\u7f29\u6570\u636e\u5e93\u540e\u6570\u636e\u5e93\u6587\u4ef6\u4e2d\u8981\u4fdd\u7559\u7684\u6700\u5927\u53ef\u7528\u7a7a\u95f4\u767e\u5206\u6bd4\u3002\u503c\u53ef\u4ee5\u4ecb\u4e8e 0 \u548c 99 \u4e4b\u95f4\u3002<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u8bf7\u6ce8\u610f\uff0c\u5728\u6536\u7f29\u65e5\u5fd7\u6587\u4ef6\u4e4b\u524d\uff0c\u9700\u8981\u5c06\u6570\u636e\u5e93\u7684\u6062\u590d\u6a21\u5f0f\u66f4\u6539\u4e3a\u7b80\u5355\u6a21\u5f0f\u3002\u6b64\u5916\uff0c\u6536\u7f29\u65e5\u5fd7\u6587\u4ef6\u7684\u6b65\u9aa4\u4e0e\u622a\u65ad\u65e5\u5fd7\u6587\u4ef6\u7684\u6b65\u9aa4\u7c7b\u4f3c\uff0c\u4f46\u662f\u6536\u7f29\u65e5\u5fd7\u6587\u4ef6\u4f1a\u5c06\u65e5\u5fd7\u6587\u4ef6\u7684\u5927\u5c0f\u7f29\u5c0f\u5230\u6307\u5b9a\u7684\u5927\u5c0f\uff0c\u800c\u622a\u65ad\u65e5\u5fd7\u6587\u4ef6\u53ea\u662f\u5220\u9664\u4e0d\u6d3b\u52a8\u7684\u865a\u62df\u65e5\u5fd7\u6587\u4ef6\u4ee5\u91ca\u653e\u7a7a\u95f4\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u603b\u4e4b\uff0c\u4f7f\u7528 SQL Server Management Studio \u622a\u65ad\u65e5\u5fd7\u7684\u65b9\u6cd5\u5305\u62ec\u8fde\u63a5\u5230 SQL Server <a href=\"https:\/\/so.csdn.net\/so\/search?q=%E6%95%B0%E6%8D%AE%E5%BA%93%E5%BC%95%E6%93%8E&amp;spm=1001.2101.3001.7020\" target=\"_blank\" rel=\"noreferrer noopener\">\u6570\u636e\u5e93\u5f15\u64ce<\/a>\u7684\u5b9e\u4f8b\uff0c\u5c55\u5f00\u201c<strong>\u6570\u636e\u5e93<\/strong>\u201d\uff0c\u53f3\u952e\u5355\u51fb\u8981\u622a\u65ad\u65e5\u5fd7\u7684\u6570\u636e\u5e93\uff0c\u6307\u5411\u201c\u4efb\u52a1\u201d\uff0c\u6307\u5411\u201c<strong>\u6536\u7f29<\/strong>\u201d\uff0c\u7136\u540e\u9009\u62e9\u201c<strong>\u6587\u4ef6<\/strong>\u201d\u3002\u8bf7\u6ce8\u610f\uff0c\u5728\u6267\u884c\u622a\u65ad\u64cd\u4f5c\u4e4b\u524d\uff0c\u5e94\u8be5<a href=\"https:\/\/www.abackup.com\/enterprise-backup\/three-methods-of-database-backup-6540.html\">\u5907\u4efd\u6570\u636e\u5e93<\/a>\u4ee5\u9632\u6b62\u6570\u636e\u4e22\u5931\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"toc.0.16047011649807552\">\u6536\u7f29\u65e5\u5fd7\u6587\u4ef6<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u6536\u7f29\u65e5\u5fd7\u6587\u4ef6\u662f\u53e6\u4e00\u79cd\u89e3\u51b3SQL Server\u6570\u636e\u5e93\u4e8b\u52a1\u65e5\u5fd7\u5df2\u6ee1\u95ee\u9898\u7684\u65b9\u6cd5\u3002\u901a\u8fc7\u6536\u7f29\u65e5\u5fd7\u6587\u4ef6\uff0c\u53ef\u4ee5\u538b\u7f29\u65e5\u5fd7\u6587\u4ef6\u7684\u5927\u5c0f\uff0c\u4ece\u800c\u91ca\u653e\u7a7a\u95f4\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728 SQL Server \u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528 SQL Server Management Studio \u6216 Transact-SQL \u6765\u6536\u7f29\u6570\u636e\u6216\u65e5\u5fd7\u6587\u4ef6\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528 SQL Server Management Studio \u6536\u7f29\u65e5\u5fd7\u6587\u4ef6\u7684\u6b65\u9aa4\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u5bf9\u8c61<a href=\"https:\/\/so.csdn.net\/so\/search?q=%E8%B5%84%E6%BA%90%E7%AE%A1%E7%90%86%E5%99%A8&amp;spm=1001.2101.3001.7020\" target=\"_blank\" rel=\"noreferrer noopener\">\u8d44\u6e90\u7ba1\u7406\u5668<\/a>\u4e2d\uff0c\u8fde\u63a5\u5230 SQL Server \u6570\u636e\u5e93\u5f15\u64ce\u7684\u5b9e\u4f8b\uff0c\u7136\u540e\u5c55\u5f00\u8be5\u5b9e\u4f8b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5c55\u5f00\u201c<strong>\u6570\u636e\u5e93<\/strong>\u201d\uff0c\u518d\u53f3\u952e\u5355\u51fb\u8981\u6536\u7f29\u7684\u6570\u636e\u5e93\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6307\u5411\u201c<strong>\u4efb\u52a1<\/strong>\u201d\uff0c\u6307\u5411\u201c<strong>\u6536\u7f29<\/strong>\u201d\uff0c\u7136\u540e\u9009\u62e9\u201c<strong>\u6587\u4ef6<\/strong>\u201d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/img_convert\/fdd1127572e79ccdb8fd752c4d9e90f6.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u9009\u62e9\u6587\u4ef6\u7684\u6587\u4ef6\u7c7b\u578b\u3002\u53ef\u7528\u7684\u9009\u9879\u5305\u62ec\u201c<strong>\u6570\u636e<\/strong>\u201d\u548c\u201c<strong>\u65e5\u5fd7<\/strong>\u201d\u6587\u4ef6\u3002\u9ed8\u8ba4\u9009\u9879\u4e3a\u201c<strong>\u6570\u636e<\/strong>\u201d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u4e0e\u4ee5\u4e0a\u6240\u9009\u7684\u201c\u6587\u4ef6\u7c7b\u578b\u201d\u76f8\u5173\u8054\u7684\u6587\u4ef6\u7ec4\u5217\u8868\u4e2d\u9009\u62e9\u6587\u4ef6\u7ec4\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ece\u6240\u9009\u6587\u4ef6\u7ec4\u548c\u6587\u4ef6\u7c7b\u578b\u7684\u53ef\u7528\u6587\u4ef6\u5217\u8868\u4e2d\u9009\u62e9\u6587\u4ef6\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u9009\u4e2d\u201c<strong>\u91ca\u653e\u672a\u4f7f\u7528\u7684\u7a7a\u95f4<\/strong>\u201d\u9009\u9879\uff0c\u5c06\u4e3a\u64cd\u4f5c\u7cfb\u7edf\u91ca\u653e\u6587\u4ef6\u4e2d\u6240\u6709\u672a\u7528\u7a7a\u95f4\uff0c\u5e76\u5c1d\u8bd5\u5c06\u884c\u91cd\u65b0\u5b9a\u4f4d\u5230\u672a\u5206\u914d\u9875\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6839\u636e\u9700\u8981\uff0c\u8f93\u5165\u5728\u6536\u7f29\u6570\u636e\u5e93\u540e\u6570\u636e\u5e93\u6587\u4ef6\u4e2d\u8981\u4fdd\u7559\u7684\u6700\u5927\u53ef\u7528\u7a7a\u95f4\u767e\u5206\u6bd4\u3002\u503c\u53ef\u4ee5\u4ecb\u4e8e 0 \u548c 99 \u4e4b\u95f4\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8bf7\u6ce8\u610f\uff0c\u6536\u7f29\u65e5\u5fd7\u6587\u4ef6\u7684\u6b65\u9aa4\u4e0e\u6536\u7f29\u6570\u636e\u6587\u4ef6\u7684\u6b65\u9aa4\u7565\u6709\u4e0d\u540c\u3002\u5728\u6536\u7f29\u65e5\u5fd7\u6587\u4ef6\u4e4b\u524d\uff0c\u9700\u8981\u5c06\u6570\u636e\u5e93\u7684\u6062\u590d\u6a21\u5f0f\u66f4\u6539\u4e3a\u7b80\u5355\u6a21\u5f0f\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528 Transact-SQL \u6536\u7f29\u65e5\u5fd7\u6587\u4ef6\u7684\u6b65\u9aa4\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u5c06\u6570\u636e\u5e93\u7684\u6062\u590d\u6a21\u5f0f\u66f4\u6539\u4e3a\u7b80\u5355\u6a21\u5f0f\u3002<\/li>\n\n\n\n<li>\u622a\u65ad\u4e8b\u52a1\u65e5\u5fd7\u3002<\/li>\n\n\n\n<li>\u6536\u7f29\u65e5\u5fd7\u6587\u4ef6\u3002<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u5177\u4f53\u7684 Transact-SQL \u547d\u4ee4\u5982\u4e0b\uff1a&#8211; \u5c06\u6570\u636e\u5e93\u7684\u6062\u590d\u6a21\u5f0f\u66f4\u6539\u4e3a\u7b80\u5355\u6a21\u5f0f ALTER DATABASE database_name SET RECOVERY SIMPLE; &#8212; \u622a\u65ad\u4e8b\u52a1\u65e5\u5fd7 BACKUP LOG database_name WITH TRUNCATE_ONLY; &#8212; \u6536\u7f29\u65e5\u5fd7\u6587\u4ef6 DBCC SHRINKFILE (file_name, target_size);<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5176\u4e2d\uff0c<code>file_name<\/code>&nbsp;\u662f\u8981\u6536\u7f29\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u903b\u8f91\u540d\u79f0\uff0c<code>target_size<\/code>&nbsp;\u662f\u8981\u6536\u7f29\u5230\u7684\u76ee\u6807\u5927\u5c0f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u603b\u4e4b\uff0c\u6536\u7f29\u65e5\u5fd7\u6587\u4ef6\u7684\u6b65\u9aa4\u5305\u62ec\u5c06\u6570\u636e\u5e93\u7684\u6062\u590d\u6a21\u5f0f\u66f4\u6539\u4e3a\u7b80\u5355\u6a21\u5f0f\u3001\u622a\u65ad\u4e8b\u52a1\u65e5\u5fd7\u3001\u6536\u7f29\u65e5\u5fd7\u6587\u4ef6\u3002\u8bf7\u6ce8\u610f\uff0c\u5728\u6267\u884c\u6536\u7f29\u64cd\u4f5c\u4e4b\u524d\uff0c\u5e94\u8be5\u5907\u4efd\u6570\u636e\u5e93\u4ee5\u9632\u6b62\u6570\u636e\u4e22\u5931\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"toc.0.23593853458359892\">\u4f7f\u7528\u50b2\u6885\u4f01\u4e1a\u5907\u4efd\u7f51\u7edc\u7248\u8f6f\u4ef6\u5907\u4efd SQL Server \u6570\u636e\u5e93\u5e76\u89e3\u51b3\u4e8b\u52a1\u65e5\u5fd7\u5df2\u6ee1\u95ee\u9898<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u60a8\u7684 SQL Server \u6570\u636e\u5e93\u4e8b\u52a1\u65e5\u5fd7\u5df2\u6ee1\uff0c\u5e76\u4e14\u60a8\u6b63\u5728\u4f7f\u7528 SSMS \u89e3\u51b3\u8be5\u95ee\u9898\uff0c\u60a8\u4e5f\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u50b2\u6885\u4f01\u4e1a\u5907\u4efd\u7f51\u7edc\u7248\u8f6f\u4ef6\u6765\u5907\u4efd\u6570\u636e\u5e93\u3002\u50b2\u6885\u4f01\u4e1a\u5907\u4efd\u7f51\u7edc\u7248\u63d0\u4f9b\u4e86\u4ee5\u4e0b\u529f\u80fd\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u25c9 \u63d0\u4f9b\u7cfb\u7edf\/\u78c1\u76d8\/\u5206\u533a\/\u6587\u4ef6\u5907\u4efd\uff0c\u52a9\u60a8\u521b\u5efa\u96c6\u4e2d\u5907\u4efd\u5bf9\u4e8e LAN \u5185\u7684\u6240\u6709\u5ba2\u6237\u7aef\u3002\u5b83\u8fd8\u63d0\u4f9b SQL Server \u5907\u4efd\uff0c\u7528\u4e8e\u5728\u4e00\u53f0 PC\/\u670d\u52a1\u5668\u4e0a\u5907\u4efd\u591a\u4e2a\u5b9e\u4f8b\u3002<br>\u25c9 \u5b83\u4f7f\u60a8\u80fd\u591f\u4f7f\u7528\u8ba1\u5212\u529f\u80fd\u521b\u5efa\u81ea\u52a8\u5907\u4efd\u4efb\u52a1\u3002\u6709\u56db\u79cd\u53ef\u7528\u7684\u8ba1\u5212\u6a21\u5f0f\uff1a\u4e00\u6b21\u3001\u6bcf\u65e5\u3001\u6bcf\u5468\u548c\u6bcf\u6708\u3002<br>\u25c9 \u652f\u6301SQL Server 2019\/2017\/2016\/2014\/2012\/2008(R2)\/2005\u6570\u636e\u5e93\u5907\u4efd\u3002<br>\u25c9 \u5b83\u53ef\u4ee5\u5b89\u88c5\u5728Windows Server\uff08Windows Server 2019\/2016\/2012\/2011\/2008\/2003\u7b49\uff09\u548cWindows PC\uff08Windows 10\/8.1\/8\/7\/Vista\/XP\uff09\u4e0a\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f7f\u7528\u50b2\u6885\u4f01\u4e1a\u5907\u4efd\u7f51\u7edc\u7248\u8f6f\u4ef6\u5907\u4efd SQL Server \u6570\u636e\u5e93\u53ef\u4ee5\u5e2e\u52a9\u60a8\u89e3\u51b3\u4e8b\u52a1\u65e5\u5fd7\u5df2\u6ee1\u7684\u95ee\u9898\u3002\u4e0b\u9762\u662f\u4f7f\u7528\u50b2\u6885\u4f01\u4e1a\u5907\u4efd\u7f51\u7edc\u7248\u5907\u4efd SQL Server \u6570\u636e\u5e93\u7684\u6b65\u9aa4\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1. \u5728\u5c40\u57df\u7f51\u5185\u7684\u5176\u4e2d\u4e00\u53f0\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5\u50b2\u6885\u4f01\u4e1a\u5907\u4efd\u7f51\u7edc\u7248\u4f5c\u4e3a\u4e2d\u592e\u7ba1\u7406\u8ba1\u7b97\u673a\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2.\u5b89\u88c5\u5ba2\u6237\u7aef\u7a0b\u5e8f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u542f\u52a8\u50b2\u6885\u4f01\u4e1a\u5907\u4efd\u7f51\u7edc\u7248 \u5e76\u8f6c\u5230&nbsp;<strong>&#8220;\u8ba1\u7b97\u673a&#8221;<\/strong>&nbsp;&nbsp;&gt;&nbsp;&nbsp;<strong>&#8220;\u672a\u63a7\u5236\u7684\u8ba1\u7b97\u673a&#8221;<\/strong>&nbsp;&nbsp;&gt;&nbsp;&nbsp;<strong>&#8220;\u5b89\u88c5\u5ba2\u6237\u7aef&#8221;<\/strong>\u3002\u60a8\u5c06\u770b\u5230\u5982\u4e0b\u4e24\u4e2a\u9009\u9879\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u5ba2\u6237\u7aef\u624b\u52a8\u5b89\u88c5<\/strong>\uff1a\u70b9\u51fb\u201c\u4e0b\u4e00\u6b65\u201d\u5373\u53ef\u5f97\u5230\u5ba2\u6237\u7aef\u7a0b\u5e8f\u5b89\u88c5\u6587\u4ef6\u3002\u5c06\u5b89\u88c5\u6587\u4ef6\u590d\u5236\u5230\u88c5\u6709 SQL Server \u7684\u8ba1\u7b97\u673a\u4e0a\uff0c\u5e76\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u5b83\u4ee5\u5b89\u88c5\u50b2\u6885\u4f01\u4e1a\u5907\u4efd\u7f51\u7edc\u7248 Agent\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u8fdc\u7a0b\u5ba2\u6237\u7aef\u5b89\u88c5<\/strong>\uff1a\u70b9\u51fb\u201c\u4e0b\u4e00\u6b65\u201d\uff0c\u60a8\u5c06\u62e5\u6709\u5c40\u57df\u7f51\u5185\u6240\u6709\u53ef\u7528\u7684\u8ba1\u7b97\u673a\u3002\u9009\u62e9\u88c5\u6709SQL Server \u7684\u8ba1\u7b97\u673a\uff0c\u8f93\u5165\u5b83\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\uff0c\u7136\u540e\u5355\u51fb\u201c\u5b89\u88c5\u201d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/img_convert\/e11900f26696d50bd2f4e10c5404e03a.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">3.\u8bf7\u6c42\u63a7\u5236<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3.1. \u5982\u679c\u60a8\u624b\u52a8\u5b89\u88c5\u4e86\u5ba2\u6237\u7aef\u7a0b\u5e8f\uff0c\u5ba2\u6237\u7aef\u8ba1\u7b97\u673a\u5c06\u5217\u5728&nbsp;<strong>&#8220;\u8ba1\u7b97\u673a&#8221;<\/strong>&nbsp;&nbsp;&gt;&nbsp;&nbsp;<strong>\u201c\u672a\u63a7\u5236\u7684\u8ba1\u7b97\u673a\u201d<\/strong>\u4e0b\u3002\u52fe\u9009\u88c5\u6709SQL Server\u7684\u7535\u8111\uff0c\u70b9\u51fb&nbsp;<strong>\u201c\u8bf7\u6c42\u63a7\u5236\u201d<\/strong>&nbsp;\u83b7\u53d6\u63a7\u5236\u6743\u9650\u3002&nbsp;\u63d0\u4f9b\u4e86\u4e24\u79cd\u65b9\u6cd5\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u8f93\u5165\u8d26\u53f7<\/strong>\uff1a\u8f93\u5165\u5ba2\u6237\u7aef\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\uff0c\u70b9\u51fb\u201c\u786e\u5b9a\u201d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u901a\u8fc7\u53d1\u9001\u6d88\u606f<\/strong>\uff1a\u7a0b\u5e8f\u5c06\u5411\u5ba2\u6237\u7aef\u8ba1\u7b97\u673a\u53d1\u9001\u6d88\u606f\u3002\u5728\u5ba2\u6237\u7aef\u8ba1\u7b97\u673a\u4e0a\u5355\u51fb\u201c\u540c\u610f\u201d\u4ee5\u6388\u6743\u8bbf\u95ee\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/img_convert\/1cfd9e27b263f8160e25a0581f97a81b.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">3.2. \u5982\u679c\u60a8\u8fdc\u7a0b\u5b89\u88c5\u4e86\u5ba2\u6237\u7aef\u7a0b\u5e8f\uff0c\u5ba2\u6237\u7aef\u8ba1\u7b97\u673a\u5c06\u5217\u5728&nbsp;<strong>&#8220;\u8ba1\u7b97\u673a&#8221;<\/strong>&nbsp;&nbsp;&gt;&nbsp;&nbsp;<strong>\u201c\u5df2\u63a7\u5236\u7684\u8ba1\u7b97\u673a\u201d<\/strong>\u4e0b\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u60a8\u65e0\u9700\u8bf7\u6c42\u63a7\u5236\u6743\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u73b0\u5728\u60a8\u53ef\u4ee5\u901a\u8fc7 \u50b2\u6885\u4f01\u4e1a\u5907\u4efd\u7f51\u7edc\u7248\u6bcf\u5929\u6267\u884cSQL Server\u81ea\u52a8\u5907\u4efd\uff0c\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1. \u8f6c\u5230&nbsp;<strong>\u201c\u4efb\u52a1\u201d<\/strong>&nbsp;\u9009\u9879\u5361\uff0c\u5355\u51fb&nbsp;<strong>\u201c\u65b0\u5efa\u4efb\u52a1\u201d<\/strong>&nbsp;\u5e76\u9009\u62e9&nbsp;<strong>\u201cSQL Server \u5907\u4efd\u201d<\/strong>\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/img_convert\/775e8d32af088fca4fa7b376d77ed585.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">2. \u5728\u5f39\u51fa\u7a97\u53e3\u4e2d\uff0c\u6839\u636e\u9700\u8981\u7f16\u8f91\u4efb\u52a1\u540d\u79f0\u3002\u7136\u540e\uff0c&nbsp;\u5728\u201c\u7b2c\u4e00\u6b65\u201d\u680f\u4e2d\u70b9\u51fb&nbsp;<strong>\u201c\u6dfb\u52a0\u8ba1\u7b97\u673a\u201d&nbsp;<\/strong>\uff0c\u9009\u62e9\u5e26\u6709SQL Server\u6570\u636e\u5e93\u7684\u53d7\u63a7\u8ba1\u7b97\u673a\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/img_convert\/0700b2939dafa8e2601d5796bef673b6.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;3. \u5355\u51fb\u201c\u6b65\u9aa4 2\u201d\u5217\uff0c\u7136\u540e\u5355\u51fb<strong>\u201c\u6dfb\u52a0\u201d<\/strong>\u3002\u8be5\u7a0b\u5e8f\u5c06\u68c0\u6d4b\u8ba1\u7b97\u673a\u4e0a\u7684\u6240\u6709 SQL Server \u5b9e\u4f8b\u3002\u9009\u62e9\u8981\u5907\u4efd\u7684\u5b9e\u4f8b\u548c\u6570\u636e\u5e93\uff0c\u7136\u540e\u5355\u51fb<strong>\u201c\u786e\u5b9a\u201d<\/strong>\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/img_convert\/2b6f2d486fb48496ab929a85be2f918a.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">4. \u5355\u51fb\u201c\u7b2c 3 \u6b65\u201d\u5217\uff0c\u7136\u540e\u5355\u51fb<strong>\u201c\u6dfb\u52a0\u5b58\u50a8\u201d<\/strong>\u3002\u952e\u5165\u7f51\u7edc\u5171\u4eab\u6216 NAS \u8def\u5f84\u4ee5\u6dfb\u52a0\u76ee\u6807\u4f4d\u7f6e\u4ee5\u5b58\u50a8\u5907\u4efd\u6587\u4ef6\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/img_convert\/8bbd4364e33ab50e91a212c12ea0e49a.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">5. \u5355\u51fb\u5de6\u4e0b\u89d2\u7684<strong>\u201c\u8ba1\u5212\u5e76\u9009\u62e9\u60a8\u8981\u4e3a\u5176\u521b\u5efa\u8ba1\u5212\u7684\u8ba1\u7b97\u673a\u201d\u3002<\/strong>\u5728\u201c\u65e5\u7a0b\u8bbe\u7f6e\u201d\u7a97\u53e3\u7684\u4e0b\u62c9\u5217\u8868\u4e2d\u9009\u62e9<strong>\u201c\u6bcf\u5929\u201d \uff0c\u5b8c\u6210\u76f8\u5e94\u7684\u8bbe\u7f6e\u3002<\/strong>\u60a8\u8fd8\u53ef\u4ee5\u901a\u8fc7\u5355\u51fb<strong>\u201c\u9ad8\u7ea7\u201d<\/strong>\u9009\u62e9\u8fd0\u884c\u5b8c\u6574\/\u5dee\u5f02\u5907\u4efd\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/img_convert\/7bcb00e35e00a46610826b76e2560fc1.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">6. \u786e\u8ba4\u64cd\u4f5c\uff0c\u70b9\u51fb&nbsp;<strong>\u201c\u5f00\u59cb\u5907\u4efd\u201d<\/strong>\u3002\u60a8\u53ef\u4ee5\u5728\u6b64\u5904\u9009\u62e9\u201c<strong>\u4ec5\u521b\u5efa\u4efb\u52a1<\/strong>\u201d\u6216\u201c<strong>\u521b\u5efa\u5e76\u6267\u884c\u4efb\u52a1<\/strong>\u201d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/img_convert\/65022ecfd30a4f99791c5f86c523852f.png\" alt=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"toc.0.243177076427336\">\u7ed3\u8bba<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0a\u662f\u89e3\u51b3 SQL Server\u6570\u636e\u5e93\u4e8b\u52a1\u65e5\u5fd7\u5df2\u6ee1\u95ee\u9898\u7684\u591a\u79cd\u65b9\u6cd5\u3002\u622a\u65ad\u65e5\u5fd7\u548c\u6536\u7f29\u65e5\u5fd7\u6587\u4ef6\u662f\u8f83\u4e3a\u7b80\u5355\u7684\u65b9\u6cd5\uff0c\u4f46\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6570\u636e\u4e22\u5931\u3002\u4fee\u6539\u6570\u636e\u5e93\u6062\u590d\u6a21\u5f0f\u53ef\u4ee5\u89e3\u51b3\u95ee\u9898\uff0c\u4f46\u4e5f\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6570\u636e\u4e22\u5931\u3002\u4f7f\u7528\u50b2\u6885\u4f01\u4e1a\u5907\u4efd\u7f51\u7edc\u7248\u8f6f\u4ef6\u5907\u4efd SQL Server \u6570\u636e\u5e93\u662f\u6700\u5b89\u5168\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u4fdd\u8bc1\u6570\u636e\u7684\u5b8c\u6574\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e8b\u52a1\u65e5\u5fd7\u6587\u4ef6\uff08Transaction Log File\uff09\u662f\u7528\u6765\u8bb0\u5f55\u6570\u636e\u5e93\u66f4\u65b0\u60c5\u51b5\u7684\u6587\u4ef6\uff0c\u6269\u5c55\u540d\u4e3aldf\u3002\u5f53\u51fa\u73b0<br \/><a class=\"moretag\" href=\"http:\/\/www.x4s.cn\/?p=56\">+ Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[10,6],"class_list":["post-56","post","type-post","status-publish","format-standard","hentry","category-it","tag-mssql","tag-dbase"],"_links":{"self":[{"href":"http:\/\/www.x4s.cn\/index.php?rest_route=\/wp\/v2\/posts\/56","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.x4s.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.x4s.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.x4s.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.x4s.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=56"}],"version-history":[{"count":1,"href":"http:\/\/www.x4s.cn\/index.php?rest_route=\/wp\/v2\/posts\/56\/revisions"}],"predecessor-version":[{"id":57,"href":"http:\/\/www.x4s.cn\/index.php?rest_route=\/wp\/v2\/posts\/56\/revisions\/57"}],"wp:attachment":[{"href":"http:\/\/www.x4s.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=56"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.x4s.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=56"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.x4s.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=56"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}