Rumah > Artikel > pangkalan data > 附加到SQL2012的数据库就不能再附加到低于SQL2012的数据库版本
附加到SQL2012的数据库就不能再附加到低于SQL2012的数据库版本 昨天我只是将数据库附加到SQL2012,然后各个数据库都做了收缩事务日志的操作 兼容级别这些都没有改 再附加回SQL2005的时候就报错 在SQL2012里附加,确实是90级别,但是在SQL2005死活附加不上 备
昨天我只是将数据库附加到SQL2012,然后各个数据库都做了收缩事务日志的操作
兼容级别这些都没有改
再附加回SQL2005的时候就报错
在SQL2012里附加,确实是90级别,但是在SQL2005死活附加不上
备份数据库再还原也是一样
重建事务日志也是一样
然后我做了一个实验,检查一下附加到SQL2012的数据库和附加到SQL2005的数据库,两个数据库的文件头有什么不同
注意:两个数据库的兼容级别都是90,附加到SQL2012之后我也没有动过兼容级别!!
我们用同一个数据库,分别附加到SQL2005上和SQL2012上,看一下附加之后数据库的文件头有没有改变
这个数据库的兼容级别是90的
附加到SQL2012之后,我也不改变他的兼容级别
查看文件头的SQL语句如下,实际上就是数据库的第0页:
<span>1</span> <span>DBCC</span> TRACEON(<span>3604</span>,<span>-</span><span>1</span><span>) </span><span>2</span> <span>DBCC</span> PAGE(dlgpos,<span>1</span>,<span>0</span>,<span>3</span>)
在SQL2012里和SQL2005里都执行一下
将结果复制粘贴到一个新建的记事本里,命名好
SQL2005文件头
<span> 1</span> <span>DBCC</span> 执行完毕。如果 <span>DBCC</span><span> 输出了错误信息,请与系统管理员联系。 </span><span> 2</span> <span> 3</span> PAGE: (<span>1</span>:<span>0</span><span>) </span><span> 4</span> <span> 5</span> <span> 6</span> <span>BUFFER: </span><span> 7</span> <span> 8</span> <span> 9</span> BUF <span>@0x035D7380</span> <span>10</span> <span>11</span> bpage <span>=</span> <span>0x05BC0000</span> bhash <span>=</span> <span>0x00000000</span> bpageno <span>=</span> (<span>1</span>:<span>0</span><span>) </span><span>12</span> bdbid <span>=</span> <span>5</span> breferences <span>=</span> <span>0</span> bUse1 <span>=</span> <span>8142</span> <span>13</span> bstat <span>=</span> <span>0xc00009</span> blog <span>=</span> <span>0x59ca2159</span> bnext <span>=</span> <span>0x00000000</span> <span>14</span> <span>15</span> <span>PAGE HEADER: </span><span>16</span> <span>17</span> <span>18</span> Page <span>@0x05BC0000</span> <span>19</span> <span>20</span> m_pageId <span>=</span> (<span>1</span>:<span>0</span>) m_headerVersion <span>=</span> <span>1</span> m_type <span>=</span> <span>15</span> <span>21</span> m_typeFlagBits <span>=</span> <span>0x0</span> m_level <span>=</span> <span>0</span> m_flagBits <span>=</span> <span>0x208</span> <span>22</span> m_objId (AllocUnitId.idObj) <span>=</span> <span>99</span> m_indexId (AllocUnitId.idInd) <span>=</span> <span>0</span> Metadata: AllocUnitId <span>=</span> <span>6488064</span> <span>23</span> Metadata: PartitionId <span>=</span> <span>0</span> Metadata: IndexId <span>=</span> <span>0</span> Metadata: ObjectId <span>=</span> <span>99</span> <span>24</span> m_prevPage <span>=</span> (<span>0</span>:<span>0</span>) m_nextPage <span>=</span> (<span>0</span>:<span>0</span>) pminlen <span>=</span> <span>0</span> <span>25</span> m_slotCnt <span>=</span> <span>1</span> m_freeCnt <span>=</span> <span>7636</span> m_freeData <span>=</span> <span>2844</span> <span>26</span> m_reservedCnt <span>=</span> <span>0</span> m_lsn <span>=</span> (<span>132</span>:<span>328</span>:<span>1</span>) m_xactReserved <span>=</span> <span>0</span> <span>27</span> m_xdesId <span>=</span> (<span>0</span>:<span>0</span>) m_ghostRecCnt <span>=</span> <span>0</span> m_tornBits <span>=</span> <span>1431739479</span> <span>28</span> <span>29</span> <span>Allocation Status </span><span>30</span> <span>31</span> GAM (<span>1</span>:<span>2</span>) <span>=</span> ALLOCATED SGAM (<span>1</span>:<span>3</span>) <span>=</span> <span>NOT</span> ALLOCATED PFS (<span>1</span>:<span>1</span>) <span>=</span> <span>0x44</span><span> ALLOCATED 100_PCT_FULL </span><span>32</span> DIFF (<span>1</span>:<span>6</span>) <span>=</span> CHANGED ML (<span>1</span>:<span>7</span>) <span>=</span> <span>NOT</span><span> MIN_LOGGED </span><span>33</span> <span>34</span> <span>File</span><span> Header Data: </span><span>35</span> <span>36</span> Record Type <span>=</span> PRIMARY_RECORD Record Attributes <span>=</span><span> NULL_BITMAP VARIABLE_COLUMNS </span><span>37</span> <span>38</span> Memory <span>Dump</span> <span>@0x5D95C952</span> <span>39</span> <span>40</span> <span>00000000</span>: <span>30000800</span> <span>00000000</span> 2d000000 <span>00000000</span> ?<span>0</span>.......<span>-</span><span>....... </span><span>41</span> <span>00000010</span>: 2c007a00 7a007c00 7e008200 86008a00 ?,.z.z.<span>|</span>.<span>~</span><span>....... </span><span>42</span> <span>00000020</span><span>: 8e009800 a200ac00 ac00b000 b400b800 ?................ </span><span>43</span> <span>00000030</span><span>: bc00c600 e200ec00 f6000001 10011a01 ?................ </span><span>44</span> <span>00000040</span>: 2a012e01 <span>38013801</span> <span>44015401</span> <span>54015401</span> ?<span>*</span>...<span>8.8</span><span>.D.T.T.T. </span><span>45</span> <span>00000050</span>: <span>54015401</span> <span>54015401</span> <span>64016401</span><span> 64016e01 ?T.T.T.T.d.d.d.n. </span><span>46</span> <span>00000060</span>: <span>78019401</span><span> 9e01ae01 ca019eb2 1d7874c9 ?x............xt. </span><span>47</span> <span>00000070</span>: 5d4d85b9 d1422e77 c1620100 <span>01008002</span><span> ?]M...B.w.b...... </span><span>48</span> <span>00000080</span>: 0000ffff ffff8000 <span>00000000</span> <span>00000000</span><span> ?................ </span><span>49</span> <span>00000090</span>: <span>00000000</span> <span>00000000</span> <span>00000000</span> <span>00000000</span><span> ?................ </span><span>50</span> 000000A0: <span>00000000</span> <span>00000000</span> <span>00000000</span> <span>80010000</span><span> ?................ </span><span>51</span> 000000B0: <span>00000000</span> ffffffff <span>00020000</span> 7e000000 ?............<span>~</span><span>... </span><span>52</span> 000000C0: c6000000 01007e00 0000c600 <span>00000100</span> ?......<span>~</span><span>......... </span><span>53</span> <span>000000D0: 0000355a f94bc493 9149ac29 044140d0 ?..5Z.K...I.).A@. </span><span>54</span> 000000E0: 3b1f7e00 0000b100 <span>00002500</span> <span>00000000</span> ?;.<span>~</span>.......<span>%</span><span>..... </span><span>55</span> 000000F0: <span>00000000</span> <span>00008400</span> <span>00003601</span> <span>00002500</span> ?..........<span>6</span>...<span>%</span><span>. </span><span>56</span> <span>00000100</span>: 0567c9fb b5520346 853c86ad b3f47661 ?.g...R.F.<span><span>....va </span><span>57</span> <span>00000110</span>: <span>00000000</span> <span>00000000</span><span> 0000018e a4cb618f ?..............a. </span><span>58</span> <span>00000120</span>: 414c90c3 68f1a4fd 0d810800 00007e00 ?AL..h.........<span>~</span><span>. </span><span>59</span> <span>00000130</span>: 0000c600 <span>00000100</span> 44004c00 <span>47005000</span><span> ?........D.L.G.P. </span><span>60</span> <span>00000140</span>: 4f005300 cf6c06e9 4b9b3649 a11c2b70 ?O.S..l..K.6I..<span>+</span><span>p </span><span>61</span> <span>00000150</span><span>: dbebb977 355af94b c4939149 ac290441 ?...w5Z.K...I.).A </span><span>62</span> <span>00000160</span>: 40d03b1f <span>00000000</span> <span>00000000</span> <span>00000000</span><span> ?@.;............. </span><span>63</span> <span>00000170</span>: <span>00000000</span> <span>00000000</span> <span>00000000</span> <span>00000000</span><span> ?................ </span><span>64</span> <span>00000180</span>: <span>00000000</span> <span>00000000</span> <span>00000000</span> <span>00000000</span><span> ?................ </span><span>65</span> <span>00000190</span>: <span>00000000</span> 7e000000 b1000000 <span>25003804</span> ?....<span>~</span>.......<span>%</span>.<span>8</span><span>. </span><span>66</span> <span>000001A0: 48829a28 104c95f3 4b9d6a91 ab480000 ?H..(.L..K.j..H.. </span><span>67</span> 000001B0: <span>00000000</span> <span>00000000</span> <span>00000000</span> <span>00000000</span><span> ?................ </span><span>68</span> 000001C0: <span>00000000</span> <span>00000000</span> <span>0000</span><span>???????????????.......... </span><span>69</span> BindingID <span>=</span> 781db29e<span>-</span>c974<span>-</span>4d5d<span>-</span>85b9<span>-</span>d1422e77c162 FileGroupId <span>=</span> <span>1</span> <span>70</span> FileIdProp <span>=</span> <span>1</span> Size <span>=</span> <span>640</span> MaxSize <span>=</span> <span>65535</span> <span>71</span> Growth <span>=</span> <span>128</span> Perf <span>=</span> <span>0</span> BackupLsn <span>=</span> (<span>0</span>:<span>0</span>:<span>0</span><span>) </span><span>72</span> MaxLsn <span>=</span> (<span>126</span>:<span>198</span>:<span>1</span>) FirstLsn <span>=</span> (<span>126</span>:<span>177</span>:<span>37</span>) OldestRestoredLsn <span>=</span> (<span>0</span>:<span>0</span>:<span>0</span><span>) </span><span>73</span> FirstUpdateLsn <span>=</span> (<span>0</span>:<span>0</span>:<span>0</span>) FirstNonloggedUpdateLsn <span>=</span> <span>[</span><span>NULL</span><span>]</span> CreateLsn <span>=</span> (<span>0</span>:<span>0</span>:<span>0</span><span>) </span><span>74</span> DifferentialBaseLsn <span>=</span> (<span>132</span>:<span>310</span>:<span>37</span>) DifferentialBaseGuid <span>=</span> fbc96705<span>-</span>52b5<span>-</span><span>4603</span><span>-</span>853c<span>-</span><span>86adb3f47661 </span><span>75</span> MinSize <span>=</span> <span>384</span> Status <span>=</span> <span>0</span> UserShrinkSize <span>=</span> <span>65535</span> <span>76</span> <span>77</span> <span>78</span> <span>DBCC</span> 执行完毕。如果 <span>DBCC</span> 输出了错误信息,请与系统管理员联系。</span>
SQL2012文件头
<span> 1</span> <span>DBCC</span> 执行完毕。如果 <span>DBCC</span><span> 输出了错误信息,请与系统管理员联系。 </span><span> 2</span> <span> 3</span> PAGE: (<span>1</span>:<span>0</span><span>) </span><span> 4</span> <span> 5</span> <span> 6</span> <span>BUFFER: </span><span> 7</span> <span> 8</span> <span> 9</span> BUF <span>@0x0456ACA8</span> <span>10</span> <span>11</span> bpage <span>=</span> <span>0x187CA000</span> bhash <span>=</span> <span>0x00000000</span> bpageno <span>=</span> (<span>1</span>:<span>0</span><span>) </span><span>12</span> bdbid <span>=</span> <span>9</span> breferences <span>=</span> <span>0</span> bcputicks <span>=</span> <span>0</span> <span>13</span> bsampleCount <span>=</span> <span>0</span> bUse1 <span>=</span> <span>8145</span> bstat <span>=</span> <span>0x9</span> <span>14</span> blog <span>=</span> <span>0x21215a7a</span> bnext <span>=</span> <span>0x00000000</span> <span>15</span> <span>16</span> <span>PAGE HEADER: </span><span>17</span> <span>18</span> <span>19</span> Page <span>@0x187CA000</span> <span>20</span> <span>21</span> m_pageId <span>=</span> (<span>1</span>:<span>0</span>) m_headerVersion <span>=</span> <span>1</span> m_type <span>=</span> <span>15</span> <span>22</span> m_typeFlagBits <span>=</span> <span>0x0</span> m_level <span>=</span> <span>0</span> m_flagBits <span>=</span> <span>0x208</span> <span>23</span> m_objId (AllocUnitId.idObj) <span>=</span> <span>99</span> m_indexId (AllocUnitId.idInd) <span>=</span> <span>0</span> Metadata: AllocUnitId <span>=</span> <span>6488064</span> <span>24</span> Metadata: PartitionId <span>=</span> <span>0</span> Metadata: IndexId <span>=</span> <span>0</span> Metadata: ObjectId <span>=</span> <span>99</span> <span>25</span> m_prevPage <span>=</span> (<span>0</span>:<span>0</span>) m_nextPage <span>=</span> (<span>0</span>:<span>0</span>) pminlen <span>=</span> <span>0</span> <span>26</span> m_slotCnt <span>=</span> <span>1</span> m_freeCnt <span>=</span> <span>7636</span> m_freeData <span>=</span> <span>3302</span> <span>27</span> m_reservedCnt <span>=</span> <span>0</span> m_lsn <span>=</span> (<span>141</span>:<span>733</span>:<span>159</span>) m_xactReserved <span>=</span> <span>0</span> <span>28</span> m_xdesId <span>=</span> (<span>0</span>:<span>0</span>) m_ghostRecCnt <span>=</span> <span>0</span> m_tornBits <span>=</span> <span>426768658</span> <span>29</span> DB Frag ID <span>=</span> <span>1</span> <span>30</span> <span>31</span> <span>Allocation Status </span><span>32</span> <span>33</span> GAM (<span>1</span>:<span>2</span>) <span>=</span> ALLOCATED SGAM (<span>1</span>:<span>3</span>) <span>=</span> <span>NOT</span> ALLOCATED PFS (<span>1</span>:<span>1</span>) <span>=</span> <span>0x44</span><span> ALLOCATED 100_PCT_FULL </span><span>34</span> DIFF (<span>1</span>:<span>6</span>) <span>=</span> CHANGED ML (<span>1</span>:<span>7</span>) <span>=</span> <span>NOT</span><span> MIN_LOGGED </span><span>35</span> <span>36</span> <span>File</span><span> Header Data: </span><span>37</span> <span>38</span> Record Type <span>=</span> PRIMARY_RECORD Record Attributes <span>=</span><span> NULL_BITMAP VARIABLE_COLUMNS </span><span>39</span> Record Size <span>=</span> <span>458</span> <span>40</span> Memory <span>Dump</span> <span>@0x1019CB1C</span> <span>41</span> <span>42</span> <span>00000000</span>: <span>30000800</span> <span>00000000</span> 2d000000 <span>00000000</span> 2c007a00 <span>0</span>.......<span>-</span><span>.......,.z. </span><span>43</span> <span>00000014</span>: 7a007c00 7e008200 86008a00 8e009800 a200ac00 z.<span>|</span>.<span>~</span><span>............... </span><span>44</span> <span>00000028</span><span>: ac00b000 b400b800 bc00c600 e200ec00 f6000001 .................... </span><span>45</span> 0000003C: 10011a01 2a012e01 <span>38013801</span> <span>44015401</span> <span>54015401</span> ....<span>*</span>...<span>8.8</span><span>.D.T.T.T. </span><span>46</span> <span>00000050</span>: <span>54015401</span> <span>54015401</span> <span>64016401</span> 64016e01 <span>78019401</span><span> T.T.T.T.d.d.d.n.x... </span><span>47</span> <span>00000064</span><span>: 9e01ae01 ca019eb2 1d7874c9 5d4d85b9 d1422e77 .........xt.]M...B.w </span><span>48</span> <span>00000078</span>: c1620100 <span>01000003</span> 0000ffff ffff8000 <span>00000000</span><span> .b.................. </span><span>49</span> 0000008C: <span>00000000</span> <span>00000000</span> <span>00000000</span> <span>00000000</span> <span>00000000</span><span> .................... </span><span>50</span> 000000A0: <span>00000000</span> <span>00000000</span> <span>00000000</span> <span>80010000</span> <span>00000000</span><span> .................... </span><span>51</span> 000000B4: ffffffff <span>00020000</span> 7e000000 c6000000 01007e00 ........<span>~</span>.........<span>~</span><span>. </span><span>52</span> 000000C8: 0000c600 <span>00000100</span><span> 0000355a f94bc493 9149ac29 ..........5Z.K...I.) </span><span>53</span> 000000DC: 044140d0 3b1f7e00 0000b100 <span>00002500</span> <span>00000000</span> .A@.;.<span>~</span>.......<span>%</span><span>..... </span><span>54</span> 000000F0: <span>00000000</span> <span>00008400</span> <span>00003601</span> <span>00002500</span> 0567c9fb ..........<span>6</span>...<span>%</span><span>..g.. </span><span>55</span> <span>00000104</span>: b5520346 853c86ad b3f47661 <span>00000000</span> <span>00000000</span> .R.F.<span><span>....va........ </span><span>56</span> <span>00000118</span><span>: 0000018e a4cb618f 414c90c3 68f1a4fd 0d810800 ......a.AL..h....... </span><span>57</span> 0000012C: 00007e00 0000c600 <span>00000100</span> 44004c00 <span>47005000</span> ..<span>~</span><span>.........D.L.G.P. </span><span>58</span> <span>00000140</span>: 4f005300 cf6c06e9 4b9b3649 a11c2b70 dbebb977 O.S..l..K.6I..<span>+</span><span>p...w </span><span>59</span> <span>00000154</span>: 355af94b c4939149 ac290441 40d03b1f <span>00000000</span><span> 5Z.K...I.).A@.;..... </span><span>60</span> <span>00000168</span>: <span>00000000</span> <span>00000000</span> <span>00000000</span> <span>00000000</span> <span>00000000</span><span> .................... </span><span>61</span> 0000017C: <span>00000000</span> <span>00000000</span> <span>00000000</span> <span>00000000</span> <span>00000000</span><span> .................... </span><span>62</span> <span>00000190</span>: <span>00000000</span> 7e000000 b1000000 <span>25003804</span> 48829a28 ....<span>~</span>.......<span>%</span>.<span>8</span><span>.H..( </span><span>63</span> 000001A4: 104c95f3 4b9d6a91 ab480000 <span>00000000</span> <span>00000000</span><span> .L..K.j..H.......... </span><span>64</span> 000001B8: <span>00000000</span> <span>00000000</span> <span>00000000</span> <span>00000000</span> <span>0000</span><span> .................. </span><span>65</span> BindingID <span>=</span> 781db29e<span>-</span>c974<span>-</span>4d5d<span>-</span>85b9<span>-</span>d1422e77c162 FileIdProp <span>=</span> <span>1</span> <span>66</span> FileGroupId <span>=</span> <span>1</span> Size <span>=</span> <span>768</span> MaxSize <span>=</span> <span>65535</span> <span>67</span> Growth <span>=</span> <span>128</span> Perf <span>=</span> <span>0</span> BackupLsn <span>=</span> (<span>0</span>:<span>0</span>:<span>0</span><span>) </span><span>68</span> FirstUpdateLsn <span>=</span> (<span>0</span>:<span>0</span>:<span>0</span>) OldestRestoredLsn <span>=</span> (<span>0</span>:<span>0</span>:<span>0</span>) FirstNonloggedUpdateLsn <span>=</span> <span>[</span><span>NULL</span><span>]</span> <span>69</span> MinSize <span>=</span> <span>384</span> Status <span>=</span> <span>0</span> UserShrinkSize <span>=</span> <span>65535</span> <span>70</span> SectorSize <span>=</span> <span>512</span> MaxLsn <span>=</span> (<span>126</span>:<span>198</span>:<span>1</span>) FirstLsn <span>=</span> (<span>126</span>:<span>177</span>:<span>37</span><span>) </span><span>71</span> CreateLsn <span>=</span> (<span>0</span>:<span>0</span>:<span>0</span>) DifferentialBaseLsn <span>=</span> (<span>132</span>:<span>310</span>:<span>37</span><span>) </span><span>72</span> DifferentialBaseGuid <span>=</span> fbc96705<span>-</span>52b5<span>-</span><span>4603</span><span>-</span>853c<span>-</span>86adb3f47661 FileOfflineLsn <span>=</span> (<span>0</span>:<span>0</span>:<span>0</span><span>) </span><span>73</span> FileIdGuid <span>=</span> cba48e01<span>-</span>8f61<span>-</span>4c41<span>-</span>90c3<span>-</span>68f1a4fd0d81 RestoreStatus <span>=</span> <span>8</span> <span>74</span> RestoreRedoStartLsn <span>=</span> (<span>126</span>:<span>198</span>:<span>1</span>) RestoreSourceGuid <span>=</span> e9066ccf<span>-</span>9b4b<span>-</span><span>4936</span><span>-</span>a11c<span>-</span><span>2b70dbebb977 </span><span>75</span> HardenedSkipLsn <span>=</span> <span>[</span><span>NULL</span><span>]</span> ReplTxfTruncationLsn <span>=</span> <span>[</span><span>NULL</span><span>]</span> TxfBackupLsn <span>=</span> <span>[</span><span>NULL</span><span>]</span> <span>76</span> FstrContainerSize <span>=</span> <span>[</span><span>NULL</span><span>]</span> MaxLsnBranchId <span>=</span> 4bf95a35<span>-</span>93c4<span>-</span><span>4991</span><span>-</span>ac29<span>-</span><span>044140d03b1f </span><span>77</span> SecondaryRedoStartLsn <span>=</span> <span>[</span><span>NULL</span><span>]</span> SecondaryDifferentialBaseLsn <span>=</span> <span>[</span><span>NULL</span><span>]</span> <span>78</span> ReadOnlyLsn <span>=</span> (<span>0</span>:<span>0</span>:<span>0</span>) ReadWriteLsn <span>=</span> (<span>0</span>:<span>0</span>:<span>0</span><span>) </span><span>79</span> RestoreDifferentialBaseLsn <span>=</span> (<span>126</span>:<span>177</span>:<span>37</span><span>) </span><span>80</span> RestoreDifferentialBaseGuid <span>=</span> <span>82480438</span><span>-</span>289a<span>-</span>4c10<span>-</span>95f3<span>-</span><span>4b9d6a91ab48 </span><span>81</span> <span>RestorePathOrigin </span><span>82</span> <span>83</span> hex (<span>dec</span>) <span>=</span> <span>0x00000000</span>:<span>00000000</span>:<span>0000</span> (<span>0</span>:<span>0</span>:<span>0</span><span>) </span><span>84</span> m_guid <span>=</span> <span>00000000</span><span>-</span><span>0000</span><span>-</span><span>0000</span><span>-</span><span>0000</span><span>-</span><span>000000000000</span> <span>85</span> DatabaseEncryptionFileState <span>=</span> <span>[</span><span>NULL</span><span>]</span>FCBFileDEK <span>=</span> <span>[</span><span>NULL</span><span>]</span> <span>86</span> <span>87</span> <span>88</span> <span>DBCC</span> 执行完毕。如果 <span>DBCC</span> 输出了错误信息,请与系统管理员联系。</span>
可以用Beyond Compare这个软件比较一下两者的文件头的差异
Beyond Compare这个软件会把两个txt文件中的相同点用蓝色标记出来,不同点用红色标记出来
当附加到SQL2012之后,数据库的文件头已经走样了,就算你没有动过兼容级别,这也是造成曾经附加到SQL2012的数据库
再也附加不上SQL2005上的原因
可以看到SQL2012的数据库记录的信息比SQL2005详细多了,多了很多内容
也可以用下面的SQL语句看文件头的内容,不过信息比较少
<span>1</span> <span>DBCC</span> fileheader(<span>'</span><span>DLGPOS</span><span>'</span>)
总结
上面的实验证明了,当你将一个SQL2005的数据库附加到SQL2012上的时候,SQL2012马上改变数据库的文件头
就算你不动数据库兼容级别,实际上数据库的信息已经改变了(这里指文件头信息)
所以你死活附加不回去SQL2005了
以后不要轻易附加数据库到SQL2012上,不然的话。。。。。。
补充一下
http://www.cnblogs.com/lyhabc/archive/2013/01/20/2869057.html
如有不对的地方,欢迎大家拍砖o(∩_∩)o