Wednesday, June 1, 2011

Run a VBscript using SQL Server.

Today I came across a question in EE of how to run a VBscript using SQL server.
Well, it could be done using the SQL server agent or using SSIS, but the easiest way would be the SQL agent.

Here how:

1-Right click on "SQL Server Agent" and select "New Job"
2-Name the job according to your needs.
3-From the "Steps" , select New.
4-Name it to your needs and select the "Type" as "Operating System CmdExec" as shown in the screenshot.
4-Set the schedule as desired and that's it!!


  1. I wish it were that easy. What if SQL Server Agent doesn't have sufficient privileges to run the vbscript file? I can't get it to run at all.

  2. Thanks for the tips guys. They were all great. I have been having issues with being fat both mentally and physically. Thanks to you guys i have been showing improvements. Do post more.