Shirnkfile ?????

  • Hi,

    I have a db with 3.5gb data and 1gb free space and log with 1.5gb free space. i would like to make these have a couple of 100 mb free each but which ever command I run (successfully) it makes no change to the freespace.

    i.e.

    to set the size

    dbcc shrinkfile (data, 4000, notruncate)

    or just to reduce the size

    dbcc shrinkfile (data, truncateonly)

    The same happens with the log file - it all seems a bit hit and miss because all worked ok on another database.

    Guidance anyone?

    Many thanks

  • When shrinking the log I have founnd I have to do the following:

    backup log @database

    with no_log

    then I can shrink the log:

    dbcc shrinkfile (@logfilename, @size)

    When shrinking the data portion try:

    dbcc shrinkfile ('data', 4000)

    Hope this helps.

    Jeremy

    PS Make sure you have backups first!!

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply