Scheduling VB script job in SQL server agent

  • Hi All,

    I have a windows scheduling VB script job(.bat file) in another windows server where SQL is not installed,i need to schedule these job in SQL server through agent so that i can have an alert when it fails.

    Any suggestions in this regard will useful.

  • I have a windows scheduling VB script job(.bat file)

    Really? Typically VBScript files are named with .vbs extension.

    in another windows server where SQL is not installed,i need to schedule these job in SQL server through agent so that i can have an alert when it fails.

    You cannot run it directly with SQL Server Agent, because it would run on the machine where the agent is installed.

    One possible solution is using PowerShell to trigger the remote execution, but it's not a oneliner script.

    -- Gianluca Sartori

  • I guess the vbscript file is called using cscript.exe via a batch file(guess!!). You can use xp_cmdshell to execute the batch file.

    It might not be enabled on your system. check that and enable that using sp_configure.

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

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