December 19, 2006 at 5:35 pm
I have a problem with a job on a SQL 2005 server. The job has only one step to execute a bat file. The bat file compresses a large backup using winrar. I created a credential account mapped to a test user belonging to local admin group. I created a CmdExec proxy account and gave it the credential above. When I executed the job, the backup file was compressed and place at desired folder on same server. It meant the bat file was successfully executed. However the job is reported failed. Here is the meessage in history:
Date 12/19/2006 4:06:52 PM
Log Job History (test compress)
Step ID 1
Server xxxxxxxxx
Job Name test compress
Step Name 1
Duration 00:00:13
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0
Message
Executed as user: servername\username. C:\WINDOWS\system32>c: C:\WINDOWS\system32>cd\ C:\>cd C:\Program Files\WinRAR C:\Program Files\WinRAR>winrar a c:\Temp\SQLData\data c:\Temp\SQLData\data.bak. Process Exit Code 0. The step failed.
I tried same thing on another server; the result is the same. What do I miss here? Thanks.
December 22, 2006 at 9:59 am
Is file size is managible by winrar command?
May be sql didn't get the returned aknowledgement when it is completed...
Try executing the bat file using xp_cmdshell command see what you get...or try run in command window.
MohammedU
Microsoft SQL Server MVP
December 22, 2006 at 10:04 am
This may be a real simple error. Use Enterprise Manager. Go to Jobs. Open the job. Go to the Steps tab. Open the step. Go to the Advanced tab. What is the action if the step is successful? If it says either:
1. go to next step
or
2. quit reporting failure
Both of those will report a failure even if the job is successful.
-SQLBill
December 22, 2006 at 1:00 pm
Mohammed,
I used a 3KB file to test the job so its size is not a problem. I am able to run EXEC xp_cmdshell 'C:\Temp\SQLData\CompressBackup.bat' at query window. If I change the type to T-SQL and run EXEC xp_cmdshell, the job is reported successfull. So it is just happens when I change the type to CmdExec to run the bat file.
Bill,
By default the job goes to next step event there is only one step. I already changed it to report success but still had the same proble.
Thanks.
December 22, 2006 at 4:14 pm
Are you tested with 3GB or 3KB?
3KB is very small size
MohammedU
Microsoft SQL Server MVP
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply