MSSQLSERVER_7105MSSQLSERVER_7105

适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) 适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions)

详细信息Details

AttributeAttribute Value
产品名称Product Name SQL ServerSQL Server
事件 IDEvent ID 71057105
事件源Event Source MSSQLSERVERMSSQLSERVER
组件Component SQLEngineSQLEngine
符号名称Symbolic Name TXT_PGNOTEXISTTXT_PGNOTEXIST
消息正文Message Text LOB 数据类型节点的数据库 ID %d (页 %S_PGID,槽 %d)不存在。The Database ID %d, Page %S_PGID, slot %d for LOB data type node does not exist. 这通常是由于可以读取数据页上未提交的数据的事务所致。This is usually caused by transactions that can read uncommitted data on a data page. 请运行 DBCC CHECKTABLERun DBCC CHECKTABLE

说明Explanation

当无法访问数据库页行引用的大型对象 (LOB) 数据时,查询可能会遇到消息 7105。A query may encounter Msg 7105 when Large Object (LOB) data referenced by a database page row cannot be accessed.

此错误的严重性级别为 22,因此服务器将终止连接。Because this error is Severity Level 22, the connection is terminated by the server. 此错误消息也将写入 SQL ERRORLOG 文件和 EventID=7105 的 Windows 应用程序事件日志中。This error message is also written into the SQL ERRORLOG file and Windows Application Event Log with EventID=7105.

可能的原因Possible causes

存在以下任一原因时,可能会出现此错误:This error can occur due to one of the following reasons:

  • 数据库页中或数据库页引用的 LOB 页结构中存在数据库损坏问题。A database corruption problem exists within a database page or within the LOB page structures the database page references.
  • 出现故障的查询使用的是 READ UNCOMMITTED ISOLATION LEVELNOLOCK 查询提示。The query that is encountering the failure is using the READ UNCOMMITTED ISOLATION LEVEL or the NOLOCK query hint.
  • SQL ServerSQL Server 引擎中存在问题,导致查询失败并出现此错误。A problem exists within the SQL ServerSQL Server Engine causing the query to fail with this error.

请参阅“解决方案”和详细信息部分,确定具体问题的原因以及合适的解决方案。See the Resolution and More information sections to determine what is the cause for your specific problem and the appropriate solution.

用户操作User action

  1. 如消息中所示,首先应该是针对数据库运行 DBCC CHECKDB 或针对出现问题的表运行 DBCC CHECKTABLEAs the message indicates, the first step you should take is to run DBCC CHECKDB against the database or DBCC CHECKTABLE against the table where the problem was encountered.

    • 消息中提供了数据库 ID。The database ID is provided in the message.

    • 若要在不运行 DBCC CHECKDB 的情况下精确找到受影响的表,你将需要找出出现错误的查询所访问的表。To find out the exact affected table without running DBCC CHECKDB, you will need to find out what tables were accessed by the query that encountered the error. 一种方法是使用 SQL 探查器来跟踪查询。One method is to use SQL Profiler to trace the query. 但是,在 SQL Server 2008SQL Server 2008SQL Server 2008SQL Server 2008 R2 中,你或许可使用 system_health 扩展事件会话来查找查询。However, in SQL Server 2008SQL Server 2008 and SQL Server 2008SQL Server 2008 R2 you may be able to find the query using the system_health Extended Events session. 若要详细了解如何使用 system_health 会话,请参阅此链接:使用 system_health 会话See this link for more information on how to use the system_health session: Use the system_health Session.

    • 与任何数据库一致性问题一样,可通过从不包含此问题的已知完好备份中进行还原来解决这些错误。As with any database consistency problem, you can resolve these errors by restoring from a known good Backup that does not contain this problem.

    • 但是,如果无法从备份中还原,请按照针对 DBCC CHECKDBDBCC CHECKTABLE 的建议来解决这些错误。However, if you cannot restore from a Backup, follow the recommendations for DBCC CHECKDB or DBCC CHECKTABLE to repair these errors. 这可能会导致数据丢失。It is possible that this will result in loss of data. 有关使用 CHECKDB 以及数据库损坏原因的详细信息,请参阅下文:如何解决 DBCC CHECKDB 报告的数据库一致性错误For more information about using CHECKDB and causes of database corruption problems, see the article: How to troubleshoot database consistency errors reported by DBCC CHECKDB.

  2. 出现此错误的原因可能是,访问表的查询使用的是隔离级别的 READ UNCOMMITTEDNOLOCK 查询提示(也称为脏读)。It is possible this error was encountered because the query accessing the table was using an isolation level of READ UNCOMMITTED or the NOLOCK query hint (also known as a dirty read).

    • 如果 DBCC CHECKDBDBCC CHECKTABLE 未显示与此表和 LOB 数据相关联的任何错误,则最有可能是因为使用了脏读。If DBCC CHECKDB or DBCC CHECKTABLE do not show any errors associated with this table and LOB data, then the most likely cause is the use of a dedirty read. 如果你的应用程序出现这种情况,那么你需要避免使用脏读或重试查询。If this is the case for your application, you will need to either avoid using a dirty read or retry the query.

    • 如果你发现这是导致此错误的原因,则实际上不存在数据库一致性问题。If you find this is the cause of the error, no actual database consistency problem exists.

