on 11-19-2015 11:56 PM
HI All,
I am trying to list all the objects for a particular owner using the below query.
select su.name + '.' + so.name from sysobjects so,sysusers su where so.type = 'U' and so.uid = su.uid order by su.name,so.name
Isnt there a simple query using sp_iqhelp
I just want to list for a particular owner.
sp_iqtable is a good one too. But i wanted to get stuff from sp_iqhelp and sysobjects.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My preference for this is just one slight variation:
select suser_name(creator)||'.'||table_name
from systable
where UPPER( suser_name(creator) ) = 'DBA' -- change this to alter object owner
order by 1 ;
If you want all objects, then this will work using sp_iqhelp:
select * from sp_iqhelp() where f2 = 'DBA'
Mark
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.