Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 7511181

Browse files
authored
add mention of sysadmin role
1 parent 0ed25de commit 7511181

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

docs/t-sql/functions/is-rolemember-transact-sql.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "IS_ROLEMEMBER (Transact-SQL)"
44
author: VanMSFT
55
ms.author: vanto
66
ms.reviewer: ""
7-
ms.date: 10/05/2021
7+
ms.date: 06/06/2022
88
ms.prod: sql
99
ms.prod_service: "database-engine, sql-database, synapse-analytics, pdw"
1010
ms.technology: t-sql
@@ -76,6 +76,8 @@ The **IS_ROLEMEMBER** function is not supported for an Azure AD administrator wh
7676
The User Account Control (UAC) found in [!INCLUDE[wiprlhext](../../includes/wiprlhext-md.md)] and Windows Server 2008 might also return different results. This would depend on whether the user accessed the server as a Windows group member or as a specific [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] user.
7777

7878
This function evaluates role membership, not the underlying permission. For example, the **db_owner** fixed database role has the **CONTROL DATABASE** permission. If the user has the **CONTROL DATABASE** permission but is not a member of the role, this function will correctly report that the user is not a member of the **db_owner** role, even though the user has the same permissions.
79+
80+
Members of the **sysadmin** fixed server role enter every database as the **dbo** user. Checking permission for member of the **sysadmin** fixed server role, checks permissions for **dbo**, not the original login. Since **dbo** can't be added to a database role and doesn't exist in Windows groups, **dbo** will always return 0 (or NULL if the role doesn't exist).
7981

8082
## Related Functions
8183
To determine whether the current user is a member of the specified Windows group or [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] database role, use [IS_MEMBER (Transact-SQL)](../../t-sql/functions/is-member-transact-sql.md). To determine whether a [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] login is a member of a server role, use [IS_SRVROLEMEMBER (Transact-SQL)](../../t-sql/functions/is-srvrolemember-transact-sql.md).

0 commit comments

Comments
 (0)