question

GRaymer avatar image
GRaymer asked

What would cause a .bat file being called in a job to not run?

I've been out of the DBA world for a while and now I'm back! I've ran into an issue with one of my jobs. The job is setup to pull data (flat file) from a remote server using putty, when the data is pulled in we begin the ETL process. Without any changes to code the job stopped working. Our SysAdmins don't communicate well with us, so there may have been an OS patch applied, but I can't find any trace of an error being logged in SQL Logs, Event Logs, or our own App logs. We're still running on a Win2008 Server and MSSQL 2008 R2. Some details: -When I run the .bat file manually as Admin the .bat performs as expected. -When I run the the Stored Proc from the job manually without the line executing the .bat it runs as expected (if the data files are in place). -When I run the job as is it just stays in a executing state until I cancel the job. --When its executing I can see that it executes the .bat but the data never makes it to the download folder. I'm not sure what to do at this point. Any advise would be much appreciated. Cheers, G
jobsql-server-log
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Wimbush avatar image
David Wimbush answered
Welcome back to the world! Could be permissions. Is the SQL Agent service account an Admin or, at least, does it have the required permissions?
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

GRaymer avatar image
GRaymer answered
So...I've dug deeper now and found a chain of events that had no error handling or notification of any kind. Probably my fault as I tested and didn't set things back properly creating more problems. Man its been too long. :(
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.