query all objects by user

  • hey, im a sql noob, and had a question for you experts!

    i was wondering if it was possible to create a query which would get me all of the objects created by a particular user.

    thanks, and please, if i could be any clearer, just let me know!

  • k, found out that one can put this into query editor:

    select * from sysobjects where uid =user_id(user_name())

  • try this ....

    declare @name sysname

    set @name = 'yourUserDB'

    select * from dbo.sysobjects

    where uid = (select uid from master.dbo.sysusers

    where name like @name)

     

    cheers......

    alexia

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

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