April 22, 2004 at 4:18 pm
I've deleted all the id's of my SQL server with the exception of a few. There are currently 4 databases. Some of the id's I deleted are still being displayed within the Public Role on a couple of the databases. When I highlight them the remove does not become active. Is there another way to remove them?
April 23, 2004 at 6:57 am
In Query Analyzer you can use the system stored procedure sp_droprolemember. For instance:
EXEC sp_droprolemember 'public', 'UserToRemove'
K. Brian Kelley
@kbriankelley
April 23, 2004 at 9:42 am
I did as you suggested and got the following:
Membership of the public role cannot be changed.
Is there possibly another way to this?
April 23, 2004 at 11:47 am
Disregard that. Too early in the morning.
The error message is exactly right. You can't remove anyone from the public role. All users are members of the public role if they have access to the database. You want to remove access to the database for the given user. Use sp_revokedbaccess and this should remove the user (which will in turn remove it from the public role).
For instance:
sp_revokedbaccess 'OldUser'
K. Brian Kelley
@kbriankelley
April 23, 2004 at 12:49 pm
thank you...that does the trick.
I appreciate your help more then you'll ever know.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply