Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft Edge More info about Internet Explorer and Microsoft Edge
Read in English
Read in English Edit

Share via

Facebook x.com LinkedIn Email

Security Functions (Transact-SQL)

  • Article
  • 02/28/2023

In this article

Applies to: SQL Server Azure SQL Managed Instance

The following functions return information that is useful in managing security. Additional functions are listed under Cryptographic Functions (Transact-SQL).

CERTENCODED (Transact-SQL)

PWDCOMPARE (Transact-SQL)

CERTPRIVATEKEY (Transact-SQL)

PWDENCRYPT (Transact-SQL)

CURRENT_USER (Transact-SQL)

SCHEMA_ID (Transact-SQL)

DATABASE_PRINCIPAL_ID (Transact-SQL)

SCHEMA_NAME (Transact-SQL)

sys.fn_builtin_permissions (Transact-SQL)

SESSION_USER (Transact-SQL)

sys.fn_get_audit_file (Transact-SQL)

SUSER_ID (Transact-SQL)

sys.fn_my_permissions (Transact-SQL)

SUSER_SID (Transact-SQL)

HAS_PERMS_BY_NAME (Transact-SQL)

SUSER_SNAME (Transact-SQL)

IS_MEMBER (Transact-SQL)

SYSTEM_USER (Transact-SQL)

IS_ROLEMEMBER (Transact-SQL)

SUSER_NAME (Transact-SQL)

IS_SRVROLEMEMBER (Transact-SQL)

USER_ID (Transact-SQL)

LOGINPROPERTY (Transact-SQL)

USER_NAME (Transact-SQL)

ORIGINAL_LOGIN (Transact-SQL)

PERMISSIONS (Transact-SQL)

 

For information about membership in Windows groups, see xp_logininfo (Transact-SQL) and xp_enumgroups (Transact-SQL).

See Also

Security Stored Procedures (Transact-SQL)
Cryptographic Functions (Transact-SQL)
Built-in Functions (Transact-SQL)
Security Statements


Feedback

Was this page helpful?

Provide product feedback |
Get help at Microsoft Q&A;

Additional resources

California Consumer Privacy Act (CCPA) Opt-Out Icon Your Privacy Choices
  • Previous Versions
  • Blog
  • Contribute
  • Privacy
  • Terms of Use
  • Trademarks
  • © Microsoft 2024

Additional resources

In this article

California Consumer Privacy Act (CCPA) Opt-Out Icon Your Privacy Choices
  • Previous Versions
  • Blog
  • Contribute
  • Privacy
  • Terms of Use
  • Trademarks
  • © Microsoft 2024