How to retrieve all objects a user owns?

  • Many thanks in advance.

  • USE database_name

    GO

    SELECT *

    FROM sys.objects

    WHERE USER_NAME(OBJECTPROPERTY(OBJECT_ID, 'ownerid')) = 'the_owner_name' ;

    GO

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

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

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