Successful truncation of Transaction Log by using T-SQL in Query Analyzer , however the exact same code does is unsuccessful when scheduled by SQL Server Agent. Please assist.
Code:
Backup LOG [database_name] WITH TRUNCATE_ONLY;
DBCC shrinkfile('Logical_filena
me',0);
The above code successfully truncates the log when executed in Query Analyzer for the specific database. However, the job fails if the code is provided as a scheduled step in the SQL Server Agent.
What could be causing this problem? Please assist
Start Free Trial