cancel
Showing results for 
Search instead for 
Did you mean: 

Run a SQL Job from JScript

SOLVED
New Contributor

Run a SQL Job from JScript

I need to simply run a SQL Server Agent job. I don't need to return values; it is more of a middle man job. Could I do something like this:

var SJob;

var Sjob.ConnectionString = "all the stuff that goes in here...";

SJob.ProcedureName = "SendJobs";

SJob.ExecProc();

 

Or would I be going about this incorrectly? 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Manager

Re: Run a SQL Job from JScript

Hi @scmadden,

 

I've found the following example demonstrating how you can call an SQL stored procedure (even with parameters):

https://smartbear-cc.force.com/portal/KbArticleViewer?name=Call-an-SQL-Stored-Procedure

 

 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

4 REPLIES 4
Community Hero

Re: Run a SQL Job from JScript

What happened when you tried that?

New Contributor

Re: Run a SQL Job from JScript

Well, I haven't yet. Can't extend my trial either. Should get a license next week. It should work for an actual stored procedure, but this is for a job...

Community Manager

Re: Run a SQL Job from JScript

Hi @scmadden,

 

Have you managed to have this script worked?

 

 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Community Manager

Re: Run a SQL Job from JScript

Hi @scmadden,

 

I've found the following example demonstrating how you can call an SQL stored procedure (even with parameters):

https://smartbear-cc.force.com/portal/KbArticleViewer?name=Call-an-SQL-Stored-Procedure

 

 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors