Skip to content

Latest commit

 

History

History
98 lines (77 loc) · 4.55 KB

File metadata and controls

98 lines (77 loc) · 4.55 KB
title sp_dbfixedrolepermission (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 03/14/2017
ms.prod sql-non-specified
ms.reviewer
ms.suite
ms.technology
database-engine
ms.tgt_pltfrm
ms.topic language-reference
f1_keywords
sp_dbfixedrolepermission
sp_dbfixedrolepermission_TSQL
dev_langs
TSQL
helpviewer_keywords
sp_dbfixedrolepermission
ms.assetid b8c30191-f532-49cd-83f3-c271f63ce572
caps.latest.revision 31
author BYHAM
ms.author rickbyh
manager jhubbard

sp_dbfixedrolepermission (Transact-SQL)

[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx_md]

Displays the permissions of a fixed database role. sp_dbfixedrolepermission returns correct information in [!INCLUDEssVersion2000]. The output does not reflect the changes to the permissions hierarchy that were implemented in [!INCLUDEssVersion2005]. For more information, seePermissions (Database Engine).

Important

[!INCLUDEssNoteDepFutureAvoid]

Applies to: [!INCLUDEssNoVersion] ([!INCLUDEssKatmai] through current version).

Topic link icon Transact-SQL Syntax Conventions

Syntax

  
sp_dbfixedrolepermission [ [ @rolename = ] 'role' ]  

Arguments

[ @rolename = ] 'role'
Is the name of a valid [!INCLUDEssNoVersion] fixed database role. role is sysname, with a default of NULL. If role is not specified, the permissions for all fixed database roles are displayed.

Return Code Values

0 (success) or 1 (failure)

Result Sets

Column name Data type Description
DbFixedRole sysname Name of the fixed database role
Permission nvarchar(70) Permissions associated with DbFixedRole

Remarks

To display a list of the fixed database roles, execute sp_helpdbfixedrole. The following table shows the fixed database roles.

Fixed database role Description
db_owner Database owners
db_accessadmin Database access administrators
db_securityadmin Database security administrators
db_ddladmin Database data definition language (DDL) administrators
db_backupoperator Database backup operators
db_datareader Database data readers
db_datawriter Database data writers
db_denydatareader Database deny data readers
db_denydatawriter Database deny data writers

Members of the db_owner fixed database role have the permissions of all the other fixed database roles. To display the permissions for fixed server roles, execute sp_srvrolepermission.

The result set includes the [!INCLUDEtsql] statements that can be executed, and other special activities that can be performed, by members of the database role.

Permissions

Requires membership in the public role.

Examples

The following query returns the permissions for all fixed database roles because it does not specify a fixed database role.

EXEC sp_dbfixedrolepermission;  
GO  

See Also

Security Stored Procedures (Transact-SQL)
sp_addrolemember (Transact-SQL)
sp_droprolemember (Transact-SQL)
sp_helpdbfixedrole (Transact-SQL)
sp_srvrolepermission (Transact-SQL)
System Stored Procedures (Transact-SQL)