June 26, 2019              Login  
 
 
Free Networking Monitoring Software For Network Management
 
SupportClaim DB Space in SQL     
Claim DB Space in SQL

Example showing how this command helps me to reduce size of my database after deleting records from table.


1) Take Backup of your Production Database.

2) Take Backup of Table Scripts of your Production Database.

3) Create Test Database in Local Environment

5) Run Tables creation script

6) Restore Production Database to Test Database in local environment

I am assuming you are familiar with above steps, actual steps begin after this.
I am also assuming that you have already deleted unwanted records in table.

7) Check Size of your Database
Exec sp_spaceused

8) Run Update Usage command
DBCC UPDATEUSAGE(0)

9) Check Size of your Database
Exec sp_spaceused

10) Run Shrink Database command
DBCC SHRINKDATABASE(0)

11) Check Size of your Database
Exec sp_spaceused

If everything goes smooth then you would see that your database size is reduced.

 
 
  Copyright 2013 by IT Support 4U - CompuSpace   Terms Of Use  Privacy Statement