need T-SQL code/script for shrinking all user db t-log files

  • Thanks for the hints, I ended up using sp_MSforeachdb, because I couldn't figure the way around putting the whole cursor in dynamic statement.

    At least it works finally.

  • Be aware the shrink may have no effect on some log files. If the active portion of the log occupies the end of the file you may not shrink below that point!

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

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

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