AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / dba / 问题 / 164417
Accepted
Henrik Staun Poulsen
Henrik Staun Poulsen
Asked: 2017-02-16 05:47:30 +0800 CST2017-02-16 05:47:30 +0800 CST 2017-02-16 05:47:30 +0800 CST

SQL Server 检测到基于逻辑一致性的 I/O 错误:RESTORE 上的 pageid 不正确

  • 772

将我们的数据库恢复到新的服务器硬件失败并出现页面错误。

Message
SQL Server detected a logical consistency-based I/O error: 
incorrect pageid (expected 49:8125916; actual 49:29097436).
It occurred during a read of page (49:8125916) in database ID 7 at
offset 0x00000f7fbb8000 in file x:\Databases\Data07\DataWarehouse_OperationalData_15.ndf'.
Additional messages in the SQL Server error log or system event
log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately.
Complete a full database consistency check (DBCC CHECKDB). 
This error can be caused by many factors; 
for more information, see SQL Server Books Online.

在这个 70 TB 数据库和 6 年历史的服务器上,DBCC CheckDB 将花费我们大约一周的时间。
有没有可能是我的备份损坏了?
还是说新服务器有问题?
还是问题出在旧服务器上的生产数据库?

这是 SQL Server 2016 SP1 CU1,page_verify_option_desc 是 CHECKSUM。

这是我从新服务器上的错误日志中可以看到的:

Starting up database 'DataWarehouse'.
The database 'DataWarehouse' is marked RESTORING and is in a state that does not allow recovery to be run.
Error: 824, Severity: 16, State: 2.
SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 49:8125916; actual 49:29097436). It occurred during a read of page (49:8125916) in database ID 7 at offset 0x00000f7fbb8000 in file 'S:\MSSQL\DSA\Databases\DataWarehouse\Data07\DataWarehouse_OperationalData_15.ndf'.  Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.
Error: 18456, Severity: 14, State: 38.

当我在旧服务器上运行它时:

DBCC TRACEON (3604);
DBCC PAGE ('datawarehouse', 49, 8125916, 0);

我明白了

DBCC execution completed. If DBCC printed error messages, contact your system administrator.

PAGE: (49:8125916)


BUFFER:


BUF @0x000000802C5E9300

bpage = 0x0000004DF03E8000          bhash = 0x0000000000000000          bpageno = (49:8125916)
bdbid = 5                           breferences = 1                     bcputicks = 0
bsampleCount = 0                    bUse1 = 5844                        bstat = 0x9
blog = 0x15ab215a                   bnext = 0x0000000000000000          bDirtyContext = 0x0000000000000000
bstat2 = 0x0                        

PAGE HEADER:


Page @0x0000004DF03E8000

m_pageId = (49:8125916)             m_headerVersion = 1                 m_type = 3
m_typeFlagBits = 0x0                m_level = 0                         m_flagBits = 0xa200
m_objId (AllocUnitId.idObj) = 10814647                                   m_indexId (AllocUnitId.idInd) = 256
Metadata: AllocUnitId = 72058302786633728                                
Metadata: PartitionId = 72058370492596224                                Metadata: IndexId = 1
Metadata: ObjectId = 1916450641     m_prevPage = (0:0)                  m_nextPage = (0:0)
pminlen = 0                         m_slotCnt = 2                       m_freeCnt = 2452
m_freeData = 5764                   m_reservedCnt = 0                   m_lsn = (2455108:11140830:20)
m_xactReserved = 0                  m_xdesId = (28:447547798)           m_ghostRecCnt = 0
m_tornBits = 31453216               DB Frag ID = 1                      

Allocation Status

GAM (49:7668480) = ALLOCATED        SGAM (49:7668481) = NOT ALLOCATED   
PFS (49:8120352) = 0x42 ALLOCATED  80_PCT_FULL                           DIFF (49:7668486) = CHANGED
ML (49:7668487) = NOT MIN_LOGGED    


DBCC execution completed. If DBCC printed error messages, contact your system administrator.

DBCC CHECKFILEGROUP 当前正在运行。完成没有错误。

SeanGallardy 评论了二进制数。我花了很长时间才明白他的意思,但我终于在程序员模式下在 Windows 计算器中输入了这两个数字,它显示的内容如下: 红色显示差异

更新:我们进行了另一次备份并从旧服务器恢复到新服务器。这次我们收到了这样的信息:

Could not redo log record (2456609:4261461:64), for transaction ID (28:972770238), on page (48:211577379), allocation unit 72058359886184448, database 'DataWarehouse' (database ID 7). 
Page: LSN = (2456609:3279166:236), allocation unit = 72058351460417536, type = 20. Log: OpCode = 2, context 5, PrevPageLSN: (2456609:4250688:2). 
Restore from a backup of the database, or repair the database.

我试图用谷歌搜索这条消息,但我能找到的唯一建议是恢复数据库(这是我想要做的)。

真正的问题是;接下来我该怎么办?

sql-server restore
  • 1 1 个回答
  • 6136 Views

1 个回答

  • Voted
  1. Best Answer
    Remus Rusanu
    2017-03-01T01:37:11+08:002017-03-01T01:37:11+08:00

    在进行还原之前,您没有备份。

    真正的问题是;接下来我该怎么办?

    这可能听起来不像是 DBA.SE 问题的“答案”,但坦率地说,您在这里唯一合理的选择是向 Microsoft 提出支持案例并寻求帮助,或者聘请有信誉的专业人士(顾问或公司)修复 SQL Server 损坏问题的可靠记录。如果您买不起这些选项,则意味着数据不值得。

    • 1

相关问题

  • SQL Server - 使用聚集索引时如何存储数据页

  • 我需要为每种类型的查询使用单独的索引,还是一个多列索引可以工作?

  • 什么时候应该使用唯一约束而不是唯一索引?

  • 死锁的主要原因是什么,可以预防吗?

  • 如何确定是否需要或需要索引

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目

    • 12 个回答
  • Marko Smith

    如何让sqlplus的输出出现在一行中?

    • 3 个回答
  • Marko Smith

    选择具有最大日期或最晚日期的日期

    • 3 个回答
  • Marko Smith

    如何列出 PostgreSQL 中的所有模式?

    • 4 个回答
  • Marko Smith

    列出指定表的所有列

    • 5 个回答
  • Marko Smith

    如何在不修改我自己的 tnsnames.ora 的情况下使用 sqlplus 连接到位于另一台主机上的 Oracle 数据库

    • 4 个回答
  • Marko Smith

    你如何mysqldump特定的表?

    • 4 个回答
  • Marko Smith

    使用 psql 列出数据库权限

    • 10 个回答
  • Marko Smith

    如何从 PostgreSQL 中的选择查询中将值插入表中?

    • 4 个回答
  • Marko Smith

    如何使用 psql 列出所有数据库和表?

    • 7 个回答
  • Martin Hope
    Jin 连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目 2014-12-02 02:54:58 +0800 CST
  • Martin Hope
    Stéphane 如何列出 PostgreSQL 中的所有模式? 2013-04-16 11:19:16 +0800 CST
  • Martin Hope
    Mike Walsh 为什么事务日志不断增长或空间不足? 2012-12-05 18:11:22 +0800 CST
  • Martin Hope
    Stephane Rolland 列出指定表的所有列 2012-08-14 04:44:44 +0800 CST
  • Martin Hope
    haxney MySQL 能否合理地对数十亿行执行查询? 2012-07-03 11:36:13 +0800 CST
  • Martin Hope
    qazwsx 如何监控大型 .sql 文件的导入进度? 2012-05-03 08:54:41 +0800 CST
  • Martin Hope
    markdorison 你如何mysqldump特定的表? 2011-12-17 12:39:37 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 对 SQL 查询进行计时? 2011-06-04 02:22:54 +0800 CST
  • Martin Hope
    Jonas 如何从 PostgreSQL 中的选择查询中将值插入表中? 2011-05-28 00:33:05 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 列出所有数据库和表? 2011-02-18 00:45:49 +0800 CST

热门标签

sql-server mysql postgresql sql-server-2014 sql-server-2016 oracle sql-server-2008 database-design query-performance sql-server-2017

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve