Skip to content

Latest commit

 

History

History
102 lines (81 loc) · 4.44 KB

File metadata and controls

102 lines (81 loc) · 4.44 KB
title sp_helpdbfixedrole (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_helpdbfixedrole
sp_helpdbfixedrole_TSQL
dev_langs
TSQL
helpviewer_keywords
sp_helpdbfixedrole
ms.assetid ad87e9a0-b901-4e37-9950-aa517d680fc3
caps.latest.revision 24
author BYHAM
ms.author rickbyh
manager jhubbard

sp_helpdbfixedrole (Transact-SQL)

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

Returns a list of the fixed database roles.

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

Topic link icon Transact-SQL Syntax Conventions

Syntax

  
sp_helpdbfixedrole [ [ @rolename = ] 'role' ]   

Arguments

[ @rolename = ] 'role'
Is the name of a fixed database role. role is sysname, with a default of NULL. If role is specified, only information about that role is returned; otherwise, a list and description of all fixed database roles is returned.

Return Code Values

0 (success) or 1 (failure)

Result Sets

Column name Data type Description
DbFixedRole sysname Name of the fixed database role.
Description nvarchar(70) Description of DbFixedRole.

Remarks

Fixed database roles, as shown in the following table, are defined at the database level and have permissions to perform specific database-level administrative activities. Fixed database roles cannot be added or removed. The permissions granted to a fixed database role cannot be changed.

Fixed database role Description
db_owner Database owners
db_accessadmin Database access administrators
db_securityadmin Database security administrators
db_ddladmin Database 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

The following table shows stored procedures that are used for modifying database roles.

Stored procedure Action
sp_addrolemember Adds a database user to a fixed database role.
sp_helprole Displays a list of the members of a fixed database role.
sp_droprolemember Removes a member from a fixed database role.

Permissions

Requires membership in the public role.

Information returned is subject to restrictions on access to metadata. Entities on which the principal has no permission do not appear. For more information, see Metadata Visibility Configuration.

Examples

The following example shows a list of all fixed database roles.

EXEC sp_helpdbfixedrole;  
GO  

See Also

Security Stored Procedures (Transact-SQL)
sp_addrolemember (Transact-SQL)
sp_dbfixedrolepermission (Transact-SQL)
sp_droprolemember (Transact-SQL)
sp_helprole (Transact-SQL)
sp_helprolemember (Transact-SQL)
System Stored Procedures (Transact-SQL)