关于azure:如何更换Azure-SQL-DB-blob-storage-credentials

47次阅读

共计 583 个字符,预计需要花费 2 分钟才能阅读完成。

通过 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);

正文完
 0