程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> SqlServer數據庫 >> 關於SqlServer >> sqlserver2000數據庫修復實戰經驗

sqlserver2000數據庫修復實戰經驗

編輯:關於SqlServer
 我所講的一個故事的背景是這樣的,在某一個POS的項目中使用SQLSERVER 2000做前台數據庫,IBM 的DB2做後台數據庫。前台數據庫的環境是這樣的操作系統是Windows2000 SERVER(10 USERS),數據庫是SQLSERVER2000(E)+SP3,Application是POS的收銀系統(是一種實時的交易系統)。硬件的配置是:P4 XRON 2.4G*2,36G HDD*5 做的RAID5 ,1G MEMORY,HP DDS4 磁帶機,數據庫的容量一般保持在5G左右。

  因為數據比較的重要,並且數據容量也不大,我們要求的備份策略是每天在磁帶機做POS_DB的全備份(一個星期7天一個循環),在晚上還

在硬盤上做全部備份(MASTER,MSDB,POS_DB).這樣保持雙重的保險。

  1.故障爆發:
  2003-12-26 13:00
  客戶報告所有的POS死機和SERVER運行速度非常的慢。經過重新啟動服務器(啟動到檢查RAID卡時開始報警)我們發現在WINDEOWS 2000

SERVER的“系統日志”中有這樣的信息:
  Error: 823, Severity: 24, State: 2
  I/O error (torn page) detected during read at offset 0x0000001bf96000 in file     D :\DATA\POS_DB.mdf'.
  SQLSERVER的“錯誤日志”中有這樣的信息:
  2003-12-10 03:34:22.23 spid56 Error: 823, Severity: 24, State: 2
  2003-12-10 03:34:22.23 spid56 I/O error (torn page) detected during read at offset 0x00000074964000 in file

'D:\DATA\POS_DB.mdf'..
來自msdn的解釋:
  I/O logical check failure: If a read Windows API call or a write Windows API call for a database file is successful, but

specific logical checks on the data are not successful (a torn page, for example), an 823 error is raised. The following

error message is an example of an 823 error for an I/O logical check failure:
  2003-09-05 16:51:18.90 spid17 Error: 823, Severity: 24, State: 2
  2003-09-05 16:51:18.90 spid17 I/O error (torn page) detected during read at offset 0x00000094004000 in file

'F:\SQLData\mydb.MDF'..
  To resolve this problem, first run the DBCC CHECKDB statement on the database that is associated with the file in the

error message. If the DBCC CHECKDB statement reports errors, correct those errors before you troubleshoot this problem. If

the problem persists even after the DBCC CHECKDB errors have been corrected, or if the DBCC CHECKDB statement does not report

any errors, revIEw the Microsoft Windows NT system event log for any system errors or disk-related errors. You can also

contact your hardware vendor to run any appropriate diagnostics.

  I/O邏輯檢查失敗:如果有一個Windows程序在讀取和寫數據庫文件時是成功的,但是在詳細的數據邏輯檢查時沒有成功(比如:不完整的

頁),SQLSERVER會返回MSG 823的錯誤。下面就是一個I/O邏輯檢查失敗MSG   823的實例:
  2003-09-05 16:51:18.90 spid17 Error: 823,

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved