September 20, 2011 at 2:08 pm
I have a SQL job that is owned by me. I do not have a specific login to the SQL server but the Windows SG I am part does. I am trying to write a report that shows all jobs and owner. I cannot find which table contains the sid that relates to me. The group I am part of is located in the sys.server_principles, the table which I am joining on to find the owners name.
September 21, 2011 at 1:38 pm
Use SUSER_SNAME():
SELECT name,
SUSER_SNAME(owner_sid) AS job_owner
FROM msdb.dbo.sysjobs
ORDER BY name ;
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
September 21, 2011 at 2:20 pm
Thank you.
September 21, 2011 at 2:50 pm
You're welcome, HTH.
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply