Table des matières
SQLSERVER中KeyHashValue的作用(下)
Maison base de données tutoriel mysql SQLSERVER中KeyHashValue的作用(下)

SQLSERVER中KeyHashValue的作用(下)

Jun 07, 2016 pm 03:45 PM
sqlserver 作用

SQLSERVER中KeyHashValue的作用(下) 昨天中午跟高文佳童鞋讨论了 KeyHashValue 的作用,到最后还是没有讨论出结果 昨天晚上德国的兄弟傅文伟做了一下实验,将实验结果交给我 感谢他们 SQLSERVER中KeyHashValue的作用(上) 虽然对于keyhashvalue的研究还有

SQLSERVER中KeyHashValue的作用(下)

昨天中午跟高文佳童鞋讨论了KeyHashValue的作用,到最后还是没有讨论出结果

昨天晚上德国的兄弟傅文伟做了一下实验,将实验结果交给我

感谢他们

SQLSERVER中KeyHashValue的作用(上)

虽然对于keyhashvalue的研究还有很多问题还没有解决,但是基本可以确定“keyhashvalue是用来锁定资源的”

而不是我之前说的,在seek的时候根据这个KeyHashValue来快速查找到对应的记录

误导大家了,真的不好意思!!!!

资源                                            说明
RID                             用于锁定堆(heap)中的某一行
KEY                              用于锁定索引上的某一行,或者某个索引键
PAGE                            锁定数据库中的一个8KB页,例如数据页或索引页
EXTENT                        一组连续的8页(区)
HOBT                           锁定整个堆或B树的锁
TABLE                          锁定包括所有数据和索引的整个表
FILE                                   数据库文件
APPLICATION                应用程序专用的资源
METADATA                        元数据锁
ALLOCATION_UNIT             分配单元
DATABASE                     整个数据库

 

KEY是靠生成的这个KeyHashValue来进行锁定索引中的行

KEY                              用于锁定索引上的某一行

 

为什么需要这个KeyHashValue???

由于很苟很苟没有写C#代码,不过我觉得从C#的多线程同步来理解会更加好

例如:

lock 语句    lock 确保当一个线程位于代码的临界区时,另一个线程不进入临界区。如果其他线程试图进入锁定的代

码,则它将一直等待(即被阻止),直到该对象被释放,大家可以把同步对象理解为KeyHashValue

 c# 多线程同步

 c# 多线程同步

大家还是看给出的文章链接吧,因为本人很苟很苟没有写C#代码了,细节的东西看文章比较好

 

 

网上有很多相关的文章:

例如

建立索引的时候为什麽有900bytes的限制

为了性能,不可能让您在比较大的数据类型下,而且存储了非常多的数据的字段上建立索引

因为这样做的话,要计算出KeyHashValue就会非常消耗性能

这篇文章:Improvement in minimizing lockhash key collisions in SQL Server 2008R2 and its impact on concurrency

Since the key to a row could be as large as 900 bytes, using the real key values would have inflicted larger memory consumption.

引入

The solution to this problem was found when designing SQL server 7.0 in 1996 and 1997 by using the key of the row and apply

a hash algorithm to it which then results in a 6 byte long lockhash value 

 

我将这些文章整理到我的文章里:undocumented virtual column  %%lockres%%

 

在SQLSERVER2005下跟SQLSERVER2012下,建立相同的聚集索引,你会看到在SQL2005下,表的聚集索引页面有KeyHashValue

但是在SQL2012下,表的聚集索引页面的KeyHashValue列全部为NULL

由于我没有SQL2008,所以没有测试SQL2008,估计从SQL2008开始,KeyHashValue开始有些变化了

在SQL2005里,你使用dbcc page查看数据页面,数据页面里的每行记录是没有显示KeyHashValue的,不知道要打开哪个跟踪标记才能看到

在SQL2005里唯一能看到数据页面中的keyhashvalue只有使用%%lockres%%

 

而在SQL2012,不用做任何设置,使用dbcc page就可以看到KeyHashValue

当然也可以用%%lockres%%:

<span>1</span> <span>SELECT</span>   <span>%%</span>lockres<span>%%</span> <span>AS</span> <span>'</span><span>数据页的keyhashvalue</span><span>'</span> <span>FROM</span>  表名
Copier après la connexion

页面126是数据页面

<span>1</span> <span>DBCC</span> TRACEON(<span>3604</span>,<span>-</span><span>1</span><span>)
</span><span>2</span> <span>GO</span>
<span>3</span> <span>DBCC</span> PAGE(testhashkey,<span>1</span>,<span>126</span>,<span>3</span><span>) 
</span><span>4</span> <span>GO</span>
Copier après la connexion

Slot 0 Offset 0x0 Length 0 Length (physical) 0

KeyHashValue = (8194443284a0)      

DBCC 执行完毕。如果 DBCC 输出了错误信息,请与系统管理员联系。

 

SQL2012最大的改进是提示非常清晰,而且以前的SQLSERVER版本没有显示出来的东西都给你显示出来了,

这样有时候就不用做那么多系统表的表连接,如果是以前版本的SQLSERVER要查看某一个信息的时候又要做

这个系统表的表连接又要做那个表的表连接才能得出这个自己想看的东西,非常繁琐

 

例如如下改进:

聚集索引页面的显示,SQL2005是没有Row Size这一列的

SQLSERVER中KeyHashValue的作用(下)

下面的所有测试都是基于SQLSERVER2005 SP4 个人开发版


聚集索引

创建聚集索引的时候无论是唯一还是不唯一都会产生KeyHashValue

但是为了实验的方便,我这里只创建唯一聚集索引,因为不唯一的话会产生range locks不方便查看结果

详细请参考文章:Range locks

脚本:

SQLSERVER中KeyHashValue的作用(下)SQLSERVER中KeyHashValue的作用(下)

