{"id":165,"date":"2011-02-10T01:03:48","date_gmt":"2011-02-10T01:03:48","guid":{"rendered":"http:\/\/blog.yyhcw.com\/post\/165.html"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T07:54:17","slug":"","status":"publish","type":"post","link":"http:\/\/blog.yyhcw.com\/post\/165.html","title":{"rendered":"\u4f7f\u7528SQL\u8bed\u53e5\u5907\u4efd\u3001\u521b\u5efa\u548c\u8fd8\u539fMSSQL\u6570\u636e\u5e93"},"content":{"rendered":"<p>&nbsp;\u3000\u3000\u4e0d\u662f\u4efb\u4f55\u4e00\u53f0\u673a\u5668\u4e0a\u90fd\u6709\u5b89\u88c5<span class=\"Apple-style-span\" style=\"font-family: \u5b8b\u4f53; line-height: 16px; border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; \">SQL\u7ba1\u7406\u5668\uff0c\u5982\u679c\u4f60\u624b\u4e0a\u6ca1\u6709<\/span><span class=\"Apple-style-span\" style=\"font-family: \u5b8b\u4f53; line-height: 16px; border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; \">SQL\u7ba1\u7406\u5668\u600e\u4e48\u529e\u5462\uff1f\u90a3\u5c31\u7528SQL\u8bed\u53e5\u6765\u5f04\u5427\uff1a<\/span><\/p>\n<p><strong><span class=\"Apple-style-span\" style=\"font-family: \u5b8b\u4f53; line-height: 16px; border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; \">1\u3001<\/span><\/strong><span class=\"Apple-style-span\" style=\"font-family: \u5b8b\u4f53; line-height: 16px; border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; \">\u5907\u4efd\u6570\u636e\u5e93\uff1a<\/span><\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<span style=\"background-color: rgb(255, 255, 153); \"><span class=\"Apple-style-span\" style=\"font-family: \u5b8b\u4f53; line-height: 16px; border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; \">backup&nbsp;database&nbsp;DbName&nbsp;to&nbsp;disk='D:\\DbName.bak'<\/span><\/span><\/p>\n<p><strong><span class=\"Apple-style-span\" style=\"font-family: \u5b8b\u4f53; line-height: 16px; border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; \">2\u3001<\/span><\/strong><span class=\"Apple-style-span\" style=\"font-family: \u5b8b\u4f53; line-height: 16px; border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; \">\u521b\u5efa\u6570\u636e\u5e93\uff1a<\/span><\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<span style=\"background-color: rgb(255, 255, 153); \"><span class=\"Apple-style-span\" style=\"font-family: \u5b8b\u4f53; line-height: 16px; border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; \">create&nbsp;database&nbsp;DbName<\/span><\/span><\/p>\n<p><span style=\"background-color: rgb(255, 255, 153); \"><span class=\"Apple-style-span\" style=\"font-family: \u5b8b\u4f53; line-height: 16px; border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; \">on&nbsp;(name='DbName_Dev',filename='D:\\DbName.mdf')<br \/><\/span><\/span><\/p>\n<p><span style=\"background-color: rgb(255, 255, 153); \"><span class=\"Apple-style-span\" style=\"font-family: \u5b8b\u4f53; line-height: 16px; border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; \">log&nbsp;on&nbsp;(name='DbName_Log',&nbsp;filename='D:\\DbName.ldf')<\/span>&nbsp;&nbsp;&nbsp;<\/span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n<p><span class=\"Apple-style-span\" style=\"font-family: \u5b8b\u4f53; line-height: 16px; border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; \">\u5982\u679c\u9700\u8981\u8fd8\u539f\u6570\u636e\u5e93\uff0ccreate&nbsp;database&nbsp;DbName\u5c31\u591f\u4e86\uff0c\u6570\u636e\u5e93\u8bbe\u5907\u540d\u548c\u6587\u4ef6\u8def\u5f84\u5728\u8fd8\u539f\u7684\u65f6\u5019\u6307\u5b9a\u3002<\/p>\n<p><strong>3\u3001<\/strong>\u67e5\u770b\u5907\u4efd\u6587\u4ef6\u5b58\u5728\u54ea\u4e9b\u6587\u4ef6\u7ec4\uff1a<\/span><\/p>\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<span style=\"background-color: rgb(255, 255, 153); \"><span class=\"Apple-style-span\" style=\"font-family: \u5b8b\u4f53; line-height: 16px; border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; \">restore&nbsp;filelistonly&nbsp;from&nbsp;disk='D:\\DbName.bak'<\/span><\/span><\/p>\n<p><span class=\"Apple-style-span\" style=\"font-family: \u5b8b\u4f53; line-height: 16px; border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; \">\u4ee5\u4fbf\u5728\u8fd8\u539f\u6570\u636e\u5e93\u7684\u65f6\u5019\u5bf9\u5404\u4e2a\u6587\u4ef6\u7ec4\u8fdb\u884c\u91cd\u5b9a\u5411\u3002<\/span><\/p>\n<p><span class=\"Apple-style-span\" style=\"font-family: \u5b8b\u4f53; line-height: 16px; border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; \">4\u3001\u8fd8\u539f\u6570\u636e\u5e93\uff1a<\/span><\/p>\n<p><span style=\"background-color: rgb(255, 255, 153); \"><span class=\"Apple-style-span\" style=\"font-family: \u5b8b\u4f53; line-height: 16px; border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; \">restore&nbsp;database&nbsp;DbName&nbsp;from&nbsp;disk='D:\\DbName.bak'&nbsp;with<br \/>move&nbsp;'DbName_Dev'&nbsp;to&nbsp;'D:\\DbName.mdf',<br \/>move&nbsp;'DbName_Log'&nbsp;to&nbsp;'D:\\DbName.ldf',<br \/>move&nbsp;'sysft_FT_Article'&nbsp;to&nbsp;'D:\\FullText\\FT_Article',<br \/>replace<\/span><\/span><\/p>\n<p><span class=\"Apple-style-span\" style=\"font-family: \u5b8b\u4f53; line-height: 16px; border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; \">\u4e0a\u9762\u5206\u522b\u8f6c\u79fb\u4e86\u6570\u636e\u8bbe\u5907\u3001\u65e5\u5fd7\u3001\u5168\u6587\u76ee\u5f55\u3002<\/span><\/p>\n<p>OK \u8f7b\u677e\u5b8c\u6210\u4e86\u54b1SQL\u7684\u5907\u4efd\u3001\u8fd8\u539f\u3001\u548c\u521b\u5efa\uff01<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"&nbsp;\u3000\u3000\u4e0d\u662f\u4efb\u4f55\u4e00\u53f0\u673a\u5668\u4e0a\u90fd\u6709\u5b89\u88c5SQL\u7ba1\u7406\u5668\uff0c\u5982\u679c\u4f60\u624b\u4e0a\u6ca1\u6709SQL\u7ba1\u7406\u5668\u600e\u4e48\u529e\u5462\uff1f\u90a3\u5c31\u7528SQL\u8bed\u53e5\u6765 \u00b7\u00b7\u00b7","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"views":260,"_links":{"self":[{"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/posts\/165"}],"collection":[{"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/comments?post=165"}],"version-history":[{"count":0,"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/posts\/165\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/media?parent=165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/categories?post=165"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/tags?post=165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}