Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server 2016 (13.x) and later versions
Azure SQL Database
Azure SQL Managed Instance
Azure Synapse Analytics
SQL database in Microsoft Fabric
Returns one row for each database scoped credential in the database.
Important
This feature will be removed in a future version of SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. 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 |
Requires CONTROL
permission on the database.
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)
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register today