cancel
Showing results for 
Search instead for 
Did you mean: 

Run a SQL Job from JScript

SOLVED
Highlighted
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
Highlighted
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

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today

View solution in original post

4 REPLIES 4
Highlighted
Community Hero

Re: Run a SQL Job from JScript

What happened when you tried that?

Highlighted
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...

Highlighted
Community Manager

Re: Run a SQL Job from JScript

Hi @scmadden,

 

Have you managed to have this script worked?

 

 

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

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
Highlighted
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

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!

Retrieve Data from a Web Page

Participate!
Top Kudoed Authors