第 3 课:将完整数据库备份写入到 Azure Blob 存储服务
本课演示如何使用 tsql 语句执行到 Azure Blob 存储服务的完整数据库备份。
对Azure Blob 存储服务执行完整数据库备份
若要创建完整数据库备份,请使用以下步骤:
连接到 SQL Server Management Studio。
在对象资源管理器中,连接到 SQL Server 2014 实例。
在标准菜单栏上,单击 “新建查询”。
将以下示例复制并粘贴到查询窗口中,根据需要进行修改,然后单击 “执行”。
BACKUP DATABASE[AdventureWorks2012] TO URL = 'https://mystorageaccount.blob.core.windows.net/privatecontainertest/AdventureWorks2012.bak' /* URL includes the endpoint for the BLOB service, followed by the container name, and the name of the backup file*/ WITH CREDENTIAL = 'mycredential'; /* name of the credential you created in the previous step */ GO
在对象资源管理器中,连接到 Azure 存储。 通过浏览找到容器和新创建的备份文件。