DBCC15 Result File

  • Mary K

    SSC Veteran

    Points: 269

    I had a database on a drive that failed. It got corrupted, but only 3 tables. It was moved to a new drive. Then due to choices that were not mine to make, it was decided not to restore from an untainted backup and to instead rebuild these three tables. I did this and everything looked good. It passed DBCC Checkdb after that and all functions that called those tables began working again without error. So far so good.

    My question is that after all's said and done, I've got this persistent file that I've never seen before. It's "databasename.mdf_MSSQL_DBCC15" and I can't delete it because it's in use. I thought it would delete when I ran another successful DBCC Checkdb but the file doesn't seem to be going anywhere.

    Is this file important? Can I just stop MS SQL Server Service and then delete it? What are the best practices for this? Why did it get created at all? I've tried to google for DBCC15 file type and there seems to be a shortage of information available to the general public of the internet (or my search criteria were exceptionally bad, I suppose).

    Thanks,

    -M

     

    • This topic was modified 6 months, 3 weeks ago by  Mary K.
  • Sue_H

    SSC Guru

    Points: 90287

    It's from the snapshot created by the DBCC CHECKDB process. Try restarting the SQL Server service - it should clean up itself on a restart.

    Sue

  • Alejandro Santana

    SSCommitted

    Points: 1748

    Run the next query and see if its attached to any database.

    Select * from sys.master_files

    with the query above you could see if the file is attached to a database.

    run the next query and see if there's requests thats executing at the database

    select * from sys.dm_exec_requests 
    where 1=1
    and session_Id > 50
    and database_Id = 'yourdbid'

    Also check if you have any database snapshots through ssms

     

  • Mary K

    SSC Veteran

    Points: 269

    The file is not attached to any db in that list.

    No requests.

    I don't see any snapshots under SQL Server Instance > Databases > Database Snapshots - so I don't think there are any.

     

    I'll try restarting the SQL Server Service to see if that clears it up.

     

    Thank you both!

  • Sue_H

    SSC Guru

    Points: 90287

    The naming convention with appending _MSSQL_DBCC<NN> to database name.mdf is what's used by the DBCC CHECKDB process for creating the internal snapshot. It should have cleaned up after the DBCC completed but if something went awry with the process, it may not delete. It's supposed to then clean up on a restart.

    Did it go away after the restart?

     

    Sue

  • Mary K

    SSC Veteran

    Points: 269

    I won't get to restart it until the next maintenance window... very early Monday morning. I will let you know! Thanks again.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply