January 10, 2007 at 2:50 pm
I need a script to display all logins that are aliased to dbo user. Not in the dbowner role but aliased to the dbo. Any ideas?
January 11, 2007 at 9:19 am
I don't know how to get the info specifically for dbo, but if you run sp_helpuser with no parameters in a database, it will display the logins aliased to users.
Greg
Greg
January 11, 2007 at 9:22 am
Thanks. I used that but it not quite what I am after. Maybe I can disect the Sp_helpuser SP and get what I am after out of it.
January 11, 2007 at 9:35 am
i looked at sp_addalias, and it looks like any users that are aliased as dbo would have the sid for sa/dbo (which is always 1):
-- INSERT SYSUSERS ROW --
insert into sysusers select
@newuid, @status | 16, @loginame, @sid, 0x00,
getdate(), getdate(), @targuid, NULL
select * from sysusers where sid=0x01
Lowell
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply