Advantage SQL Engine
Removes a database user from the specified user group.
sp_RemoveUserFromGroup(
UserName,CHARACTER,50,
GroupName,CHARACTER,100 )
UserName (I) |
Name of the database user object to remove from the user group’s membership. |
GroupName (I) |
Name of the database user group object to remove the user’s membership. |
AE_INVALID_OBJECT_NAME |
Either the GroupName does not specify a valid user group in the database or the UserName does not specify a valid database user. |
AE_NOT_MEMBER_OF_GROUP |
The user is not a member of the specified user group. |
sp_RemoveUserFromGroup removes the user from the membership of the specified user group. Once the user is removed from the membership of the user group, the user loses all object access rights that he inherited from the user group.
After making a connection to the database, remove user "rsmith" from the user group "Managers". If the only rights the user has to the table "employees" are inherited from the "Managers" user group, the user "rsmith" will now have no rights to the "employees" table after being removed from the user group.
EXECUTE PROCEDUE sp_RemoveUserFromGroup(
‘rsmith‘,
‘Managers’ )
See Also