Export (0) Print
Expand All
Expand Minimize

sp_dropapprole

SQL Server 2000

Removes an application role from the current database.

Syntax

sp_dropapprole [@rolename =] 'role'

Arguments

[@rolename =] 'role'

Is the application role to remove. role is sysname, with no default. role must exist in the current database.

Return Code Values

0 (success) or 1 (failure)

Remarks

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.

Permissions

Only members of the sysadmin fixed server role, the db_securityadmin and db_owner fixed database roles can execute sp_dropapprole.

Examples

This example removes the SalesApp application role from the current database.

EXEC sp_dropapprole 'SalesApp'

See Also

sp_addapprole

sp_changeobjectowner

sp_setapprole

System Stored Procedures

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft