List of all OWNERS, not db_owner

  • Footage

    SSC Enthusiast

    Points: 123

    How can I get a list of all database owners in an instance (not db_owners but actual owners) for each and every databases in an instance? I know I can query one database at a time, but I would like one query that will get them all.

    Thanks,

    Tom

  • Mr. Brian Gale

    SSC-Insane

    Points: 23075

    SELECT name, SUSER_SNAME(owner_sid)
    FROM [sys].databases

    That query should do it.   Is that what you were looking for?

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply