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

Releasing SMT 1.3
by Michal Kovaľ on 01/07/2021

A release of SMT 1.3 have just commenced

Read more
SQL Konferenz 2026
by Mikuláš Mráz on 12/03/2026

Earlier this month we attended SQL Konferenz 2026, held at Congress Park Hanau, just outside Frankfurt. The venue is large and perfectly suited for conferences, which the name itself already suggests.

Read more
Conquering Deadlocks: How We Achieved a 93% Reduction in Database Blockages
by Michal Kovaľ on 15/10/2020

In high-concurrency environments, deadlocks are more than just technical glitches...they are silent performance killers.

Read more