Home Dashboard Directory Help
Search

msdb..sp_update_job does not work with Windows (Active Directory) groups as the @owner_login_name by DIMiller


Status: 

Active


2
0
Sign in
to vote
Type: Bug
ID: 776349
Opened: 1/11/2013 10:03:57 AM
Access Restriction: Public
1
Workaround(s)
view
0
User(s) can reproduce this bug

Description

I need to be able to change the owner of a particular job to an Active Directory Security Group. It appears the accepted method for doing this is to use the msdb stored procedure sp_update_job. When using a Windows Login as the @owner_login_name parameter, sp_update_job works as expected. However, if you attempt to use an Active Directory Security group (for which a login has been created), you get the following error message:

Msg 14234, Level 16, State 1, Procedure sp_verify_job, Line 197
The specified '@owner_login_name' is invalid (valid values are returned by sp_helplogins [excluding Windows NT groups]).
Details
Sign in to post a comment.
Posted by Microsoft on 1/15/2013 at 10:25 AM
Hi,

Thank you for reporting this issue. We will take a look on it and let you know what is the outcome.
Again, thank you very much for finding time to report this issue.

Evgeny Krivosheev,
SQL Server Program Manager
Sign in to post a workaround.
Posted by DanMaxic on 4/2/2014 at 6:27 AM
update
sysjobs
set owner_sid = (select SID from sys.syslogins where name = '%loginname{DOMAIN\GROUP}%')
where name = '%Jobname%'