SQL Server – Credential Password vs Secret Difference

credentialssql server

What is the difference between SQL Server secret and password for credentials(both server and db scope)?
For example while reading the BOL I can see specifying a secret. Is this just the same password?

https://docs.microsoft.com/en-us/sql/t-sql/statements/create-credential-transact-sql?view=sql-server-2017

Best Answer

What is the difference between SQL Server secret and password for credentials

A credential has three fields: Name, Identity, and Secret. Depending on what the credential is used for the fields are used differently. For instance if the credential is used to store a Windows identity, the user name goes in Identity, and the password goes in Secret. If it's used to store the access credentials for Azure blob storage, a SAS token is stored in Secret, etc.