如何从C#Asp.net运行或启动Sql Server代理作业(当我单击按钮时)? [英] How to Run or Start Sql Server Agent Job from C# Asp.net (When I Click the button)?
本文介绍了如何从C#Asp.net运行或启动Sql Server代理作业(当我单击按钮时)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在sql server agent 2012中有一份工作,我想在asp.net页面点击按钮开始这项工作。我怎样才能开始这项工作请为我提供调用此工作的步骤。
解决方案
您可以使用sp_start_job [ ^ ]程序。
使用代码中的SqlCommand以适当的参数执行该程序。
使用C#管理SQL Server代理作业 [< a href =http://www.codeproject.com/Tips/367470/Manage-SQL-Server-Agent-Jobs-using-sharptarget =_ blanktitle =New Window> ^ ]
Hi, I have a job in sql server agent 2012 and I want to start this job on click of button in asp.net page. how can i start this job please provide me steps to invoke this job.
解决方案
You can use the sp_start_job[^] procedure.
Use SqlCommand from your code to execute that procedure with proper parameters.
Manage SQL Server Agent Jobs using C#[^]
这篇关于如何从C#Asp.net运行或启动Sql Server代理作业(当我单击按钮时)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文