Find out owners of objects

  • Dear All,

    I'm trying to find out if there is a way of finding out if a particular login is an owner of Objects in sql so they could be removed after transferring their ownership please?

    Thanks in advance!

  • select user_name(objectproperty(object_id,'OwnerId')), * from sys.objects
    where user_name(objectproperty(object_id,'OwnerId'))=' user here'

    ***The first step is always the hardest *******

  • SGT_squeequal - Thursday, July 12, 2018 2:59 AM

    select user_name(objectproperty(object_id,'OwnerId')), * from sys.objects
    where user_name(objectproperty(object_id,'OwnerId'))=' user here'

    Is there a way of finding out schema owners?

    Thank you

  • you could try this 
    SELECT name AS schema_name,USER_NAME(principal_id) AS owner_name
    FROM sys.schemas

    ***The first step is always the hardest *******

Viewing 4 posts - 1 through 3 (of 3 total)

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