如何更换Azure SQL DB blob storage credentials

BetaRabbit
English

通过Azure Data Studio等工具登录到目标DB,执行以下SQL删除当前的credentials。

DROP EXTERNAL DATA SOURCE BlobStorageDataSource;

DROP DATABASE SCOPED CREDENTIAL BlobAccessCredential;

执行以下SQL创建一个新的credentials(将Placeholder替换为真实环境的值)。

  • PLACEHOLDER_BLOB_SHARED_ACCESS_SIGNATURE: storage SAS token
  • PLACEHOLDER_BLOB_NAME: storage name
CREATE DATABASE SCOPED CREDENTIAL BlobAccessCredential
WITH IDENTITY = 'SHARED ACCESS SIGNATURE',
SECRET = 'PLACEHOLDER_BLOB_SHARED_ACCESS_SIGNATURE';
 
CREATE EXTERNAL DATA SOURCE BlobStorageDataSource
WITH (TYPE = BLOB_STORAGE,
    LOCATION = 'https://PLACEHOLDER_BLOB_NAME.blob.core.windows.net',
    CREDENTIAL= BlobAccessCredential);
阅读 629

笨兔子
记录些随想、问题解决方法和平时学习的总结

全栈,猫奴

1.4k 声望
22 粉丝
0 条评论

全栈,猫奴

1.4k 声望
22 粉丝
文章目录
宣传栏