惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Recent Announcements
Recent Announcements
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
量子位
博客园 - 司徒正美
Security Archives - TechRepublic
Security Archives - TechRepublic
P
Palo Alto Networks Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Cyberwarzone
Cyberwarzone
小众软件
小众软件
T
Threatpost
Latest news
Latest news
J
Java Code Geeks
博客园 - Franky
博客园 - 三生石上(FineUI控件)
Project Zero
Project Zero
P
Privacy & Cybersecurity Law Blog
T
Tenable Blog
L
Lohrmann on Cybersecurity
大猫的无限游戏
大猫的无限游戏
WordPress大学
WordPress大学
Apple Machine Learning Research
Apple Machine Learning Research
Scott Helme
Scott Helme
Simon Willison's Weblog
Simon Willison's Weblog
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Privacy International News Feed
人人都是产品经理
人人都是产品经理
S
Schneier on Security
T
The Blog of Author Tim Ferriss
V
V2EX
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
罗磊的独立博客
IT之家
IT之家
雷峰网
雷峰网
H
Help Net Security
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tor Project blog
C
Cybersecurity and Infrastructure Security Agency CISA
I
InfoQ
GbyAI
GbyAI
博客园 - 叶小钗
PCI Perspectives
PCI Perspectives
The GitHub Blog
The GitHub Blog
Martin Fowler
Martin Fowler
H
Heimdal Security Blog
Spread Privacy
Spread Privacy
博客园_首页
A
About on SuperTechFans
T
Tailwind CSS Blog
The Register - Security
The Register - Security

博客园 - 洪虎

Windows环境下安装Python 建立批命令快速修改本机IP地址 网络经典命令 - 洪虎 - 博客园 “指定域的名称或安全标识SID与该域的信任信息不一致”的解决方法 建立主DNS区域和辅助DNS区域的最佳实践 无人职守安装 XP 电脑黑客基本技术和入侵的关键字以及电脑攻防应用 建立一个可修改Windows域用户密码的web页面 将Excel转换为CSV的VBA代码 - 洪虎 - 博客园 用命令检查电脑是否被安装木马 DateTime.ToString 方法 - 洪虎 - 博客园 在C#中自定义异常 - 洪虎 - 博客园 使用DataDynamics.ActiveReports 创建子报表 错误的SQL脚本,错误消息 4104 - 洪虎 - 博客园 适配器模式 如何在 Reporting Services 开发基于用户权限的报表呢? 委托模式 接口模型 使用反射检查程序集,实现自动更新
修复SQL2000中损坏的表
洪虎 · 2006-12-20 · via 博客园 - 洪虎

用Sql2000的数据库,其中有个表 barcode 估计损坏了

在查询分析器执行 select * from barcode

提示

服务器: 消息 3624,级别 20,状态 1,行 1

Location: recbase.cpp:1371
Expression: m_nVars > 0
SPID: 52
Process ID: 776

连接中断


然后

执行  dbcc checktable(lhstock)

提示

服务器: 消息 8928,级别 16,状态 1,行 1
对象 ID 1237579447,索引 ID 0: 未能处理页 (1:13464)。详细信息请参阅其它错误。
服务器: 消息 8944,级别 16,状态 1,行 1
表错误: 对象 ID 1237579447,索引 ID 0,页 (1:13464),行 8。测试(ColumnOffsets <= (nextRec - pRec))失败。值为 16680 和 972。
服务器: 消息 8964,级别 16,状态 1,行 1

修复办法

use master
GO

-- sp_dboption 用于显示或更改数据库选项。当为 single user 选项为 true 时,每次只能有一个用户访问数据库。

sp_dboption 'lhstock','single user','true'                

DBCC CHECKDB('lhstock',REPAIR_ALLOW_DATA_LOSS)

sp_dboption 'lhStock','single user','false'

'lhstock' 的 DBCC 结果。

'Barcode' 的 DBCC 结果。
对象 'Barcode' 有 326848 行,这些行位于 6896 页中。

CHECKDB 发现了 0 个分配错误和 0 个一致性错误(在数据库 'lhStock' 中)。
DBCC 执行完毕。如果 DBCC 输出了错误信息,请与系统管理员联系。