I'm running batch processes via a batch file and I want SQL server to log the reslt when I execute my DBCC SHRINKFILE command from my batch file. Is there anyway to do this?
Example: - Run.bat
rem Shrink transaction log and log the result
"C:\Program Files\Microsoft SQL Server\100\Tools\Binn\osql.exe" -E -Q "Use [Database] DBCC SHRINKFILE(Database_log, 50)"