Friday, February 10, 2012

Calling vb script from SQL job

I am trying to execute a visual basic script using a SQL job. I can schedul
e
this as a scheduled task and then use a separate SQL job to compelte the
formatting tasks, but prefer to keep all steps consolidated so it is easier
to trouble shoot.
I tried using xp_cmdshell 'job.vbs', no_output
but it gives the error that this is not a recognized internal command.
Any help would be greatly appreciated.>I am trying to execute a visual basic script using a SQL job. I can
>schedule
> this as a scheduled task and then use a separate SQL job to compelte the
> formatting tasks,
Why don't you have the VBScript task call a stored procedure?
A|||Hello Derekman:
You wrote on Mon, 26 Jun 2006 12:12:03 -0700:
D> I am trying to execute a visual basic script using a SQL job. I can
D> schedule this as a scheduled task and then use a separate SQL job to
D> compelte the formatting tasks, but prefer to keep all steps consolidated
D> so it is easier to trouble shoot.
D> I tried using xp_cmdshell 'job.vbs', no_output
D> but it gives the error that this is not a recognized internal command.
You can run only an executable; sql server won't look into the registry to
see what is the application handling file extension. In Explorer, this is
most likely specified as
WScript.exe "%1" %*
That's how it should be in sql job as well.
Vadim Rapp

No comments:

Post a Comment