Groups | Blog | Home
all groups > sql server programming > september 2003 >

sql server programming : SQL-DMO: SQL Agent Job cannot be found in Job Collection


Khor Xiang Yi
9/15/2003 10:32:04 PM
Hi experts,

I am using SQL DMO in my program to call a SQL Server
Agent Job. This SQL Server Agent Job is used to run the
replication process at the subscriber.

Basically my program will:
1. Read the name of the agent job saved in a database
table.
2. Run the above agent job (with the name from 1.) using
SQL-DMO.

However I am getting an error from SQL-DMO stating that
it cannot find the agent job with that name from the job
collection. I have checked and the name is correct.

The really weird thing is, on some machines, I do not
have this error, while on other machines, I have this
error.

Does anyone have any idea? Pls kindly advise. TQ in
Ovidiu Craciun [MSFT]
9/16/2003 2:28:39 PM
can you post a small repro case and maybe you want to tell me how those
jobs that cause you problems are named (maybe there is a problem with some
specific names, patterns...). I am interested in SQLDMO code you have not
anything else.

thank you
--
Ovidiu Craciun [MS]
--//----
This posting is provided "AS IS" with no warranties, and confers no rights.
--//----
[quoted text, click to view]

Khor Xiang Yi
9/16/2003 9:48:01 PM
Hi Ovidiu Craciun,

TQ for your prompt reply.

I have actually resolved the problem by granting "System
Administrators" Server Role to the server login name that
the program used to access the server.

Therefore it is a configuration issue.

[quoted text, click to view]
AddThis Social Bookmark Button