Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2003
    Posts
    26

    Unanswered: Shrinking All MSSQL Database Script

    If someone can provide me some script thru which I can shrink all SQL Server Databases thru One Single Script.

    Regards

  2. #2
    Join Date
    May 2003
    Location
    UK
    Posts
    220
    Howdy

    If you run :

    DBCC SHRINKFILE('<data_logical_file_name>,<size_in_MB_y ou_want_to_shrink_to>)
    DBCC SHRINKFILE('<log_logical_file_name>,<size_in_MB_yo u_want_to_shrink_to>)

    Do this for each database on the server.

    Please read BOL ( search under "DBCC SHRINKFILE")

    Cheers,

    SG

Posting Permissions

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