Contact Us

To resolve the issue, first I need to find which login wizard is trying to drop. Since i didn't know, I have used this aproach:

Find job to login owner relationship:

SELECT j.job_id ,j.owner_sid ,j.name , l.name 
FROM msdb.dbo.sysjobs AS j LEFT JOIN 
sys.server_principals AS l
ON J.Owner_sid = l.sid

Then focus on owners having specific amount (2 in my case) of jobs assinged:

SELECT l.name, COUNT(*)
FROM msdb.dbo.sysjobs AS j LEFT JOIN 
sys.server_principals AS l
ON J.Owner_sid = l.sid
GROUP BY l.name
HAVING COunt(*) = 2 --here you may filter the amount of jobs owner should  own

When I knew the job owner, it was easy to list just his jobs:

SELECT l.name, COUNT(*)
FROM msdb.dbo.sysjobs AS j LEFT JOIN 
sys.server_principals AS l
ON J.Owner_sid = l.sid
GROUP BY l.name
HAVING COunt(*) = 2 --here you may filter the amount of jobs owner should  own

Hope it helps.

With regards, 

Michal.

More tips and tricks

SMT 1.9 is ready
by Jiri Dolezalek on 12/05/2023

What to expect from new SMT version?

Read more
Collation conflict
by Michal Tinthofer on 07/03/2012

I think there is more simple and harmless way. First we need to understand the process of tempdb collation setting.

Read more
Issues with Service Pack Install
by Michal Tinthofer on 13/04/2012

Recently I had some issues with SQL server 2008 R2 service pack 1 installation. From first perspective it looks like an issue with corrupted installation package, but true issue was somewhere else. It was a windows installer.

Read more