You can prevent the SQL database file from having a sparse
attribute when you run the
dbcc command
by adding a tablock option, as in the following examples:
use <database file>
dbcc checkdb with tablock
go
use <database file>
dbcc checkalloc with tablock
go
If your SQL database file has already been converted into a
sparse file, you can recover the database file by following these steps.
Note Make sure that your target volume has sufficient free space
before you perform this operation.
- Stop the SQL service.
- Copy the SQL database file to another location.
- Copy the SQL database file back to the original location.
- Start the SQL service.