{"id":54,"date":"2010-12-21T23:49:00","date_gmt":"2010-12-21T15:49:00","guid":{"rendered":"http:\/\/localhost\/?p=3"},"modified":"2013-12-30T10:39:39","modified_gmt":"2013-12-30T02:39:39","slug":"restore_individual_files_separate_operation","status":"publish","type":"post","link":"http:\/\/www.royalwzy.com\/?p=54","title":{"rendered":"\u5355\u72ec\u8fd8\u539f\u4e2a\u522b\u6587\u4ef6\u64cd\u4f5c"},"content":{"rendered":"<p><span style=\"font-size: small;\">\u521b\u5efa\u6570\u636e\u5e93\u4e0e\u591a\u4e2a\u6587\u4ef6\u7ec4,\u5728\u5404\u4e2a\u6587\u4ef6\u7ec4\u4e2d\u653e\u7f6e\u4e0d\u540c\u7684\u6570\u636e\u8868,\u6545\u610f\u635f\u574f\u5176\u4e2d\u4e00\u4e2a\u6587\u4ef6\u540e,<\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\">\u901a\u8fc7\u8bbe\u7f6e,\u53ef\u4ee5\u8ba9\u6539\u6570\u636e\u5e93\u5185\u5176\u5b83\u5b8c\u597d\u7684\u6587\u4ef6\u7ec4\u7ee7\u7eed\u63d0\u4f9b\u8bbf\u95ee,\u5e76\u7ecf\u8fc7\u8fd8\u539f\u5907\u4efd\u6570\u636e,\u53ef\u4ee5\u5355\u72ec\u56de\u590d\u8be5\u6570\u636e\u6587\u4ef6\u4e0e\u6587\u4ef6\u7ec4<\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'>&nbsp;<\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\">1.\u521b\u5efaNWind\u6d4b\u8bd5\u6570\u636e\u5e93,\u5e76\u6dfb\u52a03\u4e2a\u6587\u4ef6\u7ec4<\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><textarea cols=\"50\" rows=\"15\" name=\"code\" class=\"c-sharp\">USE master<br \/>\nGO<br \/>\n&#8212; DROP DATABASE NWind<br \/>\nCREATE DATABASE NWind<br \/>\nON PRIMARY(NAME = N&#8217;NWind_P&#8217;, FILENAME = N&#8217;D:\/SqlServer2008Test\/NWind_P.mdf&#8217;),<br \/>\nFILEGROUP FileGroupA(NAME = N&#8217;NWind_A&#8217;, FILENAME = N&#8217;D:\/SqlServer2008Test\/NWind_A.ndf&#8217;),<br \/>\nFILEGROUP FileGroupB(NAME = N&#8217;NWind_B&#8217;, FILENAME = N&#8217;D:\/SqlServer2008Test\/NWind_B.ndf&#8217;),<br \/>\nFILEGROUP FileGroupC(NAME = N&#8217;NWind_C&#8217;, FILENAME = N&#8217;D:\/SqlServer2008Test\/NWind_C.ndf&#8217;)<br \/>\nGO<br \/>\n<\/textarea>&nbsp;<\/span>&nbsp;<\/p>\n<p style=\"margin: 0in;\">&nbsp;<\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><img decoding=\"async\" src=\"http:\/\/localhost\/wp-content\/uploads\/pic\/0_12929783413UUv.gif\" alt=\"\" \/>&nbsp;<\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\">2.\u5728\u4e0d\u540c\u7684FileGroup\u4e2d\u5206\u522b\u653e\u7f6e\u4e00\u4e2a\u6570\u636e\u8868<\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><textarea cols=\"50\" rows=\"15\" name=\"code\" class=\"c-sharp\">USE NWind<br \/>\nGO<br \/>\nCREATE TABLE TbP(c1 INT, c2 NVARCHAR(10)) ON [PRIMARY]<br \/>\nCREATE TABLE TbA(c1 INT, c2 NVARCHAR(10)) ON FileGroupA<br \/>\nCREATE TABLE TbB(c1 INT, c2 NVARCHAR(10)) ON FileGroupB<br \/>\nCREATE TABLE TbC(c1 INT, c2 NVARCHAR(10)) ON FileGroupC<br \/>\nGO<\/textarea> <\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\">3.\u67e5\u770b\u5404\u4e2a\u6570\u636e\u8868\u6240\u5c5e\u7684FileGroup<\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><textarea cols=\"50\" rows=\"15\" name=\"code\" class=\"c-sharp\">SELECT objs.schemaN AS N&#8217;\u67b6\u6784&#8217;, objs.tableN AS N&#8217;\u6570\u636e\u8868&#8217;, das.name AS N&#8217;\u6587\u4ef6\u7ec4&#8217;<br \/>\nFROM NWind.sys.data_spaces das<br \/>\nINNER JOIN<br \/>\n(SELECT DISTINCT object_id, data_space_id<br \/>\nFROM NWind.sys.indexes<br \/>\nWHERE type IN(&#8216;0&#8217;, &#8216;1&#8217;)) idx ON das.data_space_id = idx.data_space_id<br \/>\nINNER JOIN<br \/>\n(SELECT sys.objects.name AS &#8216;tableN&#8217;, object_id, sys.schemas.name AS &#8216;schemaN&#8217;<br \/>\nFROM NWind.sys.objects<br \/>\nINNER JOIN NWind.sys.schemas ON sys.objects.schema_id = sys.schemas.schema_id<br \/>\nWHERE type = &#8216;U&#8217;) objs ON objs.object_id = idx.object_id<br \/>\nORDER BY 3<\/textarea> <\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><img decoding=\"async\" src=\"http:\/\/localhost\/wp-content\/uploads\/pic\/0_1292978352f5GS.gif\" alt=\"\" \/><\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\">4.\u5206\u6790\u5404\u4e2a\u6570\u636e\u6587\u4ef6\u7684\u5c5e\u6027<\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><textarea cols=\"50\" rows=\"15\" name=\"code\" class=\"c-sharp\">SELECT name, physical_name, state_desc, is_read_only, read_only_lsn<br \/>\nFROM NWind.sys.database_files<br \/>\n&#8212; SELECT * FROM sys.database_files<\/textarea>&nbsp;<\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'>&nbsp;<\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><span lang=\"en-US\"><img decoding=\"async\" src=\"http:\/\/localhost\/wp-content\/uploads\/pic\/0_1292978358pxib.gif\" alt=\"\" \/><\/span><\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><span lang=\"en-US\">5<\/span><span lang=\"zh-CN\">.\u5411\u6570\u636e\u5e93\u4e2d\u63d2\u5165\u6570\u636e<\/span><\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><textarea cols=\"50\" rows=\"15\" name=\"code\" class=\"c-sharp\">USE NWind<br \/>\nGO<br \/>\nINSERT INTO TbP VALUES(1, &#8216;P&#8217;)<br \/>\nINSERT INTO TbA VALUES(1, &#8216;A&#8217;)<br \/>\nINSERT INTO TbB VALUES(1, &#8216;B&#8217;)<br \/>\nINSERT INTO TbC VALUES(1, &#8216;C&#8217;)<br \/>\nGO<\/textarea>&nbsp;&nbsp;<\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><span lang=\"en-US\">6<\/span><span lang=\"zh-CN\">.\u5206\u6790\u5404\u4e2a\u8868\u4e2d\u7684\u6570\u636e<\/span><\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><textarea cols=\"50\" rows=\"15\" name=\"code\" class=\"c-sharp\">USE NWind<br \/>\nGO<br \/>\nSELECT * FROM TbP<br \/>\nUNION ALL<br \/>\nSELECT * FROM TbA<br \/>\nUNION ALL<br \/>\nSELECT * FROM TbB<br \/>\nUNION ALL<br \/>\nSELECT * FROM TbC<br \/>\nGO<\/textarea>&nbsp;&nbsp;<\/span><\/p>\n<p style=\"margin: 0in;\">&nbsp;<\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><img decoding=\"async\" src=\"http:\/\/localhost\/wp-content\/uploads\/pic\/0_12929783648cD4.gif\" alt=\"\" \/>&nbsp;<\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\">7.\u5907\u4efdNWind\u6570\u636e\u5e93<\/span><\/p>\n<p style=\"margin: 0in;\">&nbsp;<\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><textarea cols=\"50\" rows=\"15\" name=\"code\" class=\"c-sharp\">BACKUP DATABASE NWind<br \/>\nTO DISK = N&#8217;D:\/SqlServer2008Test\/NWind.bak&#8217;<br \/>\nWITH COMPRESSION, INIT<\/textarea> <\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><img decoding=\"async\" src=\"http:\/\/localhost\/wp-content\/uploads\/pic\/0_12929783709Bb0.gif\" alt=\"\" \/><\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\">&nbsp;<\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\">8.\u6682\u505cMSSQLSERVER\u670d\u52a1,\u5e76\u5220\u6389NWind_B.ndf\u6587\u4ef6\u6a21\u62df\u6570\u636e\u5e93\u635f\u574f<\/span><\/p>\n<p style=\"margin: 0in;\">&nbsp;<\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><img decoding=\"async\" src=\"http:\/\/localhost\/wp-content\/uploads\/pic\/0_1292978378jile.gif\" alt=\"\" \/>&nbsp;<\/span><\/p>\n<p style=\"margin: 0in;\"><span style=\"font-size: small;\"><span style='font-family: \"Courier New\";' lang=\"en-US\">9.<\/span><span style=\"font-family: \u5b8b\u4f53;\" lang=\"zh-CN\">\u51fa\u73b0\u9519\u8bef<\/span><\/span><\/p>\n<p style=\"margin: 0in;\">&nbsp;<\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><img decoding=\"async\" src=\"http:\/\/localhost\/wp-content\/uploads\/pic\/0_1292978385n9hM.gif\" alt=\"\" \/>&nbsp;<\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><span lang=\"en-US\">10<\/span><span lang=\"zh-CN\">.\u68c0\u67e5NWind\u6570\u636e\u5e93\u5904\u4e8eRECOVERY_PENDING\u72b6\u6001<\/span><\/span><\/p>\n<p style=\"margin: 0in;\">&nbsp;<\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><textarea cols=\"50\" rows=\"15\" name=\"code\" class=\"c-sharp\">SELECT name, state_desc FROM sys.databases<\/textarea><\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><img decoding=\"async\" src=\"http:\/\/localhost\/wp-content\/uploads\/pic\/0_12929790772XO3.gif\" alt=\"\" \/><\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\">11.\u8bbe\u7f6e\u6587\u4ef6NWind_B\u4e3aOFFLINE,\u5e76\u8bbe\u7f6eNWind\u6570\u636e\u5e93\u72b6\u6001\u4e3aONLINE<\/span><\/p>\n<p style=\"margin: 0in;\"><span style=\"font-size: small;\"><textarea cols=\"50\" rows=\"15\" name=\"code\" class=\"c-sharp\">ALTER DATABASE NWind MODIFY FILE (NAME = N&#8217;NWind_B&#8217;, OFFLINE)<br \/>\nGO<br \/>\nALTER DATABASE NWind SET ONLINE<br \/>\nGO<\/textarea> <\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";' lang=\"en-US\">&nbsp;<\/p>\n<p style=\"margin: 0in;\"><span style=\"font-size: small;\"><span style='font-family: \"Courier New\";'><img decoding=\"async\" src=\"http:\/\/localhost\/wp-content\/uploads\/pic\/0_129297914301Ag.gif\" alt=\"\" \/><\/span><\/span><\/p>\n<p style=\"margin: 0in;\"><span style=\"font-size: small;\"><span style='font-family: \"Courier New\";'>12.\u5206\u6790\u5404\u4e2a\u6570\u636e\u6587\u4ef6\u7684<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u5728\u7ebf\u72b6\u6001<\/span><\/span><\/p>\n<p style=\"margin: 0in;\">&nbsp;<\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><textarea cols=\"50\" rows=\"15\" name=\"code\" class=\"c-sharp\">USE NWind<br \/>\nGO<br \/>\nSELECT name, physical_name, state_desc, is_read_only, read_only_lsn<br \/>\nFROM NWind.sys.database_files<br \/>\nGO<\/textarea> <\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><img decoding=\"async\" src=\"http:\/\/localhost\/wp-content\/uploads\/pic\/0_1292979149J65r.gif\" alt=\"\" \/>&nbsp;<\/span><\/p>\n<p style=\"margin: 0in;\"><span style=\"font-size: small;\"><span style='font-family: \"Courier New\";' lang=\"en-US\">13.<\/span><span style='font-family: \"Courier New\";' lang=\"zh-CN\">\u5206\u6790\u5404\u4e2a\u8868\u7684\u6570\u636e<\/span><span style='font-family: \"Courier New\";' lang=\"en-US\">,<\/span><span style=\"font-family: \u5b8b\u4f53;\" lang=\"zh-CN\">\u67e5\u8be2<\/span><span style='font-family: \"Courier New\";' lang=\"en-US\">TbB<\/span><span style=\"font-family: \u5b8b\u4f53;\" lang=\"zh-CN\">\u65f6\u5019\u51fa\u9519<\/span><\/span><\/p>\n<p style=\"margin: 0in;\">&nbsp;<\/p>\n<p style=\"margin: 0in;\"><span style=\"font-size: small;\"><span style='font-family: \"Courier New\";' lang=\"en-US\"><textarea cols=\"50\" rows=\"15\" name=\"code\" class=\"c-sharp\">USE NWind<br \/>\nGO<br \/>\nSELECT * FROM TbP<br \/>\nSELECT * FROM TbA<br \/>\nSELECT * FROM TbB<br \/>\nSELECT * FROM TbC<br \/>\nGO<\/textarea> <\/span><\/span><span style=\"font-size: small;\"><span style='font-family: \"Courier New\";' lang=\"en-US\"><img decoding=\"async\" src=\"http:\/\/localhost\/wp-content\/uploads\/pic\/0_1292979153CNGu.gif\" alt=\"\" \/><\/span><\/span><\/p>\n<p style=\"margin: 0in;\"><span style=\"font-size: small;\"><span style='font-family: \"Courier New\";' lang=\"en-US\">14<\/span><span style='font-family: \"Courier New\";' lang=\"zh-CN\">.\u5411\u6570\u636e\u5e93\u4e2d\u63d2\u5165\u6570\u636e<\/span><span style='font-family: \"Courier New\";' lang=\"en-US\">,<\/span><span style=\"font-family: \u5b8b\u4f53;\" lang=\"zh-CN\">\u5411<\/span><span style='font-family: \"Courier New\";' lang=\"en-US\">TbB<\/span><span style=\"font-family: \u5b8b\u4f53;\" lang=\"zh-CN\">\u4e2d\u63d2\u5165\u6570\u636e\u65f6\u51fa\u9519<\/span><\/span><\/p>\n<p style=\"margin: 0in;\">&nbsp;<\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><span lang=\"en-US\"><textarea cols=\"50\" rows=\"15\" name=\"code\" class=\"c-sharp\">USE NWind<br \/>\nGO<br \/>\nINSERT INTO TbP VALUES(2, &#8216;P&#8217;)<br \/>\nINSERT INTO TbA VALUES(2, &#8216;A&#8217;)<br \/>\nINSERT INTO TbB VALUES(2, &#8216;B&#8217;)<br \/>\nINSERT INTO TbC VALUES(2, &#8216;C&#8217;)<br \/>\nGO<\/textarea> <\/span><\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><span lang=\"en-US\"><img decoding=\"async\" src=\"http:\/\/localhost\/wp-content\/uploads\/pic\/0_1292979153CNGu.gif\" alt=\"\" \/><\/span><\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><span lang=\"en-US\">15.<\/span><span lang=\"zh-CN\">\u5907\u4efd\u65e5\u5fd7\u6587\u4ef6<\/span><\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><textarea cols=\"50\" rows=\"15\" name=\"code\" class=\"c-sharp\">BACKUP LOG NWind<br \/>\nTO DISK = N&#8217;D:\/SqlServer2008Test\/NWind.bak&#8217;<br \/>\nWITH NAME = N&#8217;NWind \u65e5\u5fd7\u5907\u4efd&#8217;, COMPRESSION, NO_TRUNCATE<\/textarea> <\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\">NO_TRUNCATE \u6307\u5b9a\u4e0d\u622a\u65ad\u65e5\u5fd7,\u5e76\u4f7f\u6570\u636e\u5e93\u5f15\u64ce\u5c1d\u8bd5\u6267\u884c\u5907\u4efd,\u800c\u4e0d\u8003\u8651\u6570\u636e\u5e93\u7684\u72b6\u6001.<\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\">\u56e0\u6b64,\u4f7f\u7528 NO_TRUNCATE \u6267\u884c\u7684\u5907\u4efd\u53ef\u80fd\u5177\u6709\u4e0d\u5b8c\u6574\u7684\u5143\u6570\u636e.\u8be5\u9009\u9879\u5141\u8bb8\u5728\u6570\u636e\u5e93\u635f\u574f\u65f6\u5907\u4efd\u65e5\u5fd7.<\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\">BACKUP LOG \u7684 NO_TRUNCATE \u9009\u9879\u76f8\u5f53\u4e8e\u540c\u65f6\u6307\u5b9a COPY_ONLY \u548c CONTINUE_AFTER_ERROR.<\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\">\u5982\u679c\u4e0d\u4f7f\u7528 NO_TRUNCATE \u9009\u9879,\u5219\u6570\u636e\u5e93\u5fc5\u987b\u8054\u673a.<\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'>&nbsp;<\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><span lang=\"en-US\">16.<\/span><span lang=\"zh-CN\">\u67e5\u8be2\u5907\u4efd\u6587\u4ef6\u7684\u5934\u4fe1\u606f<\/span><\/span><\/p>\n<p style=\"margin: 0in;\"><span style=\"font-size: small;\"><textarea cols=\"50\" rows=\"15\" name=\"code\" class=\"c-sharp\">RESTORE HEADERONLY FROM DISK = N&#8217;D:\/SqlServer2008Test\/NWind.bak&#8217;<\/textarea> <\/span><\/p>\n<p style=\"margin: 0in;\"><span style=\"font-size: small;\"><img decoding=\"async\" src=\"http:\/\/localhost\/wp-content\/uploads\/pic\/0_12929797118o87.gif\" alt=\"\" \/><\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'>&nbsp;<\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><span lang=\"en-US\">17.<\/span><span lang=\"zh-CN\">\u67e5\u8be2\u5907\u4efd\u6587\u4ef6\u7684\u6587\u4ef6\u4fe1\u606f<\/span><\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><span lang=\"zh-CN\"><textarea cols=\"50\" rows=\"15\" name=\"code\" class=\"c-sharp\">RESTORE FILELISTONLY FROM DISK = N&#8217;D:\/SqlServer2008Test\/NWind.bak&#8217;<\/textarea> <\/span><\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><img decoding=\"async\" src=\"http:\/\/localhost\/wp-content\/uploads\/pic\/0_1292979717Ur5R.gif\" alt=\"\" \/><\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'>&nbsp;<\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><span lang=\"en-US\">18.<\/span><span lang=\"zh-CN\">\u8fd8\u539f\u635f\u574f\u7684\u6570\u636e\u5e93<\/span><\/span><\/p>\n<p style=\"margin: 0in;\"><span style=\"font-size: small;\"><textarea cols=\"50\" rows=\"15\" name=\"code\" class=\"c-sharp\">USE master<br \/>\nGO<br \/>\nRESTORE DATABASE NWind<br \/>\nFILE = N&#8217;NWind_B&#8217;<br \/>\nFROM DISK = N&#8217;D:\/SqlServer2008Test\/NWind.bak&#8217;<br \/>\nWITH RECOVERY<br \/>\nGO<\/textarea> <\/span><\/p>\n<p style=\"margin: 0in;\"><span style=\"font-size: small;\"><img decoding=\"async\" src=\"http:\/\/hi.csdn.net\/attachment\/201012\/22\/0_1292979723DDQ0.gif\" alt=\"\" \/><\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'>&nbsp;<\/p>\n<p style=\"margin: 0in;\"><span style=\"font-size: small;\"><span style='font-family: \"Courier New\";' lang=\"zh-CN\">1<\/span><span style='font-family: \"Courier New\";' lang=\"en-US\">9<\/span><span style='font-family: \"Courier New\";' lang=\"zh-CN\">.\u5206\u6790\u5404\u4e2a\u6570\u636e\u6587\u4ef6\u7684\u5c5e\u6027<\/span><span style='font-family: \"Courier New\";' lang=\"en-US\">,Nwind_B<\/span><span style=\"font-family: \u5b8b\u4f53;\" lang=\"zh-CN\">\u5904\u4e8e<\/span><span style='font-family: \"Courier New\";' lang=\"zh-CN\">RESTORING<\/span><span style=\"font-family: \u5b8b\u4f53;\" lang=\"zh-CN\">\u72b6\u6001<\/span><\/span><\/p>\n<p style=\"margin: 0in;\"><span style=\"font-size: small;\"><textarea cols=\"50\" rows=\"15\" name=\"code\" class=\"c-sharp\">USE NWind<br \/>\nGO<br \/>\nSELECT name, physical_name, state_desc, is_read_only, read_only_lsn<br \/>\nFROM NWind.sys.database_files<br \/>\nGO<\/textarea> <\/span><\/p>\n<p style=\"margin: 0in;\"><span style=\"font-size: small;\"><img decoding=\"async\" src=\"http:\/\/hi.csdn.net\/attachment\/201012\/22\/0_1292979727Tlf6.gif\" alt=\"\" \/><\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><span lang=\"en-US\">20.<\/span><span lang=\"zh-CN\">\u8fd8\u539fNWind\u7684\u65e5\u5fd7\u6587\u4ef6<\/span><\/span><\/p>\n<p style=\"margin: 0in;\"><span style=\"font-size: small;\"><textarea cols=\"50\" rows=\"15\" name=\"code\" class=\"c-sharp\">USE master<br \/>\nGO<br \/>\nRESTORE LOG NWind<br \/>\nFROM DISK = N&#8217;D:\/SqlServer2008Test\/NWind.bak&#8217;<br \/>\nWITH FILE = 2, RECOVERY<br \/>\nGO<\/textarea> <\/span><\/p>\n<p style=\"margin: 0in;\"><span style=\"font-size: small;\"><img decoding=\"async\" src=\"http:\/\/hi.csdn.net\/attachment\/201012\/22\/0_12929798925POM.gif\" alt=\"\" \/><\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><span lang=\"en-US\">21<\/span><span lang=\"zh-CN\">.\u5206\u6790\u5404\u4e2a\u6570\u636e\u6587\u4ef6\u7684\u5c5e\u6027<\/span><\/span><\/p>\n<p style=\"margin: 0in;\"><span style=\"font-size: small;\"><textarea cols=\"50\" rows=\"15\" name=\"code\" class=\"c-sharp\">USE NWind<br \/>\nGO<br \/>\nSELECT name, physical_name, state_desc, is_read_only, read_only_lsn<br \/>\nFROM NWind.sys.database_files<br \/>\nGO<\/textarea> <\/span><\/p>\n<p style=\"margin: 0in;\"><span style=\"font-size: small;\"><img decoding=\"async\" src=\"http:\/\/hi.csdn.net\/attachment\/201012\/22\/0_1292979897cMKa.gif\" alt=\"\" \/><\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'>&nbsp;<\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><span lang=\"en-US\">22<\/span><span lang=\"zh-CN\">.\u5206\u6790\u5404\u4e2a\u8868\u4e2d\u7684\u6570\u636e<\/span><\/span><\/p>\n<p style='margin: 0in; font-family: \"Courier New\";'><span style=\"font-size: small;\"><span lang=\"zh-CN\"><textarea cols=\"50\" rows=\"15\" name=\"code\" class=\"c-sharp\">USE NWind<br \/>\nGO<br \/>\nSELECT * FROM TbP<br \/>\nUNION ALL<br \/>\nSELECT * FROM TbA<br \/>\nUNION ALL<br \/>\nSELECT * FROM TbB<br \/>\nUNION ALL<br \/>\nSELECT * FROM TbC<br \/>\nGO<\/textarea> <\/span><\/span><\/p>\n<p style=\"margin: 0in;\"><span style=\"font-size: small;\"><img decoding=\"async\" src=\"http:\/\/hi.csdn.net\/attachment\/201012\/22\/0_1292979902kK6i.gif\" alt=\"\" \/><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u521b\u5efa\u6570\u636e\u5e93\u4e0e\u591a\u4e2a\u6587\u4ef6\u7ec4,\u5728\u5404\u4e2a\u6587\u4ef6\u7ec4\u4e2d\u653e\u7f6e\u4e0d\u540c\u7684\u6570\u636e\u8868,\u6545\u610f\u635f\u574f\u5176\u4e2d\u4e00\u4e2a\u6587\u4ef6\u540e, \u901a\u8fc7\u8bbe\u7f6e,\u53ef\u4ee5\u8ba9\u6539\u6570\u636e\u5e93\u5185\u5176 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[16],"class_list":["post-54","post","type-post","status-publish","format-standard","hentry","category-sqlserver","tag-sql_server_2008_r2"],"_links":{"self":[{"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/posts\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=54"}],"version-history":[{"count":0,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/posts\/54\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=54"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=54"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}