Solved

SQL Server database maint plan is failing during integrity check

Posted on 2007-12-05
10
838 Views
Last Modified: 2008-09-08
One of my maintenance plans is failing consistantly.  The db in question is on a drive with 175 GB of free space.  I have pasted the text from my log.  The failed job is the User DB integrity check.  

Any suggestions will be appreciated.    

Here is the info from my log file.....

[2] Database IMAGEDB: Check Data and Index Linkage...
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 1105: [Microsoft][ODBC SQL Server Driver][SQL Server]Could not allocate space for object '(SYSTEM table id: -391805569)' in database 'TEMPDB' because the 'DEFAULT' filegroup is full.
[Microsoft][ODBC SQL Server Driver][SQL Server]CHECKTABLE terminated. A failure was detected while collecting facts. Possibly tempdb out of space or a system table is corrupt. Check previous errors.
[Microsoft][ODBC SQL Server Driver][SQL Server]CHECKDB found 0 allocation errors and 1 consistency errors not associated with any single object.
[Microsoft][ODBC SQL Server Driver][SQL Server]CHECKDB found 0 allocation errors and 1 consistency errors in database 'IMAGEDB'.
[Microsoft][ODBC SQL Server Driver][SQL Server]repair_fast is the minimum repair level for the errors found by DBCC CHECKDB (IMAGEDB ).

    The following errors were found:

[Microsoft][ODBC SQL Server Driver][SQL Server]Could not allocate space for object '(SYSTEM table id: -391805569)' in database 'TEMPDB' because the 'DEFAULT' filegroup is full.
[Microsoft][ODBC SQL Server Driver][SQL Server]CHECKTABLE terminated. A failure was detected while collecting facts. Possibly tempdb out of space or a system table is corrupt. Check previous errors.
[Microsoft][ODBC SQL Server Driver][SQL Server]CHECKDB found 0 allocation errors and 1 consistency errors not associated with any single object.
[Microsoft][ODBC SQL Server Driver][SQL Server]CHECKDB found 0 allocation errors and 1 consistency errors in database 'IMAGEDB'.
[Microsoft][ODBC SQL Server Driver][SQL Server]repair_fast is the minimum repair level for the errors found by DBCC CHECKDB (IMAGEDB ).
    ** Execution Time: 1 hrs, 48 mins, 55 secs **
0
Comment
Question by:ispexpert
  • 4
  • 4
10 Comments
 
LVL 8

Expert Comment

by:i2mental
Comment Utility
It looks like the filegroup for TEMPDB is full and not set to autogrow. Right click on the tempdb, select properties. In the files section, check the autogrowth column for the data file in the primary file group. Edit that for more space or to automatically grow.
0
 

Author Comment

by:ispexpert
Comment Utility
It is set to autogrow by 10%.  Do I need to change that to a particular size in MB?
0
 
LVL 8

Expert Comment

by:i2mental
Comment Utility
No, 10% should be fine. Is that file on the drive that has free space? You mentioned 175gb of space, but that's not necessarily where the tempdb is as well.
0
 

Author Comment

by:ispexpert
Comment Utility
Yes, tempdb is on the F: drive where there is 175 GB free.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 8

Expert Comment

by:i2mental
Comment Utility
Well the message is pretty specific. It's saying that you've run out of space in the tempdb. That can either be because the file is not set to grow, so the space within the file actually fills up or because the hard disk is out of space so when it tries to grow, there is no room left. If all of the files in the tempdb are set to autogrow and those file reside on a disk with plenty of space... then that's strange.

It's failing on a DBCC CHECKTABLE command, but I can't tell what the table name it's checking is.

You can run DBCC CHECKTABLE ('tablename') WITH ESTIMATEONLY to determine how much space this process will need in the tempdb and make sure that it can get that space. You'll have to determine which table is being processed or look at them all if there are not too many.

You can do the same thing with DBCC CHECKDB WITH ESTIMATEONLY
0
 

Author Comment

by:ispexpert
Comment Utility
I'm not sure how to find out which table is being processed so I was going to run this command against all the tables in tempdb.  I get an error in query analyzer saying estimateonly is not a recognized option.  
0
 

Author Comment

by:ispexpert
Comment Utility
I have looked in the application event log only to find that the events from 12/2/07 (the day of failure) have been overwritten.  
0
 
LVL 8

Accepted Solution

by:
i2mental earned 500 total points
Comment Utility
the dbcc commands are actually being run on the  on the IMAGEDB database so that's where you should run your estimates. The DBCC command just leverages the tempdb while it's working. It's running out of working space.

The command for sql server 2000 should be

USE IMAGEDB
DBCC CHECKDB WITH ESTIMATEONLY

or

USE IMAGEDB
DBCC CHECKTABLE ('yourtablename') WITH ESTIMATEONLY

0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now