[英]How to restore .bak file from azure storage account to SQL Server 2012
I have a.bak file in azure storage account, and I want to restore that.bak file directly on a SQL Server 2012. What are the solution to restore.bak file from azure storage account to SQL SERVER 2012 directly.我在azure存储账户中有一个.bak文件,我想直接在SQL Server 2012上恢复那个.bak文件。将.bak文件从azure存储账户直接恢复到SQL SERVER 2012的解决方案是什么。
You need to create the CREDENTIAL either with account key or SAS token by using below command:您需要使用以下命令使用帐户密钥或 SAS 令牌创建 CREDENTIAL:
Using the URL and the access key使用 URL 和访问密钥
CREATE CREDENTIAL [Credential_BLOB]
WITH IDENTITY= 'storage account url',
SECRET = 'storage account key';
Using the Shared Access Signature (SAS)使用共享访问签名 (SAS)
CREATE CREDENTIAL [Credential_Name_SAS]
WITH IDENTITY = 'SHARED ACCESS SIGNATURE',
SECRET = 'SASToken';
Now, you can restore the backup from the bak file stored in Azure Blob Storage using below command:现在,您可以使用以下命令从存储在 Azure Blob 存储中的 bak 文件恢复备份:
RESTORE DATABASE Database_Name FROM URL = 'https://StorageAccountName.blob.core.windows.net/ContainerName/SampleDatabase.bak'
WITH CREDENTIAL = 'Credential_BLOB'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.