Wednesday, May 23, 2018

SQL - Database is too large. Size does not change after deleting data.

https://technet.microsoft.com/library/ms189035(v=sql.120).aspx

You have to run shrinkdatabase to free up all unused space in the db

Use Master
Alter Database TEST
SET SINGLE_USER With ROLLBACK IMMEDIATE

DBCC SHRINKDATABASE (UserDB, 10);

GO
Use Master
Alter Database TEST
SET MULTI_USER

No comments:

Post a Comment