Advertisement

04.22.2008 at 09:54PM PDT, ID: 23345489 | Points: 500
[x]
Attachment Details

Successful truncation of Transaction Log by using T-SQL in Query Analyzer but the exact same code does is unsuccessful when scheduled by SQL Server Agent.  Please assist.

Asked by rbtt in MS SQL Server

Tags: Microsoft, SQL Server, 2000, Service Pack 4

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_filename',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 assistStart Free Trial
[+][-]04.22.2008 at 10:08PM PDT, ID: 21417887

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 10:42AM PDT, ID: 21423306

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628