sid location in db for users in a windows group

  • 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.

  • 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

  • Thank you.

  • 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