Removes an application role from the current database.
sp_dropapprole [@rolename =] 'role'
0 (success) or 1 (failure)
sp_dropapprole can only be used to remove application roles. Use sp_droprole to remove a standard Microsoft® SQL Server™ role. An application role cannot be removed if it owns any objects. Either remove the objects before removing the application role, or use sp_changeobjectowner to change the owner of any objects that must not be removed.
sp_dropapprole cannot be executed within a user-defined transaction.
Only members of both the db_securityadmin and db_owner fixed database roles can execute sp_dropapprole.
This example removes the SalesApp application role from the current database.
EXEC sp_dropapprole 'SalesApp'
sp_addapprole | sp_changeobjectowner |
sp_setapprole | System Stored Procedures |