Trouble executing a .cmd file in SQL Agent

  • SQL Server 2000

    I am trying to execute a .cmd file through the scheduler by pointing the op sys command to the file. This is what's in the command window:

    E:\Batch Files\SA_Production.cmd

    This file executes perfectly when double clicking or from a command prompt. It just hangs when I execute it from scheduler. Is there anything special you need to do to get this kind of file to run?

    Thanks in advance. This issue is urgent.

    Regards,

    Jason Rexroat

  • You may have to setup SQL Server Agent proxy account.

  • check the job-owner. Don't use a windows account as job-owner, it might fail with authentication-check.

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • You need to set up a proxy account in SQL Server that has user rights to the directory where the .cmd file is located. Look for documentation in books online for the xp_cmdshell user rights.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply