July 7, 2020 at 8:03 pm
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.
Mr. Brian Gale
July 7, 2020 at 9:17 pm
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