Calling VBScript from a Job Step

  • All,

    Maybe the caffine hasn't kicked in yet but we have a scheduled job on each production box which runs a job to move old backup files.  On each backup volume are a series of visual basic script files.  When I created the job, I set the step type to Operating System Command (CmdExec), typed in the path to the vbs file and tested it.  No problems.

    Moved onto the next box, done the same thing, tested it and it fails saying the system can't find the path specified.  I done a small test and changed the step type to Transact SQL and used the xp_cmdshell with the same file path and it works.

    Now, I know the path is valid as the xp_cmdshell works, but well, I would rather not use xp_cmdshell - infact, I have it on my to do list to remove this functionality!

    So the question is, why does xp_cmdshell work and the OS Command not?

    Thanks,

    Clive

  • CmdExec is running under owner login or  SQL Agent Proxy Account where as xp_cmdshell runs under sysadmin .

    i am sure someone will step in correct me if i am wrong

     

     

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

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