Running a SQL server job from OS

Running a SQL server job from OS

  

I would need to set a way to run a SQL SERVER job from the frontend using OutSystems (OS). In THE service center we have set the connection with the server where the job is located. But now how to proceed to run a SQL SERVER job?  I am not sure if I have enough permissions to run a job externally to the SQL Server Management Studio. Nevertheless there must be a way to call that job in the frontend from OS. Maybe using some stored procedure from the system that enables to run a job, externally to SSMS, that runs a dtsx package?

mind you IT IS Not a stored procedure we need to run, but a dtsx package .. 

Hi Jorge,

You can do it via a stored procedure , create a stored procedure and call that stored procedure from Outsystem using Oracle Connector extension.

For Example

The following example starts a job named Weekly Sales Data Backup.

USE msdb ;  GO  

EXEC dbo.sp_start_job N 'Weekly Sales Data Backup' ;  

GO  


Regards

-PJ-

dunno how to use the PKGName and SPName in the ExecuteSP widget. 

I have tested that SP in SSMS and it works like a gem. Now using this component.. there is no info about using these two parameters. I like the info: " a valid expression must be set for parameter SPName..." :D  


I suppose the SPName is the name of our stored procedure and I put between "", not sure about the PKGName. I supposed that the sp goes in parameters but it delivers an error... 

Hi,

Adding to Pramod's great feedback, try executing the stored procedure using a SQL widget. See more here.

Hi Jorge,

For PKGName you can go into configuration tool in Database section below highlighted is PKGName.



Regards

-SK-

Jorge is using Sql Sever, so I doubt Oracle Connector will help.

is there another  way to use an adequate connector to run a job in sql server from OUTSYSTEMS? 

Have you tried using a SQL widget / seen the topic shared above?

i OVERLOOKED the link, I'll check it now. thanks.

Hi Jorge,

You can use advance sql to call store procedure for sql sever

below is link form which you can take help

https://www.outsystems.com/forums/discussion/14867/how-to-execute-stored-procedures/


Regards

-SK-