<span> 1</span> <span>USE</span><span> master
</span><span> 2</span> <span>GO</span>
<span> 3</span> <span>CREATE</span> <span>DATABASE</span><span> testhashkey
</span><span> 4</span> <span>GO</span>
<span> 5</span> 
<span> 6</span> <span>USE</span><span> testhashkey
</span><span> 7</span> <span>GO</span>
<span> 8</span> 
<span> 9</span> <span>--</span><span>------------------------------------------</span>
<span>10</span> <span>--</span><span>测试聚集索引</span>
<span>11</span> <span>CREATE</span> <span>TABLE</span><span> testcluster
</span><span>12</span> <span>    (
</span><span>13</span>       a <span>NVARCHAR</span>(<span>3800</span>) <span>NOT</span> <span>NULL</span><span> ,
</span><span>14</span>       b <span>INT</span> <span>NOT</span> <span>NULL</span>
<span>15</span> <span>    )
</span><span>16</span> <span>GO</span>
<span>17</span> 
<span>18</span> <span>--</span><span>这里一定要是唯一的</span>
<span>19</span> <span>CREATE</span> <span>UNIQUE</span>  <span>CLUSTERED</span> <span>INDEX</span> ucl <span>ON</span><span> testcluster(b)
</span><span>20</span> <span>GO</span>
<span>21</span> 
<span>22</span> <span>INSERT</span><span>  testcluster
</span><span>23</span> <span>SELECT</span>  <span>CAST</span>(<span>11</span> <span>AS</span> <span>VARCHAR</span>(<span>10</span>))<span>+</span><span>replicate</span>(<span>'</span><span>a</span><span>'</span>, <span>3500</span>),<span>1</span> <span>UNION</span> <span>ALL</span>
<span>24</span> <span>SELECT</span>  <span>CAST</span>(<span>22</span> <span>AS</span> <span>VARCHAR</span>(<span>10</span>))<span>+</span><span>replicate</span>(<span>'</span><span>a</span><span>'</span>, <span>3500</span>),<span>2</span>
Copier après la connexion
View Code

查看表情况的脚本

SQLSERVER中KeyHashValue的作用(下)SQLSERVER中KeyHashValue的作用(下)

<span> 1</span> <span>CREATE</span> <span>TABLE</span><span> DBCCResult (
</span><span> 2</span> PageFID <span>NVARCHAR</span>(<span>200</span><span>),
</span><span> 3</span> PagePID <span>NVARCHAR</span>(<span>200</span><span>),
</span><span> 4</span> IAMFID <span>NVARCHAR</span>(<span>200</span><span>),
</span><span> 5</span> IAMPID <span>NVARCHAR</span>(<span>200</span><span>),
</span><span> 6</span> ObjectID <span>NVARCHAR</span>(<span>200</span><span>),
</span><span> 7</span> IndexID <span>NVARCHAR</span>(<span>200</span><span>),
</span><span> 8</span> PartitionNumber <span>NVARCHAR</span>(<span>200</span><span>),
</span><span> 9</span> PartitionID <span>NVARCHAR</span>(<span>200</span><span>),
</span><span>10</span> iam_chain_type <span>NVARCHAR</span>(<span>200</span><span>),
</span><span>11</span> PageType <span>NVARCHAR</span>(<span>200</span><span>),
</span><span>12</span> IndexLevel <span>NVARCHAR</span>(<span>200</span><span>),
</span><span>13</span> NextPageFID <span>NVARCHAR</span>(<span>200</span><span>),
</span><span>14</span> NextPagePID <span>NVARCHAR</span>(<span>200</span><span>),
</span><span>15</span> PrevPageFID <span>NVARCHAR</span>(<span>200</span><span>),
</span><span>16</span> PrevPagePID <span>NVARCHAR</span>(<span>200</span><span>)
</span><span>17</span> <span>)
</span><span>18</span> 
<span>19</span> <span>TRUNCATE</span> <span>TABLE</span> <span>[</span><span>dbo</span><span>]</span>.<span>[</span><span>DBCCResult</span><span>]</span>
<span>20</span> 
<span>21</span> <span>INSERT</span> <span>INTO</span> DBCCResult <span>EXEC</span> (<span>'</span><span>DBCC IND(testhashkey,testcluster,-1) </span><span>'</span><span>)
</span><span>22</span> 
<span>23</span> <span>SELECT</span> <span>*</span> <span>FROM</span> <span>[</span><span>dbo</span><span>]</span>.<span>[</span><span>DBCCResult</span><span>]</span> <span>ORDER</span> <span>BY</span> <span>[</span><span>PageType</span><span>]</span> <span>DESC</span> 
Copier après la connexion
View Code

SQLSERVER中KeyHashValue的作用(下)

聚集索引页面
SQLSERVER中KeyHashValue的作用(下)

其实我这里暂时还不清楚聚集索引页面的KeyHashValue有什么作用,为什麽这样说??请往下看

 

我们看一下表中的每行记录的所产生的keyhashvalue

<span>1</span> <span>select</span> <span>%%</span>lockres<span>%%</span> <span>AS</span> <span>'</span><span>数据页的keyhashvalue</span><span>'</span> <span>from</span> testcluster
Copier après la connexion

SQLSERVER中KeyHashValue的作用(下)

大家可以看到,无论是索引行还是数据行都有KeyHashValue

 

我们使用下面语句进行测试,查看SQLSERVER锁定的资源

SQLSERVER中KeyHashValue的作用(下)SQLSERVER中KeyHashValue的作用(下)

<span> 1</span> <span>SET</span> <span>TRANSACTION</span> <span>ISOLATION</span> <span>LEVEL</span> <span>SERIALIZABLE</span>
<span> 2</span> <span>GO</span>
<span> 3</span> <span>BEGIN</span> <span>TRANSACTION</span>
<span> 4</span> <span>SELECT</span> b <span>FROM</span> <span>[</span><span>dbo</span><span>]</span>.<span>[</span><span>testcluster</span><span>]</span> <span>WHERE</span> <span>[</span><span>b</span><span>]</span><span>=</span><span>1</span>
<span> 5</span> <span>--</span><span>COMMIT TRAN</span>
<span> 6</span> 
<span> 7</span> <span>SELECT</span><span>  resource_type ,
</span><span> 8</span> <span>        resource_database_id ,
</span><span> 9</span> <span>        resource_description ,
</span><span>10</span> <span>        resource_associated_entity_id ,
</span><span>11</span> <span>        request_mode ,
</span><span>12</span> <span>        request_type ,
</span><span>13</span> <span>        request_status
</span><span>14</span> <span>FROM</span><span>    sys.dm_tran_locks
</span><span>15</span> <span>WHERE</span>   <span>[</span><span>resource_database_id</span><span>]</span><span>=</span><span>DB_ID</span>(<span>'</span><span>testhashkey</span><span>'</span><span>)
</span><span>16</span> <span>ORDER</span> <span>BY</span> <span>[</span><span>resource_type</span><span>]</span>
Copier après la connexion
View Code

