Skip to content

Latest commit

 

History

History
49 lines (43 loc) · 2.7 KB

sys-database-credentials-transact-sql.md

File metadata and controls

49 lines (43 loc) · 2.7 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs monikerRange
sys.database_credentials (Transact-SQL)
sys.database_credentials (Transact-SQL)
VanMSFT
vanto
02/27/2017
sql
system-objects
reference
sys.database_credentials
sys.database_credentials_TSQL
database_credentials
database_credentials_TSQL
sys.database_credentials catalog view
TSQL
=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current

sys.database_credentials (Transact-SQL)

[!INCLUDE sqlserver2016-asdb-asdbmi-asa]

Returns one row for each database scoped credential in the database.

Important

[!INCLUDEssNoteDepFutureAvoid] Use sys.database_scoped_credentials instead.

Column name Data type Description
credential_id int ID of the database scoped credential. Is unique in the database.
name sysname Name of the database scoped credential. Is unique in the database.
credential_identity nvarchar(4000) Name of the identity to use. This will generally be a Windows user. It does not have to be unique.
create_date datetime Time at which the database scoped credential was created.
modify_date datetime Time at which the database scoped credential was last modified.
target_type nvarchar(100) Type of database scoped credential. Returns NULL for database scoped credentials.
target_id int ID of the object that the database scoped credential is mapped to. Returns 0 for database scoped credentials

Permissions

Requires CONTROL permission on the database.

See Also

Credentials (Database Engine)
CREATE DATABASE SCOPED CREDENTIAL (Transact-SQL)
ALTER DATABASE SCOPED CREDENTIAL (Transact-SQL)
DROP DATABASE SCOPED CREDENTIAL (Transact-SQL)
CREATE CREDENTIAL (Transact-SQL)
sys.credentials (Transact-SQL)