![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm trying to create a scheduled job on SQL Server Agent using SMO with VB.NET 2.0. Here's a short code snippet: Dim theServer As New Server(strServerFQDN) Dim newJob As New Agent.Job(theServer.JobServer, strNewJobName) newJob.Create() 'Create job steps (not going to reproduce that code here) 'Create job schedule (not going to reproduce that code here) After I've created the Job, its marked as "Target multiple servers" in the Job Properties dialog in SSMS. This behavior appears to be the default. Instead, I want to set the JobType to Local, but that attribute of the Job class is ReadOnly. Can anyone point me in the right direction as to how I can set JobType to Local? I've already googled this and cannot find any results. Thanks for anyone who can give me some insight. |
#3
| |||
| |||
|
|
I'm trying to create a scheduled job on SQL Server Agent using SMO with VB.NET 2.0. Here's a short code snippet: Dim theServer As New Server(strServerFQDN) Dim newJob As New Agent.Job(theServer.JobServer, strNewJobName) newJob.Create() 'Create job steps (not going to reproduce that code here) 'Create job schedule (not going to reproduce that code here) After I've created the Job, its marked as "Target multiple servers" in the Job Properties dialog in SSMS. This behavior appears to be the default. Instead, I want to set the JobType to Local, but that attribute of the Job class is ReadOnly. Can anyone point me in the right direction as to how I can set JobType to Local? I've already googled this and cannot find any results. Thanks for anyone who can give me some insight. |
#4
| |||
| |||
|
|
I'm trying to create a scheduled job on SQL Server Agent using SMO with VB.NET 2.0. Here's a short code snippet: Dim theServer As New Server(strServerFQDN) Dim newJob As New Agent.Job(theServer.JobServer, strNewJobName) newJob.Create() 'Create job steps (not going to reproduce that code here) 'Create job schedule (not going to reproduce that code here) After I've created the Job, its marked as "Target multiple servers" in the Job Properties dialog in SSMS. This behavior appears to be the default. Instead, I want to set the JobType to Local, but that attribute of the Job class is ReadOnly. Can anyone point me in the right direction as to how I can set JobType to Local? I've already googled this and cannot find any results. Thanks for anyone who can give me some insight. |
#5
| |||
| |||
|
|
I'm trying to create a scheduled job on SQL Server Agent using SMO with VB.NET 2.0. Here's a short code snippet: Dim theServer As New Server(strServerFQDN) Dim newJob As New Agent.Job(theServer.JobServer, strNewJobName) newJob.Create() 'Create job steps (not going to reproduce that code here) 'Create job schedule (not going to reproduce that code here) After I've created the Job, its marked as "Target multiple servers" in the Job Properties dialog in SSMS. This behavior appears to be the default. Instead, I want to set the JobType to Local, but that attribute of the Job class is ReadOnly. Can anyone point me in the right direction as to how I can set JobType to Local? I've already googled this and cannot find any results. Thanks for anyone who can give me some insight. |
#6
| |||
| |||
|
|
I'm trying to create a scheduled job on SQL Server Agent using SMO with VB.NET 2.0. Here's a short code snippet: Dim theServer As New Server(strServerFQDN) Dim newJob As New Agent.Job(theServer.JobServer, strNewJobName) newJob.Create() 'Create job steps (not going to reproduce that code here) 'Create job schedule (not going to reproduce that code here) After I've created the Job, its marked as "Target multiple servers" in the Job Properties dialog in SSMS. This behavior appears to be the default. Instead, I want to set the JobType to Local, but that attribute of the Job class is ReadOnly. Can anyone point me in the right direction as to how I can set JobType to Local? I've already googled this and cannot find any results. Thanks for anyone who can give me some insight. |
#7
| |||
| |||
|
|
I'm trying to create a scheduled job on SQL Server Agent using SMO with VB.NET 2.0. Here's a short code snippet: Dim theServer As New Server(strServerFQDN) Dim newJob As New Agent.Job(theServer.JobServer, strNewJobName) newJob.Create() 'Create job steps (not going to reproduce that code here) 'Create job schedule (not going to reproduce that code here) After I've created the Job, its marked as "Target multiple servers" in the Job Properties dialog in SSMS. This behavior appears to be the default. Instead, I want to set the JobType to Local, but that attribute of the Job class is ReadOnly. Can anyone point me in the right direction as to how I can set JobType to Local? I've already googled this and cannot find any results. Thanks for anyone who can give me some insight. |
#8
| |||
| |||
|
|
I'm trying to create a scheduled job on SQL Server Agent using SMO with VB.NET 2.0. Here's a short code snippet: Dim theServer As New Server(strServerFQDN) Dim newJob As New Agent.Job(theServer.JobServer, strNewJobName) newJob.Create() 'Create job steps (not going to reproduce that code here) 'Create job schedule (not going to reproduce that code here) After I've created the Job, its marked as "Target multiple servers" in the Job Properties dialog in SSMS. This behavior appears to be the default. Instead, I want to set the JobType to Local, but that attribute of the Job class is ReadOnly. Can anyone point me in the right direction as to how I can set JobType to Local? I've already googled this and cannot find any results. Thanks for anyone who can give me some insight. |
#9
| |||
| |||
|
|
I'm trying to create a scheduled job on SQL Server Agent using SMO with VB.NET 2.0. Here's a short code snippet: Dim theServer As New Server(strServerFQDN) Dim newJob As New Agent.Job(theServer.JobServer, strNewJobName) newJob.Create() 'Create job steps (not going to reproduce that code here) 'Create job schedule (not going to reproduce that code here) After I've created the Job, its marked as "Target multiple servers" in the Job Properties dialog in SSMS. This behavior appears to be the default. Instead, I want to set the JobType to Local, but that attribute of the Job class is ReadOnly. Can anyone point me in the right direction as to how I can set JobType to Local? I've already googled this and cannot find any results. Thanks for anyone who can give me some insight. |
![]() |
| Thread Tools | |
| Display Modes | |
| |