详细信息More information

如果数据库损坏是导致此问题的原因,则 DBCC CHECKDB 和/或 DBCC CHECKTABLE 应报告错误。If database corruption is the cause for this problem, then DBCC CHECKDB and/or DBCC CHECKTABLE should report errors. 但是,这些命令不会报告消息 7105。However, these commands will not report Msg 7105. 从 CHECKDB 中遇到的错误将取决于对 LOB 结构的引用中或 LOB 结构本身的损坏内容。The errors you encounter from CHECKDB will depend on what is damaged within the reference to LOB structures or the LOB structures themselves.

  • 如果数据库页行未正确引用有效的 LOB 页,可能会看到如下错误:If the database page row does not correctly reference a valid LOB page, you may see errors like these:

    消息 8929,级别 16,状态 1,行 1Msg 8929, Level 16, State 1, Line 1
    对象 ID 2137058649,索引 ID 0,分区 ID 72057594038910976,分配单元 ID 72057594039828480(行内数据类型):在由 RID = (1:179:1) 标识的数据记录所拥有的 ID 为 131203072 的行外数据中发现错误Object ID 2137058649, index ID 0, partition ID 72057594038910976, alloc unit ID 72057594039828480 (type In-row data): Errors found in off-row data with ID 131203072 owned by data record identified by RID = (1:179:1)
    消息 8964,级别 16,状态 1,行 1Msg 8964, Level 16, State 1, Line 1
    表错误:对象 ID 2137058649,索引 ID 0,分区 ID 72057594038910976,分配单元 ID 72057594039894016(LOB 数据类型)。Table error: Object ID 2137058649, index ID 0, partition ID 72057594038910976, alloc unit ID 72057594039894016 (type LOB data). 位于页 (1:177)、槽 1 且文本 ID 为 131203072 的行外数据节点未被引用。The off-row data node at page (1:177), slot 1, text ID 131203072 is not referenced.
    消息 8965,级别 16,状态 1,行 1Msg 8965, Level 16, State 1, Line 1
    表错误:对象 ID 2137058649,索引 ID 0,分区 ID 72057594038910976,分配单元 ID 72057594039894016(LOB 数据类型)。Table error: Object ID 2137058649, index ID 0, partition ID 72057594038910976, alloc unit ID 72057594039894016 (type LOB data). 位于页 (255:177)、槽 1 且文本 ID 为 131203072 的行外数据节点由页 (1:179) 的槽 1 引用,但扫描过程中未检测到该节点The off-row data node at page (255:177), slot 1, text ID 131203072 is referenced by page (1:179), slot 1, but was not seen in the scan

  • 在不同的情况下出现此问题可能导致不同的错误组合。Different scenarios for the problem can result in different combination of errors. 在此示例中:In this example:

    数据库页 1:179,槽 1 引用了在数据库中无效的 LOB 页(页 255:177)。Database Page 1:179, Slot 1 is referencing a LOB page that is not a valid page in the database (page 255:177). 页 (1:177) 是有效的 LOB 页,但从未被任何数据库页引用。Page (1:177) is a valid LOB page but was never referenced by any database page. 因此在这种情况下,问题在于页 1:179 的槽 1 中的行引用页 255:177 而不是 1:177。So in this situation, the problem is that the row in Slot 1 of Page 1:179 references page 255:177 instead of 1:177.

  • 确定 DBCC CHECKDB 错误是否与 LOB 页问题相关的关键是查找“行外数据”和“LOB 数据类型”这两个短语。The key to determining whether DBCC CHECKDB errors are related to LOB page problems by looking for the phrases 'off-row data' and 'type LOB data'.

    消息 8929 是与引用 LOB 页的数据库页相关的错误。Msg 8929 is an error related to the database page referencing the LOB pages.
    消息 8964 是一个错误,指示没有任何数据库页引用 LOB 页。Msg 8964 is an error indicating a LOB page was not referenced by any database pages.
    消息 8965 是一个错误,指示某个 LOB 页被数据库页引用,但它不是有效页Msg 8965 is an error indicating a LOB pages was referenced by a database page but doesn't exist as a valid page

    在许多涉及到这些类型的错误的情况下,进行修复将导致删除指向 LOB 数据的行和 LOB 数据本身。In many situations involving these types of errors, repair will result in the deletion of the rows pointing to LOB data and the LOB data itself. 修复算法将尝试仅删除影响相关数据库行的 LOB 片段,但无法找到在所有情况下都这样做,具体情况视 LOB“树结构”中的损坏内容而定。The repair algorithm will attempt to only remove LOB fragments that affect the database rows in question but that cannot be guaranteed in all situations depending on what is damaged within the LOB 'tree structure'.

  • 在此处显示的示例中,CHECKTABLE 使用 REPAIR_ALLOW_DATA_LOSS 返回的消息如下所示:In the example shown here, the messages returned by a CHECKTABLE using REPAIR_ALLOW_DATA_LOSS look like:

    修复:页 (1:179) 的槽 1 上已删除的记录:对象 ID 2137058649,索引 ID 0,分区 ID 72057594038910976,分配单元 ID 72057594039828480(行内数据类型)。Repair: Deleted record for object ID 2137058649, index ID 0, partition ID 72057594038910976, alloc unit ID 72057594039828480 (type In-row data), on page (1:179), slot 1. 将重新生成索引。Indexes will be rebuilt.
    修复:页 (1:177) 的槽 1 上已删除的 ID 为 131203072 的行外数据列:对象 ID 2137058649,索引 ID 0,分区 ID 72057594038910976,分配单元 ID 72057594039894016(LOB 数据类型)。Repair: Deleted off-row data column with ID 131203072, for object ID 2137058649, index ID 0, partition ID 72057594038910976, alloc unit ID 72057594039894016 (type LOB data) on page (1:177), slot 1.
    消息 8929,级别 16,状态 1,行 1Msg 8929, Level 16, State 1, Line 1
    对象 ID 2137058649,索引 ID 0,分区 ID 72057594038910976,分配单元 ID 72057594039828480(行内数据类型):在由 RID = (1:179:1) 标识的数据记录所拥有的 ID 为 131203072 的行外数据中发现错误Object ID 2137058649, index ID 0, partition ID 72057594038910976, alloc unit ID 72057594039828480 (type In-row data): Errors found in off-row data with ID 131203072 owned by data record identified by RID = (1:179:1)
    该错误已修复。The error has been repaired.
    消息 8964,级别 16,状态 1,行 1Msg 8964, Level 16, State 1, Line 1
    表错误:对象 ID 2137058649,索引 ID 0,分区 ID 72057594038910976,分配单元 ID 72057594039894016(LOB 数据类型)。Table error: Object ID 2137058649, index ID 0, partition ID 72057594038910976, alloc unit ID 72057594039894016 (type LOB data). 位于页 (1:177)、槽 1 且文本 ID 为 131203072 的行外数据节点未被引用。The off-row data node at page (1:177), slot 1, text ID 131203072 is not referenced.
    该错误已修复。The error has been repaired.
    消息 8965,级别 16,状态 1,行 1Msg 8965, Level 16, State 1, Line 1
    表错误:对象 ID 2137058649,索引 ID 0,分区 ID 72057594038910976,分配单元 ID 72057594039894016(LOB 数据类型)。Table error: Object ID 2137058649, index ID 0, partition ID 72057594038910976, alloc unit ID 72057594039894016 (type LOB data). 位于页 (255:177)、槽 1 且文本 ID 为 131203072 的行外数据节点由页 (1:179) 的槽 1 引用,但扫描过程中未检测到该节点。The off-row data node at page (255:177), slot 1, text ID 131203072 is referenced by page (1:179), slot 1, but was not seen in the scan.
    无法修复此错误Could not repair this error

    显示 Could not repair this error 具有误导性的最后一条消息。The last message that says Could not repair this error is misleading. 此错误已修复,因为指向无效页 (255:177) 的数据库页行已被删除。The error was repaired because the database page row that pointed to the invalid page (255:177) was deleted.