Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin.
Search for scripts directly from SSMS, and instantly access any saved scripts in your
SSC briefcase from the favorites tab.
Download now (direct download link)
Thank this author by sharing:
By Banyardi Schmardi,
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.
The scripts provided below will show you the "Recovery Mode (Model)" for any given database
jacky-script to find all databases ,which are not in full recovery mode
Database in Recovery Mode
Database is in recovery status.
Database Recovery Help