第 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 儲存體。 瀏覽並尋找容器以及新建立的備份檔案。