One of the database has MDF_MSSQL_DBCC8 file besides its own datafile. The user also noticed that some of the data was missing from the database. Not sure what to do with these files or how to correct the database.
One of the database has MDF_MSSQL_DBCC8 file besides its own datafile. The user also noticed that some of the data was missing from the database. Not sure what to do with these files or how to correct the database.
Hi @SahaSaha-5270,
Was your issue resolved? Did the answers help you?
Please feel free to let us know if you have any other question.
If you find any post in the thread is helpful, you could kindly accept it as answer.
Best Regards,
Amelia
That's not the common naming convention for database files, but they can be named as one like.
You can get the associated database with this query
select mf.name, mf.physical_name, db.name
from sys.master_files as mf
inner join
sys.databases as db
on mf.database_id = db.database_id
order by db.name
Hi SahaSaha-5270,
MDF_MSSQL_DBCC files are the internal snapshot database generated for dbcc checkdb. The new MDF_MSSQL_DBCC files are deleted at the end of DBCC CHECKDB processing. If the operating system encounters an unexpected shutdown while the DBCC CHECKDB command is in progress, then these files will not be cleaned up. They will accumulate space, and potentially will prevent future DBCC CHECKDB executions from completing correctly. In that case, you can delete these new files after you confirm that there is no DBCC CHECKDB command currently being executed.
Please refer to What is .mdf_MSSQL_DBCC15 file which might help.
Best Regards,
Amelia
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
@AmeliaGu-msft > Thanks for the quick response. I plan on restarting the server and hoping that it will clean up the MDF_MSSQL_DBCC files. We have about 100 Database servers and I do not see DBCC CHECKDB run as a maintenance plan on any of the server. Is this something I should implement to prevent corruption of databases?
How do I check if DBCC CHECKDB command is in progress.
Two leftover DBCC files and user claiming data missing. Hmm, seems like there could be some trouble. Have you checked the SQL Server errorlog? If DBCC has run into trouble, this should appear here.
Hi SahaSaha-5270,
Thanks for your reply.
How do I check if DBCC CHECKDB command is in progress.
Please try this:
SELECT session_id ,
request_id ,
percent_complete ,
estimated_completion_time ,
DATEADD(ms,estimated_completion_time,GETDATE()) AS EstimatedEndTime,
start_time ,
status ,
command
FROM sys.dm_exec_requests
where command like '%DBCC%'
Best Regards,
Amelia
11 people are following this question.
Year and Month aggregation in same Pivot table in SQL Server
SQL Server Query for Searching by word in a string with word breakers
How to show first row group by part id and compliance type based on priorities of Document type?
Query to list all the databases that have a specific user
T-sql query to find the biggest table in a database with a clustered index