简体   繁体   English

如何将.bak文件从azure存储账户恢复到SQL Server 2012

[英]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.

相关问题 如何读取Azure数据工厂中的.BAK文件? - How to read an .BAK file in Azure data factory? 如何从Azure数据湖(存储账户)中读取R中的一个数据文件 - How to read a data file in R from Azure data lake (storage account) 从存储帐户(Azure Data lake)读取 pdf 文件,无需使用 python 下载 - Read pdf file from storage account (Azure Data lake) without downloading it using python 如何从公共 azure 私人存储帐户连接到 azure static web 应用程序 - How to connect to a azure private storage account from a public azure static web app 如何使用 Azure CLI 从特定的 Azure 存储帐户获取所有容器? - How to Get All the Containers From a Specific Azure Storage Account using Azure CLI? 访问SQL服务器中的Azure表存储 - Access Azure Table Storage in SQL Server SendGrid:如何从 Azure blob 存储附加文件? - SendGrid: How to attach a file from Azure blob storage? 从 Azure Devops Hosted Agents 访问私有存储帐户 - Accessing a private storage account from Azure Devops Hosted Agents 从 PowerShell 创建 Azure 存储帐户时出现错误 - Creating Azure Storage account from PowerShell giving error 如何将 Azure 存储帐户内容(表、队列、blob)复制到其他存储帐户 - How to copy Azure storage account contents (tables, queues, blobs) to other storage account
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM