sp_DropUser

Advantage SQL Engine

Delete a user object from the database.

Syntax

sp_DropUser( UserName,CHARACTER,50 )

Parameters

UserName (I)

Name of the user object to delete.

Special Return Codes

AE_INVALID_OBJECT_NAME Possible cause for the error is that the UserName is not a valid user name in the database.

Remarks

sp_DropUser removes an existing user from the database. Once the user is removed from the database, any future connection attempts to the database using the specified user name will fail with authentication error. Any existing connections by the user will still be valid. However, those connections may not be able to open table or execute SQL statement if the database is set up to verify the users’ access rights. If the database is not set up to verify the users’ access rights, those connection can still open table and execute SQL statement. See sp_ModifyDatabase for information on setting up user access rights verification.

Example

After making a connection to the database, delete the user named "User1" from the database.

EXECUTE PROCEDURE sp_DropUser( ‘User1’ );

See Also

sp_CreateUser

sp_DropUser

sp_ModifyUserProperty

sp_CreateGroup

sp_DropGroup

sp_AddUserToGroup

sp_RemoveUserFromGroup