DBCC--CHECKDB--结果收集

--由宋沄剑提供

CREATE TABLE [dbo].[dbcc_history](

[Error] [int] NULL,

[Level] [int] NULL,

[State] [int] NULL,

[MessageText] [varchar](7000) NULL,

[RepairLevel] [int] NULL,

[Status] [int] NULL,

[DbId] [int] NULL,

[Id] [int] NULL,

[IndId] [int] NULL,

[PartitionID] [int] NULL,

[AllocUnitID] [int] NULL,

[File] [int] NULL,

[Page] [int] NULL,

[Slot] [int] NULL,

[RefFile] [int] NULL,

[RefPage] [int] NULL,

[RefSlot] [int] NULL,

[Allocation] [int] NULL,

[TimeStamp] [datetime] NULL CONSTRAINT [DF_dbcc_history_TimeStamp] DEFAULT (GETDATE())

) ON [PRIMARY]

GO

INSERT INTO dbcc_history ([Error], [Level], [State], MessageText, RepairLevel, [Status], 

[DbId], Id, IndId, PartitionId, AllocUnitId, [File], Page, Slot, RefFile, RefPage, 

RefSlot,Allocation)

EXEC (‘dbcc checkdb(‘‘master‘‘) with tableresults‘)

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。