SQLSERVER中KeyHashValue的作用(下)

 SQLSERVER中KeyHashValue的作用(下)

SQLSERVER中KeyHashValue的作用(下)

 

 

 

为什麽我刚才说:不清楚聚集索引页面的KeyHashValue有什么作用???

大家可以用下面的脚本来测试一下,无论我select还是update,DepartmentID BETWEEN 0 AND 122之间

使用sys.dm_tran_locks视图来查询,发现resource_description字段都没有显示聚集索引页面的keyhashvalue,只显示数据页面

的keyhashvalue,说明我在select和update的时候没有用到聚集索引页面的keyhashvalue,这里我不知道在什么情况下会用到

聚集索引页面的KeyHashValue

脚本如下:

SQLSERVER中KeyHashValue的作用(下)SQLSERVER中KeyHashValue的作用(下)

<span> 1</span> <span>USE</span><span> master
</span><span> 2</span> <span>GO</span>
<span> 3</span> <span>CREATE</span> <span>DATABASE</span><span> practice
</span><span> 4</span> <span>GO</span>
<span> 5</span> 
<span> 6</span> <span>USE</span><span> practice
</span><span> 7</span> <span>GO</span>
<span> 8</span> 
<span> 9</span> <span>--</span><span>只有聚集索引</span>
<span>10</span> <span>CREATE</span> <span>TABLE</span><span> Department(
</span><span>11</span>     DepartmentID <span>int</span> <span>IDENTITY</span>(<span>1</span>,<span>1</span>) <span>NOT</span> <span>NULL</span> <span>PRIMARY</span> <span>KEY</span><span>,
</span><span>12</span>     Name <span>NVARCHAR</span>(<span>200</span>) <span>NOT</span> <span>NULL</span><span>,
</span><span>13</span>     GroupName <span>NVARCHAR</span>(<span>200</span>) <span>NOT</span> <span>NULL</span><span>,
</span><span>14</span>     Company <span>NVARCHAR</span>(<span>300</span><span>),
</span><span>15</span>     ModifiedDate <span>datetime</span> <span>NOT</span> <span>NULL</span>  <span>DEFAULT</span> (<span>getdate</span><span>())
</span><span>16</span> <span>)
</span><span>17</span> 
<span>18</span> <span>INSERT</span> <span>INTO</span> Department(name,<span>[</span><span>Company</span><span>]</span>,groupname) <span>VALUES</span>(<span>'</span><span>销售部</span><span>'</span>,<span>'</span><span>中国你好有限公司XX分公司</span><span>'</span>,<span>'</span><span>销售组</span><span>'</span><span>)
</span><span>19</span> <span>GO</span> <span>100000</span>
<span>20</span> 
<span>21</span> <span>CREATE</span> <span>TABLE</span><span> DBCCResult (
</span><span>22</span> PageFID <span>NVARCHAR</span>(<span>200</span><span>),
</span><span>23</span> PagePID <span>NVARCHAR</span>(<span>200</span><span>),
</span><span>24</span> IAMFID <span>NVARCHAR</span>(<span>200</span><span>),
</span><span>25</span> IAMPID <span>NVARCHAR</span>(<span>200</span><span>),
</span><span>26</span> ObjectID <span>NVARCHAR</span>(<span>200</span><span>),
</span><span>27</span> IndexID <span>NVARCHAR</span>(<span>200</span><span>),
</span><span>28</span> PartitionNumber <span>NVARCHAR</span>(<span>200</span><span>),
</span><span>29</span> PartitionID <span>NVARCHAR</span>(<span>200</span><span>),
</span><span>30</span> iam_chain_type <span>NVARCHAR</span>(<span>200</span><span>),
</span><span>31</span> PageType <span>NVARCHAR</span>(<span>200</span><span>),
</span><span>32</span> IndexLevel <span>NVARCHAR</span>(<span>200</span><span>),
</span><span>33</span> NextPageFID <span>NVARCHAR</span>(<span>200</span><span>),
</span><span>34</span> NextPagePID <span>NVARCHAR</span>(<span>200</span><span>),
</span><span>35</span> PrevPageFID <span>NVARCHAR</span>(<span>200</span><span>),
</span><span>36</span> PrevPagePID <span>NVARCHAR</span>(<span>200</span><span>)
</span><span>37</span> <span>)
</span><span>38</span> 
<span>39</span> <span>TRUNCATE</span> <span>TABLE</span> <span>[</span><span>dbo</span><span>]</span>.<span>[</span><span>DBCCResult</span><span>]</span>
<span>40</span> 
<span>41</span> <span>INSERT</span> <span>INTO</span> DBCCResult <span>EXEC</span> (<span>'</span><span>DBCC IND(practice,Department,-1) </span><span>'</span><span>)
</span><span>42</span> 
<span>43</span> <span>SELECT</span> <span>*</span> <span>FROM</span> <span>[</span><span>dbo</span><span>]</span>.<span>[</span><span>DBCCResult</span><span>]</span> <span>ORDER</span> <span>BY</span> <span>[</span><span>PageType</span><span>]</span> <span>DESC</span> 
<span>44</span> 
<span>45</span> <span>DBCC</span> TRACEON(<span>3604</span>,<span>-</span><span>1</span><span>)
</span><span>46</span> <span>GO</span>
<span>47</span> <span>DBCC</span> PAGE(practice,<span>1</span>,<span>114</span>,<span>3</span><span>) 
</span><span>48</span> <span>GO</span>
<span>49</span> 
<span>50</span> <span>select</span> <span>%%</span>lockres<span>%%</span> <span>AS</span> <span>'</span><span>数据页的keyhashvalue</span><span>'</span> <span>from</span><span> Department
</span><span>51</span> 
<span>52</span> 
<span>53</span> 
<span>54</span> 
<span>55</span> 
<span>56</span> 
<span>57</span> <span>SET</span> <span>TRANSACTION</span> <span>ISOLATION</span> <span>LEVEL</span> <span>SERIALIZABLE</span>
<span>58</span> <span>GO</span>
<span>59</span> <span>BEGIN</span> <span>TRANSACTION</span>
<span>60</span> <span>SELECT</span> DepartmentID <span>FROM</span> Department <span>WHERE</span> DepartmentID <span>BETWEEN</span> <span>0</span> <span>AND</span> <span>122</span> 
<span>61</span> <span>--</span><span>COMMIT TRAN</span>
<span>62</span> 
<span>63</span> <span>SELECT</span><span>  resource_type ,
</span><span>64</span> <span>        resource_database_id ,
</span><span>65</span> <span>        resource_description ,
</span><span>66</span> <span>        resource_associated_entity_id ,
</span><span>67</span> <span>        request_mode ,
</span><span>68</span> <span>        request_type ,
</span><span>69</span> <span>        request_status
</span><span>70</span> <span>FROM</span><span>    sys.dm_tran_locks
</span><span>71</span> <span>WHERE</span>   <span>[</span><span>resource_database_id</span><span>]</span><span>=</span><span>DB_ID</span>(<span>'</span><span>practice</span><span>'</span><span>) 
</span><span>72</span> <span>AND</span> <span>[</span><span>resource_description</span><span>]</span> <span>LIKE</span> <span>'</span><span>%b03b%</span><span>'</span>
<span>73</span> <span>ORDER</span> <span>BY</span> <span>[</span><span>resource_type</span><span>]</span>
Copier après la connexion
View Code


