Sounds like you just need a for each. I just don't know how to do that with SQL.
-Daniel Ratliff -----Original Message----- From: Roland Janus [[email protected]<mailto:[email protected]>] Sent: Tuesday, November 12, 2013 07:30 PM Eastern Standard Time To: [email protected] Subject: RE: [mssms] Half OT: SQL query to change ownership Anyone? From: [email protected] [mailto:[email protected]] On Behalf Of Roland Janus Sent: Dienstag, 12. November 2013 13:24 To: [email protected] Subject: [mssms] Half OT: SQL query to change ownership Well, it is CM related. I know how to update ownership of a job: EXEC msdb.dbo.sp_update_job @job_id=N'ac0ec0eb-738e-4b82-9a4c-0a6ae3fc17ed', @owner_login_name=N'NT SERVICE\SQLSERVERAGENT' Also how to get the job select * from msdb.dbo.sysjobs where name like '%mpreplic%' but how do I change the owner for all jobs named e.g. '%test%' ? The information transmitted is intended only for the person or entity to which it is addressed and may contain CONFIDENTIAL material. If you receive this material/information in error, please contact the sender and delete or destroy the material/information.

