Current location - Health Preservation Learning Network - Slimming men and women - Sql 2008r2, the data.mdf file of the database takes up too much disk space.
Sql 2008r2, the data.mdf file of the database takes up too much disk space.
Excuse me, did you have a lot of operations to delete tables when you operated this database before?

If so, there is no way to reuse the space vacated by the delete operation, so it is best to use truncate to delete the table.

The reason is that delete will lock the deleted space in the table, so naturally others can't write in it;

If yes, after trying various methods upstairs, and your SQL Server is 2008 or 2008R2 or 20 12.

You can try to rebuild the table, which can eliminate the lock problem caused by delete in the tablespace.