Hi,
In SQL database, I have job created to take database backup. How do i run that job using UiPath. Is there any activity available for it?
Please help…Thank you
Hi,
In SQL database, I have job created to take database backup. How do i run that job using UiPath. Is there any activity available for it?
Please help…Thank you
Hi
Welcome back to uipath community
we can do this with the help of UiPath.Database.Activities and with Execute Non Query activity
UiPath.Database.Activities
Cheers @SagarSB
Hi
Thanks for quick response…
But non-query is basically used for executing Update, delete and insert statements.
We cannot execute database job using it
Kindly clarify What do you mean by database Job
is it a procedure or function
if Procedure it can be executed with that activity
Cheers @SagarSB
Hi @SagarSB,
As @Palaniyappan said it is right. This is one of way to execute the jobs.
SqlConnection conn = new SqlConnection("Data Source=<your_db>;Integrated Security=True");
conn.Open();
SqlCommand cmd = new SqlCommand("msdb.dbo.sp_start_job",conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@job_name", "<your_job_name>");
cmd.ExecuteNonQuery();
So in the Execute Non Query activity.
Parameters and values
~
It will work.
Thank you
Balamurugan.S
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.