我做了一个大胆的假设:其实聚集索引页面的keyhashvalue是没有用的!!!

原因一:

如果把刚才的脚本在SQL2012下运行,你会发现聚集索引的KeyHashValue列全部为NULL

SQLSERVER中KeyHashValue的作用(下)

SQLSERVER中KeyHashValue的作用(下)

原因二:

就是我上面的测试脚本,无论我select还是update,DepartmentID BETWEEN 0 AND 122之间

使用sys.dm_tran_locks视图来查询,发现resource_description字段都没有显示聚集索引页面的keyhashvalue,只显示数据页面

KeyHashValue

原因三:

就是昨天跟高文佳童鞋讨论的时候,他也发现了有时候在聚集索引里也会看到KeyHashValue列全部为NULL

我之前在SQLSERVER2005下也测试过,确实是这样

SQLSERVER中KeyHashValue的作用(上)

SQLSERVER中KeyHashValue的作用(下)

原因四:

可能为了不改动代码,原先SQLSERVER团队设计的时候只需要非聚集索引有KeyHashValue就可以了,而聚集索引不需要KeyHashValue

但是如果是这样,为了减少改动,不写两套代码,或者为了某种兼容性(与前面版本兼容),而不删除聚集索引的KeyHashValue

 


非聚集索引

非聚集索引表的非聚集索引页有KeyHashValue,但是数据页是没有KeyHashValue

创建非聚集索引,这里我也是指定唯一的

脚本:

SQLSERVER中KeyHashValue的作用(下)SQLSERVER中KeyHashValue的作用(下)

<span> 1</span> <span>--</span><span>测试非聚集索引</span>
<span> 2</span> <span>USE</span> <span>[</span><span>testhashkey</span><span>]</span>
<span> 3</span> <span>GO</span>
<span> 4</span> <span>CREATE</span> <span>TABLE</span><span> testnoncluster
</span><span> 5</span> <span>    (
</span><span> 6</span>       a <span>NVARCHAR</span>(<span>3800</span>) <span>NOT</span> <span>NULL</span><span> ,
</span><span> 7</span>       b <span>INT</span> <span>NOT</span> <span>NULL</span>
<span> 8</span> <span>    )
</span><span> 9</span> <span>GO</span>
<span>10</span> 
<span>11</span> <span>CREATE</span> <span>UNIQUE</span> <span>NONCLUSTERED</span> <span>INDEX</span> ucil <span>ON</span><span> testnoncluster(b)
</span><span>12</span> <span>GO</span>
<span>13</span> 
<span>14</span> <span>INSERT</span><span>  testnoncluster
</span><span>15</span> <span>SELECT</span>  <span>CAST</span>(<span>11</span> <span>AS</span> <span>VARCHAR</span>(<span>10</span>))<span>+</span><span>replicate</span>(<span>'</span><span>a</span><span>'</span>, <span>3500</span>),<span>1</span> <span>UNION</span> <span>ALL</span>
<span>16</span> <span>SELECT</span>  <span>CAST</span>(<span>22</span> <span>AS</span> <span>VARCHAR</span>(<span>10</span>))<span>+</span><span>replicate</span>(<span>'</span><span>a</span><span>'</span>, <span>3500</span>),<span>2</span>
<span>17</span> 
<span>18</span> 
<span>19</span> <span>SELECT</span> <span>*</span> <span>FROM</span> <span>[</span><span>dbo</span><span>]</span>.<span>[</span><span>testnoncluster</span><span>]</span>
Copier après la connexion
View Code

查看表情况的脚本

SQLSERVER中KeyHashValue的作用(下)SQLSERVER中KeyHashValue的作用(下)

<span> 1</span> <span>TRUNCATE</span> <span>TABLE</span> <span>[</span><span>dbo</span><span>]</span>.<span>[</span><span>DBCCResult</span><span>]</span>
<span> 2</span> 
<span> 3</span> <span>INSERT</span> <span>INTO</span> DBCCResult <span>EXEC</span> (<span>'</span><span>DBCC IND(testhashkey,testnoncluster,-1) </span><span>'</span><span>)
</span><span> 4</span> 
<span> 5</span> <span>SELECT</span> <span>*</span> <span>FROM</span> <span>[</span><span>dbo</span><span>]</span>.<span>[</span><span>DBCCResult</span><span>]</span> <span>ORDER</span> <span>BY</span> <span>[</span><span>PageType</span><span>]</span> <span>DESC</span> 
<span> 6</span> 
<span> 7</span> <span>DBCC</span> TRACEON(<span>3604</span>,<span>-</span><span>1</span><span>)
</span><span> 8</span> <span>GO</span>
<span> 9</span> <span>DBCC</span> PAGE(testhashkey,<span>1</span>,<span>77</span>,<span>3</span><span>) 
</span><span>10</span> <span>GO</span>
Copier après la connexion
View Code

SQLSERVER中KeyHashValue的作用(下)

非聚集索引页面

SQLSERVER中KeyHashValue的作用(下)

我们看一下表中的每行记录的所产生的keyhashvalue

<span>1</span> <span>select</span> <span>%%</span>lockres<span>%%</span> <span>AS</span> <span>'</span><span>数据页的keyhashvalue</span><span>'</span> <span>from</span> testnoncluster
Copier après la connexion

SQLSERVER中KeyHashValue的作用(下)

大家可以看到,这里只显示了行记录的FID:PID:RID,并没有显示keyhashvalue

 

我们使用下面语句进行测试,查看SQLSERVER锁定的资源

SQLSERVER中KeyHashValue的作用(下)SQLSERVER中KeyHashValue的作用(下)

<span> 1</span> <span>SET</span> <span>TRANSACTION</span> <span>ISOLATION</span> <span>LEVEL</span> <span>SERIALIZABLE</span>
<span> 2</span> <span>GO</span>
<span> 3</span> <span>BEGIN</span> <span>TRANSACTION</span>
<span> 4</span> <span>SELECT</span> b <span>FROM</span> <span>[</span><span>dbo</span><span>]</span>.<span>[</span><span>testnoncluster</span><span>]</span> <span>WHERE</span> <span>[</span><span>b</span><span>]</span><span>=</span><span>1</span>
<span> 5</span> <span>--</span><span>COMMIT TRAN</span>
<span> 6</span> 
<span> 7</span> <span>SELECT</span><span>  resource_type ,
</span><span> 8</span> <span>        resource_database_id ,
</span><span> 9</span> <span>        resource_description ,
</span><span>10</span> <span>        resource_associated_entity_id ,
</span><span>11</span> <span>        request_mode ,
</span><span>12</span> <span>        request_type ,
</span><span>13</span> <span>        request_status
</span><span>14</span> <span>FROM</span><span>    sys.dm_tran_locks
</span><span>15</span> <span>WHERE</span>   <span>[</span><span>resource_database_id</span><span>]</span><span>=</span><span>DB_ID</span>(<span>'</span><span>testhashkey</span><span>'</span><span>)
</span><span>16</span> <span>ORDER</span> <span>BY</span> <span>[</span><span>resource_type</span><span>]</span>
Copier après la connexion
View Code

SQLSERVER中KeyHashValue的作用(下)

 SQLSERVER中KeyHashValue的作用(下)

SQLSERVER中KeyHashValue的作用(下) 

 

我们使用下面脚本创建一个非聚集索引表testnoncluster2

SQLSERVER中KeyHashValue的作用(下)SQLSERVER中KeyHashValue的作用(下)

<span> 1</span> <span>--</span><span>测试堆表和非聚集索引表的数据页也有keyhashvalue</span>
<span> 2</span> <span>USE</span> <span>[</span><span>testhashkey</span><span>]</span>
<span> 3</span> <span>GO</span>
<span> 4</span> 
<span> 5</span> 
<span> 6</span> <span>CREATE</span> <span>TABLE</span><span> testnoncluster2
</span><span> 7</span> <span>    (
</span><span> 8</span>       a <span>NVARCHAR</span>(<span>3800</span>) <span>NOT</span> <span>NULL</span><span> ,
</span><span> 9</span>       b <span>INT</span> <span>NOT</span> <span>NULL</span><span>,
</span><span>10</span>       c <span>INT</span> <span>NOT</span> <span>NULL</span> 
<span>11</span> <span>    )
</span><span>12</span> <span>GO</span>
<span>13</span> 
<span>14</span> 
<span>15</span> 
<span>16</span> <span>CREATE</span> <span>UNIQUE</span> <span>NONCLUSTERED</span> <span>INDEX</span> ucil <span>ON</span><span> testnoncluster2(b)
</span><span>17</span> <span>GO</span>
<span>18</span> 
<span>19</span> <span>INSERT</span><span>  testnoncluster2
</span><span>20</span> <span>SELECT</span>  <span>CAST</span>(<span>11</span> <span>AS</span> <span>VARCHAR</span>(<span>10</span>))<span>+</span><span>replicate</span>(<span>'</span><span>a</span><span>'</span>, <span>3500</span>),<span>1</span>,<span>1</span> <span>UNION</span> <span>ALL</span>
<span>21</span> <span>SELECT</span>  <span>CAST</span>(<span>22</span> <span>AS</span> <span>VARCHAR</span>(<span>10</span>))<span>+</span><span>replicate</span>(<span>'</span><span>a</span><span>'</span>, <span>3500</span>),<span>2</span>,<span>2</span>
<span>22</span> 
<span>23</span> 
<span>24</span> 
<span>25</span> <span>SET</span> <span>TRANSACTION</span> <span>ISOLATION</span> <span>LEVEL</span> <span>SERIALIZABLE</span>
<span>26</span> <span>GO</span>
<span>27</span> <span>BEGIN</span> <span>TRANSACTION</span>
<span>28</span> <span>DELETE</span> <span>FROM</span> <span>[</span><span>dbo</span><span>]</span>.<span>[</span><span>testnoncluster2</span><span>]</span>  <span>WHERE</span> <span>[</span><span>c</span><span>]</span><span>=</span><span>1</span>
<span>29</span> <span>--</span><span>ROLLBACK TRAN</span>
<span>30</span> 
<span>31</span> <span>SELECT</span><span>  resource_type ,
</span><span>32</span> <span>        resource_database_id ,
</span><span>33</span> <span>        resource_description ,
</span><span>34</span> <span>        resource_associated_entity_id ,
</span><span>35</span> <span>        request_mode ,
</span><span>36</span> <span>        request_type ,
</span><span>37</span> <span>        request_status
</span><span>38</span> <span>FROM</span><span>    sys.dm_tran_locks
</span><span>39</span> <span>WHERE</span>   <span>[</span><span>resource_database_id</span><span>]</span><span>=</span><span>DB_ID</span>(<span>'</span><span>testhashkey</span><span>'</span><span>) 
</span><span>40</span> <span>ORDER</span> <span>BY</span> <span>[</span><span>resource_type</span><span>]</span>
<span>41</span> 
<span>42</span> 
<span>43</span> 
<span>44</span> 
<span>45</span> <span>select</span> <span>%%</span>lockres<span>%%</span> <span>AS</span> <span>'</span><span>数据页的keyhashvalue</span><span>'</span> <span>from</span> testnoncluster2
Copier après la connexion
View Code

这次删除非聚集索引表的一行
SQLSERVER中KeyHashValue的作用(下)

 SQLSERVER中KeyHashValue的作用(下)

 

为了保证我的结论的正确性,我在SQLSERVER2012里也用上面的脚本测试了一下,创建了表testnoncluster2

脚本:

SQLSERVER中KeyHashValue的作用(下)SQLSERVER中KeyHashValue的作用(下)

<span> 1</span> <span>--</span><span>测试堆表和非聚集索引表的数据页也有keyhashvalue</span>
<span> 2</span> <span>USE</span> <span>[</span><span>testhashkey</span><span>]</span>
<span> 3</span> <span>GO</span>
<span> 4</span> 
<span> 5</span> 
<span> 6</span> 
<span> 7</span> <span>CREATE</span> <span>TABLE</span><span> testnoncluster2
</span><span> 8</span> <span>    (
</span><span> 9</span>       a <span>NVARCHAR</span>(<span>3800</span>) <span>NOT</span> <span>NULL</span><span> ,
</span><span>10</span>       b <span>INT</span> <span>NOT</span> <span>NULL</span><span>,
</span><span>11</span>       c <span>INT</span> <span>NOT</span> <span>NULL</span> 
<span>12</span> <span>    )
</span><span>13</span> <span>GO</span>
<span>14</span> 
<span>15</span> 
<span>16</span> 
<span>17</span> <span>CREATE</span> <span>UNIQUE</span> <span>NONCLUSTERED</span> <span>INDEX</span> ucil <span>ON</span><span> testnoncluster2(b)
</span><span>18</span> <span>GO</span>
<span>19</span> 
<span>20</span> <span>INSERT</span><span>  testnoncluster2
</span><span>21</span> <span>SELECT</span>  <span>CAST</span>(<span>11</span> <span>AS</span> <span>VARCHAR</span>(<span>10</span>))<span>+</span><span>replicate</span>(<span>'</span><span>a</span><span>'</span>, <span>3500</span>),<span>1</span>,<span>1</span> <span>UNION</span> <span>ALL</span>
<span>22</span> <span>SELECT</span>  <span>CAST</span>(<span>22</span> <span>AS</span> <span>VARCHAR</span>(<span>10</span>))<span>+</span><span>replicate</span>(<span>'</span><span>a</span><span>'</span>, <span>3500</span>),<span>2</span>,<span>2</span>
<span>23</span> 
<span>24</span> 
<span>25</span> 
<span>26</span> 
<span>27</span> 
<span>28</span> <span>TRUNCATE</span> <span>TABLE</span> <span>[</span><span>dbo</span><span>]</span>.<span>[</span><span>DBCCResult</span><span>]</span>
<span>29</span> 
<span>30</span> <span>INSERT</span> <span>INTO</span> DBCCResult <span>EXEC</span> (<span>'</span><span>DBCC IND(testhashkey,testnoncluster2,-1) </span><span>'</span><span>)
</span><span>31</span> 
<span>32</span> <span>SELECT</span> <span>*</span> <span>FROM</span> <span>[</span><span>dbo</span><span>]</span>.<span>[</span><span>DBCCResult</span><span>]</span> <span>ORDER</span> <span>BY</span> <span>[</span><span>PageType</span><span>]</span> <span>DESC</span> 
<span>33</span> 
<span>34</span> <span>DBCC</span> TRACEON(<span>3604</span>,<span>-</span><span>1</span><span>)
</span><span>35</span> <span>GO</span>
<span>36</span> <span>DBCC</span> PAGE(testhashkey,<span>1</span>,<span>165</span>,<span>3</span><span>) 
</span><span>37</span> <span>GO</span>
Copier après la connexion
View Code

数据页面165

SQLSERVER中KeyHashValue的作用(下)SQLSERVER中KeyHashValue的作用(下)

