# Database Discussions > Microsoft SQL Server 2005 >  shrinking a Database

## tkatende

Hello there,
i do have a database running on sql 2005 express edition. Apparently the size of the databasefile is 3.86 Gb, the log file is 82.6 Mb. I tried using the dbcc shrinkdatabase ()script and it only dropped the log file from 82.6 Mb to 504 Kb, but the database file remained intact in size. please help me with what i should do to shrink the database file. I tried the shrinkdatafile script, it didn't work either. Sql server 2005 has a limit on the size of the databasefile which is 4 Gb. am already hitting that target.
Thanks,
Timothy

----------


## skhanal

Did you check the Disk space use report from Management studio to find what each tables are using. This might give you a clue on why data file so large.

----------


## rmiao

Can't shrink if has no free space in the db. Also check if tables are fragmented, rebuild clustered index in all tables then shrink.

----------

