We will be presenting at ShowIT 2018.
by Michal Tinthofer on 08/01/2018So after some time we are returning to presenting roadshow starting with Show IT Bratislava. Lets have a look at our session list.
Read moreTo 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.
Michal Tinthofer is the face of the Woodler company which (as he does), is fully committed to complete support of Microsoft SQL Server products to its customers. He often acts as a database architect, performance tuner, administrator, SQL Server monitoring developer (Woodler SMT) and, last but not least, a trainer of people who are developing their skills in this area. His current "Quest" is to help admins and developers to quickly and accurately identify issues related to their work and SQL Server runtime.
So after some time we are returning to presenting roadshow starting with Show IT Bratislava. Lets have a look at our session list.
Read moreA few weeks ago a had task to create procedure for testing workload from production server on test environment.Itsurely wasn't a big deal, but I need to learnmanycustomer employees to repeat this task on regular base. I started to look if somehow I could
Read moreWe will be releasing SMT 1.4 in the next couple of days.
Read more