Thursday , 25 February 2021
New Posts

Shrink Database

You are here:
< Back

HOW TO SHRINK DATABASE

Here’s how to shrink the database file size:
DBCC SHRINKDATABASE (0, 10)
shrink-dat-01
Results:
shrink-dat-02

Some cases after doing the above, the file size does not shrink too. Do the following:
ALTER DATABASE otomax SET RECOVERY SIMPLE
GO
DBCC SHRINKFILE (otomax, 5)
GO
ALTER DATABASE otomax SET RECOVERY FULL

shrink-dat-03
Results:
shrink-dat-04

Then repeat the steps from the beginning using DBBC SHRINKDATABASE and then check the size of your database file.
shrink-dat-05

Comments are closed.

Scroll To Top