Variables for scripts

%~I – expands %I removing any surrounding quotes (“) %~fI – expands %I to a fully qualified path name %~dI – expands %I to a drive letter only %~pI – expands %I to a path only %~nI – expands %I to a file name only %~xI –...

SQL Trunc Logs Syntax

USE database1 BACKUP LOG database1 WITH TRUNCATE_ONLY DBCC SHRINKFILE (database1_LOG,2) DBCC SHRINKDATABASE (database1, TRUNCATEONLY) USE database2 BACKUP LOG database2 WITH TRUNCATE_ONLY DBCC SHRINKFILE (database2_LOG,2) DBCC SHRINKDATABASE (database2, TRUNCATEONLY)...