<span>  1</span> <span>DBCC</span> 执行完毕。如果 <span>DBCC</span><span> 输出了错误信息,请与系统管理员联系。
</span><span>  2</span> 
<span>  3</span> PAGE: (<span>1</span>:<span>165</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>@0x049D10A8</span>
<span> 10</span> 
<span> 11</span> bpage <span>=</span> <span>0x14784000</span>                  bhash <span>=</span> <span>0x00000000</span>                  bpageno <span>=</span> (<span>1</span>:<span>165</span><span>)
</span><span> 12</span> bdbid <span>=</span> <span>7</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>23721</span>                       bstat <span>=</span> <span>0xb</span>
<span> 14</span> blog <span>=</span> <span>0xdb215acc</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>@0x14784000</span>
<span> 20</span> 
<span> 21</span> m_pageId <span>=</span> (<span>1</span>:<span>165</span>)                  m_headerVersion <span>=</span> <span>1</span>                 m_type <span>=</span> <span>1</span>
<span> 22</span> m_typeFlagBits <span>=</span> <span>0x0</span>                m_level <span>=</span> <span>0</span>                         m_flagBits <span>=</span> <span>0x8000</span>
<span> 23</span> m_objId (AllocUnitId.idObj) <span>=</span> <span>90</span>    m_indexId (AllocUnitId.idInd) <span>=</span> <span>256</span> 
<span> 24</span> Metadata: AllocUnitId <span>=</span> <span>72057594043826176</span>                                
<span> 25</span> Metadata: PartitionId <span>=</span> <span>72057594039238656</span>                                Metadata: IndexId <span>=</span> <span>0</span>
<span> 26</span> Metadata: ObjectId <span>=</span> <span>629577281</span>      m_prevPage <span>=</span> (<span>0</span>:<span>0</span>)                  m_nextPage <span>=</span> (<span>0</span>:<span>0</span><span>)
</span><span> 27</span> pminlen <span>=</span> <span>12</span>                        m_slotCnt <span>=</span> <span>1</span>                       m_freeCnt <span>=</span> <span>1071</span>
<span> 28</span> m_freeData <span>=</span> <span>7119</span>                   m_reservedCnt <span>=</span> <span>0</span>                   m_lsn <span>=</span> (<span>35</span>:<span>211</span>:<span>62</span><span>)
</span><span> 29</span> m_xactReserved <span>=</span> <span>0</span>                  m_xdesId <span>=</span> (<span>0</span>:<span>0</span>)                    m_ghostRecCnt <span>=</span> <span>0</span>
<span> 30</span> m_tornBits <span>=</span> <span>0</span>                      DB Frag ID <span>=</span> <span>1</span>                      
<span> 31</span> 
<span> 32</span> <span>Allocation Status
</span><span> 33</span> 
<span> 34</span> GAM (<span>1</span>:<span>2</span>) <span>=</span> ALLOCATED               SGAM (<span>1</span>:<span>3</span>) <span>=</span><span> ALLOCATED              
</span><span> 35</span> PFS (<span>1</span>:<span>1</span>) <span>=</span> <span>0x63</span> MIXED_EXT ALLOCATED  95_PCT_FULL                        DIFF (<span>1</span>:<span>6</span>) <span>=</span><span> CHANGED
</span><span> 36</span> ML (<span>1</span>:<span>7</span>) <span>=</span> <span>NOT</span><span> MIN_LOGGED           
</span><span> 37</span> 
<span> 38</span> Slot <span>0</span> Offset <span>0x60</span> Length <span>7023</span>
<span> 39</span> 
<span> 40</span> Record Type <span>=</span> PRIMARY_RECORD        Record Attributes <span>=</span><span>  NULL_BITMAP VARIABLE_COLUMNS
</span><span> 41</span> Record Size <span>=</span> <span>7023</span>                  
<span> 42</span> Memory <span>Dump</span> <span>@0x0FB7C060</span>
<span> 43</span> 
<span> 44</span> <span>00000000</span>:   30000c00 <span>01000000</span> <span>01000000</span> <span>03000001</span> 006f1b31  <span>0</span>................o.<span>1</span>
<span> 45</span> <span>00000014</span>:   <span>00310061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span>  .<span>1</span><span>.a.a.a.a.a.a.a.a.a
</span><span> 46</span> <span>00000028</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 47</span> 0000003C:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 48</span> <span>00000050</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 49</span> <span>00000064</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 50</span> <span>00000078</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 51</span> 0000008C:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 52</span> 000000A0:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 53</span> 000000B4:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 54</span> 000000C8:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 55</span> 000000DC:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 56</span> 000000F0:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 57</span> <span>00000104</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 58</span> <span>00000118</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 59</span> 0000012C:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 60</span> <span>00000140</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 61</span> <span>00000154</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 62</span> <span>00000168</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 63</span> 0000017C:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 64</span> <span>00000190</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 65</span> 000001A4:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 66</span> 000001B8:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 67</span> 000001CC:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 68</span> 000001E0:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 69</span> 000001F4:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 70</span> <span>00000208</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 71</span> 0000021C:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 72</span> <span>00000230</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 73</span> <span>00000244</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 74</span> <span>00000258</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 75</span> 0000026C:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 76</span> <span>00000280</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 77</span> <span>00000294</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 78</span> 000002A8:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 79</span> 000002BC:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 80</span> 000002D0:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 81</span> 000002E4:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 82</span> 000002F8:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 83</span> 0000030C:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 84</span> <span>00000320</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 85</span> <span>00000334</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 86</span> <span>00000348</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 87</span> 0000035C:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 88</span> <span>00000370</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 89</span> <span>00000384</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 90</span> <span>00000398</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 91</span> 000003AC:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 92</span> 000003C0:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 93</span> 000003D4:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 94</span> 000003E8:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 95</span> 000003FC:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 96</span> <span>00000410</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 97</span> <span>00000424</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 98</span> <span>00000438</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span> 99</span> 0000044C:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>100</span> <span>00000460</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>101</span> <span>00000474</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>102</span> <span>00000488</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>103</span> 0000049C:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>104</span> 000004B0:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>105</span> 000004C4:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>106</span> 000004D8:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>107</span> 000004EC:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>108</span> <span>00000500</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>109</span> <span>00000514</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>110</span> <span>00000528</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>111</span> 0000053C:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>112</span> <span>00000550</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>113</span> <span>00000564</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>114</span> <span>00000578</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>115</span> 0000058C:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>116</span> 000005A0:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>117</span> 000005B4:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>118</span> 000005C8:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>119</span> 000005DC:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>120</span> 000005F0:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>121</span> <span>00000604</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>122</span> <span>00000618</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>123</span> 0000062C:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>124</span> <span>00000640</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>125</span> <span>00000654</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>126</span> <span>00000668</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>127</span> 0000067C:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>128</span> <span>00000690</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>129</span> 000006A4:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>130</span> 000006B8:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>131</span> 000006CC:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>132</span> 000006E0:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>133</span> 000006F4:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>134</span> <span>00000708</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>135</span> 0000071C:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>136</span> <span>00000730</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>137</span> <span>00000744</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>138</span> <span>00000758</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>139</span> 0000076C:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>140</span> <span>00000780</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>141</span> <span>00000794</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>142</span> 000007A8:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>143</span> 000007BC:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>144</span> 000007D0:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>145</span> 000007E4:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>146</span> 000007F8:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>147</span> 0000080C:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>148</span> <span>00000820</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>149</span> <span>00000834</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>150</span> <span>00000848</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>151</span> 0000085C:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>152</span> <span>00000870</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>153</span> <span>00000884</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>154</span> <span>00000898</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>155</span> 000008AC:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>156</span> 000008C0:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>157</span> 000008D4:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>158</span> 000008E8:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>159</span> 000008FC:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>160</span> <span>00000910</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>161</span> <span>00000924</span>:   <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span> <span>00610061</span><span>  .a.a.a.a.a.a.a.a.a.a
</span><span>162</span> <span>00000938</span>:   <span>00610061</span> <span>00610061</span>
Copier après la connexion
Déclaration de ce site Web
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn

Outils d'IA chauds

Undresser.AI Undress

Undresser.AI Undress

Application basée sur l'IA pour créer des photos de nu réalistes

AI Clothes Remover

AI Clothes Remover

Outil d'IA en ligne pour supprimer les vêtements des photos.

Undress AI Tool

Undress AI Tool

Images de déshabillage gratuites

Clothoff.io

Clothoff.io

Dissolvant de vêtements AI

AI Hentai Generator

AI Hentai Generator

Générez AI Hentai gratuitement.

Article chaud

R.E.P.O. Crystals d'énergie expliqués et ce qu'ils font (cristal jaune)
2 Il y a quelques semaines By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Meilleurs paramètres graphiques
2 Il y a quelques semaines By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Comment réparer l'audio si vous n'entendez personne
2 Il y a quelques semaines By 尊渡假赌尊渡假赌尊渡假赌

Outils chauds

Bloc-notes++7.3.1

Bloc-notes++7.3.1

Éditeur de code facile à utiliser et gratuit

SublimeText3 version chinoise

SublimeText3 version chinoise

Version chinoise, très simple à utiliser

Envoyer Studio 13.0.1

Envoyer Studio 13.0.1

Puissant environnement de développement intégré PHP

Dreamweaver CS6

Dreamweaver CS6

Outils de développement Web visuel

SublimeText3 version Mac

SublimeText3 version Mac

Logiciel d'édition de code au niveau de Dieu (SublimeText3)

Comment résoudre le problème selon lequel l'objet nommé existe déjà dans la base de données sqlserver Comment résoudre le problème selon lequel l'objet nommé existe déjà dans la base de données sqlserver Apr 05, 2024 pm 09:42 PM

Pour les objets du même nom qui existent déjà dans la base de données SQL Server, les étapes suivantes doivent être suivies : Confirmez le type d'objet (table, vue, procédure stockée). IF NOT EXISTS peut être utilisé pour ignorer la création si l'objet est vide. Si l'objet contient des données, utilisez un nom différent ou modifiez la structure. Utilisez DROP pour supprimer des objets existants (soyez prudent, sauvegarde recommandée). Vérifiez les modifications de schéma pour vous assurer qu'il n'y a aucune référence à des objets supprimés ou renommés.

Comment importer un fichier mdf dans sqlserver Comment importer un fichier mdf dans sqlserver Apr 08, 2024 am 11:41 AM

Les étapes d'importation sont les suivantes : Copiez le fichier MDF dans le répertoire de données de SQL Server (généralement C:\Program Files\Microsoft SQL Server\MSSQL\DATA). Dans SQL Server Management Studio (SSMS), ouvrez la base de données et sélectionnez Attacher. Cliquez sur le bouton Ajouter et sélectionnez le fichier MDF. Confirmez le nom de la base de données et cliquez sur le bouton OK.

Que faire si le service sqlserver ne peut pas être démarré Que faire si le service sqlserver ne peut pas être démarré Apr 05, 2024 pm 10:00 PM

Lorsque le service SQL Server ne parvient pas à démarrer, voici quelques étapes à résoudre : Consultez le journal des erreurs pour déterminer la cause première. Assurez-vous que le compte de service est autorisé à démarrer le service. Vérifiez si les services de dépendance sont en cours d'exécution. Désactivez le logiciel antivirus. Réparez l'installation de SQL Server. Si la réparation ne fonctionne pas, réinstallez SQL Server.

Comment vérifier le numéro de port sqlserver Comment vérifier le numéro de port sqlserver Apr 05, 2024 pm 09:57 PM

Pour afficher le numéro de port SQL Server : Ouvrez SSMS et connectez-vous au serveur. Recherchez le nom du serveur dans l'Explorateur d'objets, cliquez dessus avec le bouton droit et sélectionnez Propriétés. Dans l'onglet Connexion, affichez le champ Port TCP.

Où est la base de données sqlserver ? Où est la base de données sqlserver ? Apr 05, 2024 pm 08:21 PM

Les fichiers de base de données SQL Server sont généralement stockés à l'emplacement par défaut suivant : Windows : C:\Program Files\Microsoft SQL Server\MSSQL\DATALinux : /var/opt/mssql/data L'emplacement du fichier de base de données peut être personnalisé en modifiant le chemin du fichier de base de données. paramètre.

Comment récupérer une base de données supprimée accidentellement dans SQLserver Comment récupérer une base de données supprimée accidentellement dans SQLserver Apr 05, 2024 pm 10:39 PM

Si vous supprimez accidentellement une base de données SQL Server, vous pouvez suivre les étapes suivantes pour la récupérer : arrêter l'activité de la base de données ; sauvegarder les fichiers journaux ; vérifier les options de récupération : restaurer à partir d'une sauvegarde ; utiliser DBCC CHECKDB ; outils de fête. Veuillez sauvegarder régulièrement votre base de données et activer la journalisation des transactions pour éviter toute perte de données.

Comment supprimer sqlserver si l'installation échoue ? Comment supprimer sqlserver si l'installation échoue ? Apr 05, 2024 pm 11:27 PM

Si l'installation de SQL Server échoue, vous pouvez la nettoyer en suivant ces étapes : Désinstaller SQL Server Supprimer les clés de registre Supprimer les fichiers et dossiers Redémarrer l'ordinateur

Comment changer l'installation anglaise de sqlserver en chinois Comment changer l'installation anglaise de sqlserver en chinois Apr 05, 2024 pm 10:21 PM

L'installation de SQL Server en anglais peut être modifiée en chinois en suivant les étapes suivantes : téléchargez le module linguistique correspondant ; arrêtez le service SQL Server ; modifiez la langue de l'instance ; modifiez la langue de l'interface utilisateur ;

See all articles