16
2015
07

在MSSQL\Log文件夹下出现大量SQLDump10051.mdmp文件,导致磁盘用满

 

在D:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log 出现大量的  SQLDump10051.mdmp 文件,每隔两秒就生成几个,导致磁盘空间耗尽, 删除后一会又生成了好多。通过查百度解决方法如下

 

  1.   dbcc checkdb('msdb')

    发现有几个错误

  2. 将系统数据库中 msdb 的“sysjobhistory”表的索引删除后重建,问题解决

        

USE [msdb]
GO

/****** Object:  Index [clust]    Script Date: 07/16/2015 10:06:13 ******/
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[sysjobhistory]') AND name = N'clust')
DROP INDEX [clust] ON [dbo].[sysjobhistory] WITH ( ONLINE = OFF )
GO

USE [msdb]
GO

/****** Object:  Index [clust]    Script Date: 07/16/2015 10:06:13 ******/
CREATE UNIQUE CLUSTERED INDEX [clust] ON [dbo].[sysjobhistory]
(
 [instance_id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO


 

 

 

USE [msdb]
GO

/****** Object:  Index [nc1]    Script Date: 07/16/2015 10:08:30 ******/
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[sysjobhistory]') AND name = N'nc1')
DROP INDEX [nc1] ON [dbo].[sysjobhistory] WITH ( ONLINE = OFF )
GO

USE [msdb]
GO

/****** Object:  Index [nc1]    Script Date: 07/16/2015 10:08:30 ******/
CREATE NONCLUSTERED INDEX [nc1] ON [dbo].[sysjobhistory]
(
 [job_id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO


 

« 上一篇下一篇 »

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。