Skip to content

Instantly share code, notes, and snippets.

@ThinkZ
Last active August 5, 2017 16:23
Show Gist options
  • Save ThinkZ/55432ba2857e2ad44191e1c5d4a2b130 to your computer and use it in GitHub Desktop.
Save ThinkZ/55432ba2857e2ad44191e1c5d4a2b130 to your computer and use it in GitHub Desktop.
SQL Server SHRINKFILE
Select name from data.sys.database_files where type=1;
DUMP TRANSACTION data with NO_LOG;
Backup LOG data with NO_LOG;
DBCC SHRINKFILE('Data_log');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment