July 29, 2003 at 8:19 pm
I am looking for a function like is_member but with an extra parameter ... something like:
select is_member('user_name','role')
where you can explicitly find out if a particular user is a member of a role instead of the current user.
Is there anything like it in SQL Server or will I have to create a UDF of my own (thought I'd ask first so I don't waste time)?
Thanks
Jim
August 1, 2003 at 8:00 am
This was removed by the editor as SPAM
August 2, 2003 at 9:12 am
I think you'll have to do your own. It looks like the DMO IsMember version might be more flexible, but that wont help in a select.
Andy
August 6, 2003 at 7:40 am
Don't know about functions (I'm on SQL7) but I suppose you could write a function to return a result of lookup for username in master..syslogins and check sysadmin, securityadmin, serveradmin, setupadmin, processadmin, diskadmin and dbcreator with a case statement or database sysusers where roles is a bitmask for db_owner, db_accessadmin, db_securityadmin, db_ddladmin, db_backupoperat, db_datareader, db_datawriter, db_denydataread, db_denydatawrit
Far away is close at hand in the images of elsewhere.
Anon.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply