May 13, 2004 #1 JohnBates MIS Joined Feb 27, 2000 Messages 1,995 Location US Hi, If user abc has created some objects, how can I determine those object names? I know there's a system stored proc, but I cant find it. thanks, john
Hi, If user abc has created some objects, how can I determine those object names? I know there's a system stored proc, but I cant find it. thanks, john
May 13, 2004 Thread starter #2 JohnBates MIS Joined Feb 27, 2000 Messages 1,995 Location US ..have I stumped everyone ? Upvote 0 Downvote
May 13, 2004 1 #3 MDXer Technical User Joined Oct 19, 2002 Messages 1,982 Location US I don't know the procedure your talking about but you this will give you a list of objects within a DB that a user owns. Code: select u.Name as 'User', o.Name as 'Object from sysobjects o JOIN sysusers u ON u.uid = o.uid where u.Name = 'dbo' "Shoot Me! Shoot Me NOW!!!" - Daffy Duck Upvote 0 Downvote
I don't know the procedure your talking about but you this will give you a list of objects within a DB that a user owns. Code: select u.Name as 'User', o.Name as 'Object from sysobjects o JOIN sysusers u ON u.uid = o.uid where u.Name = 'dbo' "Shoot Me! Shoot Me NOW!!!" - Daffy Duck
May 13, 2004 #4 MikeWiz9 Programmer Joined May 12, 2004 Messages 6 Location US Add to the where clause, AND o.xtype = 'u' So it should look like this... SELECT u.Name as "User", o.Name as "Object " FROM sysobjects o JOIN sysusers u ON u.uid = o.uid WHERE u.Name = 'dbo' AND o.xtype = 'u' Upvote 0 Downvote
Add to the where clause, AND o.xtype = 'u' So it should look like this... SELECT u.Name as "User", o.Name as "Object " FROM sysobjects o JOIN sysusers u ON u.uid = o.uid WHERE u.Name = 'dbo' AND o.xtype = 'u'
May 13, 2004 Thread starter #5 JohnBates MIS Joined Feb 27, 2000 Messages 1,995 Location US wow MDXer, That's exactly what I needed. Maybe there is not a sys sp. I never found one that does this. thanks, John Upvote 0 Downvote
wow MDXer, That's exactly what I needed. Maybe there is not a sys sp. I never found one that does this. thanks, John