Skip to main content Skip to Ask Learn chat experience

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

Note

Access to this page requires authorization. You can try signing in or changing directories.

Access to this page requires authorization. You can try changing directories.

In this article

Security Functions (Transact-SQL)

The following functions return information that is useful in managing security.

CURRENT_USER (Transact-SQL)

SCHEMA_NAME (Transact-SQL)

sys.fn_builtin_permissions (Transact-SQL)

SESSION_USER (Transact-SQL)

fn_my_permissions (Transact-SQL)

SETUSER (Transact-SQL)

HAS_PERMS_BY_NAME (Transact-SQL)

SUSER_ID (Transact-SQL)

IS_MEMBER (Transact-SQL)

SUSER_SID (Transact-SQL)

IS_SRVROLEMEMBER (Transact-SQL)

SUSER_SNAME (Transact-SQL)

ORIGINAL_LOGIN (Transact-SQL)

SYSTEM_USER (Transact-SQL)

PERMISSIONS (Transact-SQL)

SUSER_NAME (Transact-SQL)

PWDCOMPARE (Transact-SQL)

USER_ID (Transact-SQL)

PWDENCRYPT (Transact-SQL)

USER_NAME (Transact-SQL)

SCHEMA_ID (Transact-SQL)

See Also

Reference

Security Stored Procedures (Transact-SQL)

Cryptographic Functions (Transact-SQL)

Functions (Transact-SQL)

Change History

Updated content

Added ORIGINAL_LOGIN.

Added PWDCOMPARE and PWDENCRYPT.


Additional resources


  • Last updated on 2010-10-01

In this article

en-us
Your Privacy Choices
  • AI Disclaimer
  • Previous Versions
  • Blog
  • Contribute
  • Privacy
  • Consumer Health Privacy
  • Terms of Use
  • Trademarks
  • © Microsoft 2026