write a method that launches an Agent job
Easier way is with a SQL command + plain SQL with sp_start_job (Transact-SQL)
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
hi all,
I am trying to write a method that launches an Agent job from an asp.net page, I need:
using Microsoft.SqlServer.Management.Common;
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Management.Smo.Agent;
I tried Project-> Add Reference, but found nothing when Searching for Microsoft.SqlServer.Management.
Any idea what I need to install and where do I get it?
Thanks,
elsvieta
write a method that launches an Agent job
Easier way is with a SQL command + plain SQL with sp_start_job (Transact-SQL)
Try to use the “Manage NuGet Packages...” command for your project, go to Browse tab, find and install the Microsoft.SqlServer.SqlManagementObjects package.
Hi @elsvieta,
Beginning with SQL Server 2017 SMO is distributed as the Microsoft.SqlServer.SqlManagementObjects NuGet package to allow users to develop applications with SMO.
Creating a Visual C# SMO project in Visual Studio.NET
Best regards,
Lan Huang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.