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 Waits
by Michal Tinthofer on 25/11/2021

SMT Waits reports – handy overview of what is going on at the server

Read more
SMT 1.12 Introduces more features for tuning
by Michal Tinthofer on 14/04/2025

We are excited to announce the release of SMT 1.12.0. In this update, we have focused on refining existing features while introducing a new optional capability that could dramatically enhance the way you proactively tune your SQL Server with SMT.

Read more
SMT 1.13 Introduces more QOL features and Replication Monitor
by Michal Tinthofer on 12/09/2025

As we finalize the upcoming release, we want to share with you what is coming.

Read more