This is an update to my previous script usp_ShrinkDBLogs.
The first script records the recovery mode of the database, changes it to simple, does a DBCC Shrinkdatabase, and then returns the recovery to the recorded mode. As before, you can use this script with a database name as the input parameter for a single database, or no parameters for all the databases.
The second script usp_Call_ShrinkAllLogs_Metrics, will call usp_ShrinkDBLogs and track both the recovery type and database size on disk from before and after the Shrink.
Note: Once this script has been run, full database backup(s) must be made to reinitialize the transaction Log Sequence Number (LSN).
Swim to Live, Live to Surf.