sp_droprolemember in user transactions

Last Post 03 Oct 2007 06:45 AM by jwilson32. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
jwilson32
New Member
New Member

--
30 Sep 2007 11:49 PM
I have a trigger which requires dropping a member from a role and includes user transactions. However you cannot call sp_droprolemember from within a user transaction. Looking at the code for the procedure gives me a line

quote:

%%Owner(Name = @membername).SetRoleMember(RoleID = @roluid, IsMember = 0)

I can find no documentation on SetRoleMember or %%owner and attempts to run this line as an exec statement fails with "syntax error near '%'"
Nor can I find any way of dropping a member from a role using T-SQL or DDL constructs.

How do I drop a member from a role using T-SQL code and avoiding sp_droprolemember? And where do I find information about the %%Owner construct?
jwilson32
New Member
New Member

--
03 Oct 2007 06:45 AM
And that about seems to be the concensus. I posted this query as well on the Microsoft SQL forum and got the same response. See sp_dropmember link for the responses.
Thanks All for the comments. It helped (and didn't help!)
You are not authorized to post a reply.

Acceptable Use Policy