SQL Server Shrink Database T-SQL Code: Revision history

Jump to navigation Jump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

1 September 2025

  • curprev 03:3503:35, 1 September 2025Karavi talk contribs 2,408 bytes +2,408 Created page with " The procedure joins sys.databases and sys.master_files system views in order to generate the CHECKPOINT and DBCC SHRINKFILE statement for all the user databases. It filters the system databases (DBID > 4) because these statements are not recommended for the system databases. -- ================================================================================= -- Author: Eli Leiba -- Create date: 2020-03 -- Procedure Name: dbo.usp_ShrinkAllLogsExcludeSy..."