I am using MSSQL 2014 database, I recently see a file call DatabaseName.mdf_MSSQL_DBCC10 in the same location where my database .mdf file located. It has identical file size as my .mdf database file. Do any one know what is this file and what caused it to be created and is it save to delete that file manually ?
Please don't post ChatGPT answer.
Loading
Amit MohantyPosted Jul 19, 2023, 7:49 AM
Hey Deepak,
The file you mentioned, "DatabaseName.mdf_MSSQL_DBCC10," is most likely a temporary file created during the execution of the DBCC CHECKDB command in Microsoft SQL Server. DBCC CHECKDB is a built-in command used to check the logical and physical consistency of a database. During the execution of DBCC CHECKDB, SQL Server creates a snapshot of the database to perform the consistency checks. Once the DBCC CHECKDB command completes, SQL Server removes the temporary snapshot file autometically. So I don't think you need to delete that file manually.
Amit MohantyPosted Jul 19, 2023, 11:04 AM
No, the DBCC CHECKDB command does not run automatically every day by default. It is a manual command that is executed to check the logical and physical consistency of a database. It examines the integrity of database objects, indexes, and data pages, ensuring that the database is free from corruption or other issues.
If you are uncertain about whether DBCC CHECKDB is scheduled to run automatically on your system, you can check for the existence of any SQL Server Agent jobs or maintenance plans that include DBCC CHECKDB.
Deepak MPosted Jul 19, 2023, 10:40 AM
@Amit : is the DBCC CHECKDB command run automatically every day ?