script to check object ownership

  • Does anyone have any script that would show me all objects owned by a specific user in a database .

    any help will be greatly appreciated

    TIA 

  • Try this...

    declare @user sysname

    set @user = 'dbo'

    select so.[name], so.xtype, su.[name]

     from sysobjects so

     join sysusers su

     on so.uid = su.uid

     where su.[name] = @user

    -- Steve

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

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