
SQL Database uses database scoped credentials for elastic pools. SQL Database uses database scoped credentials to write extended event files to Azure Blob Storage. This is the ability to query across multiple database shards. SQL Database uses database scoped credentials for its global query feature. For more information about Azure Synapse storage authentication, see Use external tables with Synapse SQL. To learn more, see CREATE EXTERNAL DATA SOURCE (Transact-SQL). To learn more, see CREATE EXTERNAL DATA SOURCE (Transact-SQL).Īzure Synapse Analytics uses a database scoped credential to access non-public Azure Blob Storage with PolyBase. SQL Server uses a database scoped credential to access non-public Azure Blob Storage or Kerberos-secured Hadoop clusters with PolyBase. Here are some applications of database scoped credentials: Information about database scoped credentials is visible in the sys.database_scoped_credentials catalog view. If not granted, you may receive error 16535 or 16561 when attempting to access the external table. When granting permissions for a shared access signatures (SAS) for use with a PolyBase external table, select both Container and Object as allowed resource types. If the service master key is regenerated, the secret is re-encrypted using the new service master key. The secret is encrypted using the service master key.
Create master key system windows#
When IDENTITY is a Windows user, the secret can be the password. For more information, see CREATE MASTER KEY (Transact-SQL). Most credentials include a Windows user and password.īefore creating a database scoped credential, the database must have a master key to protect the credential. RemarksĪ database scoped credential is a record that contains the authentication information that is required to connect to a resource outside SQL Server. When you use the SAS key, you must remove the leading '?'. The SAS key value might begin with a '?' (question mark).


To load from Azure Blob storage into Azure Synapse Analytics or Parallel Data Warehouse, the Secret must be the Azure Storage Key. SECRET is required to import a file from Azure Blob storage. Specifies the secret required for outgoing authentication.

WITH IDENTITY is not required if the container in Azure Blob storage is enabled for anonymous access.In a SQL Server instance, if creating a database scoped credential with a Storage Access Key used as the SECRET, IDENTITY is ignored.When using Kerberos (Windows Active Directory or MIT KDC) do not use the domain name in the IDENTITY argument.To import a file from Azure Blob Storage using a managed identity, the identity name must be MANAGED IDENTITY.Only use IDENTITY = SHARED ACCESS SIGNATURE for a shared access signature. For more information about shared access signatures, see Using Shared Access Signatures (SAS). To import a file from Azure Blob Storage or Azure Data Lake Storage using a shared key, the identity name must be SHARED ACCESS SIGNATURE.Specifies the name of the account to be used when connecting outside the server.

credential_name cannot start with the number (#) sign. Specifies the name of the database scoped credential being created. To view Transact-SQL syntax for SQL Server 2014 and earlier, see Previous versions documentation.
