ERROR ImageI have Azure Managed Instance databases. In which I have a database "ABC" whose size is 568 GB. When I run DBCC Check on my database it throws below error :
Msg 1823, Level 16, State 2, Line 4
A database snapshot cannot be created because it failed to start.Msg 1823, Level 16, State 8, Line 4
A database snapshot cannot be created because it failed to start.Msg 1133, Level 16, State 3, Line 4
The managed instance has reached its storage limit. The storage usage for the managed instance cannot exceed (1048576) MBs.Msg 7928, Level 16, State 1, Line 4
The database snapshot for online checks could not be created. Either the reason is given in a previous error or one of the underlying volumes does not support sparse files or alternate streams. Attempting to get exclusive access to run checks offline.Msg 5030, Level 16, State 12, Line 4
The database e43d1e76-adb6-49bc-87cc-e4e380f7ebd1 could not be exclusively locked to perform the operation.Msg 7926, Level 16, State 1, Line 4
Check statement aborted. The database could not be checked as a database snapshot could not be created and the database or table could not be locked. See Microsoft Knowledge Base article 928518 for details of when this behavior is expected and what workarounds exist. Also see previous errors for more details.
So, my question is
- How can I DBCC check for my ABC database/ how to solve those errors?
- The storage usage for the managed instance cannot exceed (1048576) MBs, In this error the storage usage(1048576) is of tempdb of logdb? Which storage size it is referring to?
1)– Connect to the target database
USE ABC;
— Run DBCC CHECKDB with appropriate options
DBCC CHECKDB;
2)DBCC CHECKDB (‘ABC’) WITH TABLOCK;
I tried above scripts
2
Answers
The Error could be due to insufficient disk space DBCC commands use internal read-only database snapshots.
insufficient disk space.
Database snapshots are created on the same drive.
at the same place where the corresponding database data files are located.
There could be a situation when Database do not have sufficient disk space can’t run the DBCC CheckDB command.
Please make check that there is sufficient disk space available on the disk.
Please refer this Micorsoft documentation.
Below some things you can do to resolve this issue: