IS_MEMBER
Apr 16, 2002
IS_MEMBER returns status on membership in a NT group or db role. My problem is , it returns 0 (No) if I use IS_MEMBER on a role, and the user is member of a NT Group which again is member of the role. Example: NT User = UK_User, this account is member of NT Group UK_Group. In SQL Server, only the NT Group (UK_Group) is entered as login / user. And in SQL Server, UK_Group is member of the role UK Role. When UK_User calls IS_MEMBER ('UK Role'), the answer is 0 (No). I would like it to be 1 (Yes) ! Any suggestions how to do this (we do not want to enter all NT Users as logins in SQL server, only the NT Groups).
brgds,
Odd Oren
View 1 Replies
Apr 30, 2001
Hi everyone,
I've got a problem using the function is_member()...
Here's the background story:
I'm a member of an NT group: NTGroup1Me
I HAVE TO be a member of this group, not managed by the company i'm in!
I developped an application accessing to a SQL Server database, and the access is managed with others NT Groups (ie: if i'm a member of NTGroup2 then i can access to modify, if NTGroup3, then i can access to read only...)
So i'm in NTGroup1, and i'm also in NTGroup2, as "NTGroup1Me", not as "Me"
I'd like to use is_member to verify that i'm in NTGroup2, but is_member returns me '0' (it should be '1' !!)... which login does the is_member() function verify ?
- "Me"
- "NTGroup1Me"?
- ... ?
I hope it's understandable, because it's not easy to explain... And English is not my mothertongue :))
If someone can help me ...
View 1 Replies
View Related
May 16, 2006
Hi,
IS_Member function Indicates whether the current user is a member of the specified Microsoft Windows group or Microsoft SQL Server database role. If I want to test this for different user other than the current user, How I can do this?
Thanks
View 6 Replies
View Related
Dec 11, 2006
Hi All -
I am running sql2005 on windows 2003 all with uptodate SPs
Im sure this has been discussed somewhere, but I just dont understand why its behaving this way.
my issue is that if a 'db_owner' is a member of another db role then the is_member('some_other_role') always returns 0
example:
dbrole: testrole
ntuser: joeuser
ntgroup: testgroup
ntgroup: grpsysadmins
joeuser is a domain login.
testgroup and grpsysadmins are both nt groups.
joeuser is a member of both testgroup and grpsysadmins
grpsysadmins is a member of administrators grp on the sql server machine
testrole is a sql role
testgroup is a login into sql
testgroup is a member of testrole
1) when I do select is_member('db_owner') I get 1
2) when I do select is_member('testrole') I get 0 <== this is the wierd one
3) when I do select is_member('machinename estgroup') I get 1
I am expecting all 3 to return 1. now if I am logged as a user that is not sysadmin then select is_member('testrole') returns 1.
this behavior seems to be by design, but for the life of me i have no idea why?
View 7 Replies
View Related
Aug 10, 2007
Hello All,
I have a situation where after creating roles and addding users to the roles then when i call Is_Member('MyRole') on my development box it tells me the user is a member of the Role,
But when i detach the database and deploy on a production server and call Is_Member('MyRole') it tells me that the user is not a member of the Role....
I went on to call the system stored procedures, sp_helprolemember to actualy determine if the user is in the 'MyRole' role and the procedure returned a list which i confirmed that the user actually exists in that role..
So am pretty confused when i call Is_Member('MyRole') and it gives me 0 meaning the user is not in the role....
Plss i need help on this thanks a million
KNOW THY SELF
View 8 Replies
View Related
Mar 1, 2007
I am not sure why this is not working it clearly states in the MSDN that it should "
'role'
Is the name of the SQL Server role being checked. role is sysname and can include the database fixed roles or user-defined roles but not server roles.
"
I have seen many questions revolving around this issue on this site and on the net about this but know one can answer it
I have created a new user defined database role called testrole with any owner
then created a new sql login and user (Sql Authentication)
add the user to the database role testrole
check IS_MEMBER and it returns 0
try this with a fixed database role and I get the desired result of 1
this is simple and should not be such a problem for every one
unless I am doing something wrong
Please help
Thanks
View 3 Replies
View Related