Results 1 to 3 of 3

Thread: shrinking a Database

  1. #1
    Join Date
    May 2009
    Posts
    5

    shrinking a Database

    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

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    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.

  3. #3
    Join Date
    Sep 2002
    Posts
    5,938
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •