本繁體中文版使用機器翻譯,譯文僅供參考,若與英文版本牴觸,應以英文版本為準。
還原 Microsoft SQL Server 資料庫
貢獻者
建議變更
您可以將 Microsoft SQL Server 資料庫還原至同一部主機。您應該先取得資料庫清單、然後還原資料庫。
檢視資料庫清單
您可以執行此 API 來檢視資料庫清單。
「取得 snapcenter.cloudmanager.cloud.netapp.com/api/mssql/databases'
如需詳細資訊、請參閱: https://snapcenter.cloudmanager.cloud.netapp.com/api-doc/#/MSSQL%20Databases/GetMSSQLDatabasesRequest
回應
如果 API 執行成功、則會顯示回應碼 200 。
範例:
{ "num_records": 3, "total_records": 3, "records": [ { "id": "348901e5-aeaa-419f-88b1-80240de3b1fe", "name": "DB4", "hostname": "scspa2722211001.rtp.openenglab.netapp.com", "size": 0.078125, "instance_id": "454c8413-5351-41fc-88bf-f20fb050ec87", "instance": "scspa2722211001\\NAMEDINSTANCE1", "db_status": "Normal", "db_access": "eUndefined", "db_type": "User", "recovery_mode": "Full" }, { "id": "c79d33ab-7322-4ed6-92f5-51ad7a6944e0", "name": "DB5", "hostname": "scspa2722211001.rtp.openenglab.netapp.com", "size": 0.078125, "instance_id": "454c8413-5351-41fc-88bf-f20fb050ec87", "instance": "scspa2722211001\\NAMEDINSTANCE1", "db_status": "Normal", "db_access": "eUndefined", "db_type": "User", "recovery_mode": "Full" }, { "id": "40d6f35a-f4fb-48bc-8e0a-0ac93ddf0888", "name": "model", "hostname": "scspa2722211001.rtp.openenglab.netapp.com", "size": 0.015625, "instance_id": "454c8413-5351-41fc-88bf-f20fb050ec87", "instance": "scspa2722211001\\NAMEDINSTANCE1", "db_status": "Normal", "db_access": "eUndefined", "db_type": "System", "recovery_mode": "Full" } ], "_links": { "next": {} } }
還原和恢復 MSSQL 資料庫
您可以執行此 API 來還原 MSSQL 資料庫。
' 張貼 snapcenter.cloudmanager.cloud.netapp.com/api/mssql/databases/{id}/restore'
其中、 id 是透過執行檢視資料庫 API 取得的 MSSQL 資料庫 ID 。如需詳細資訊、請參閱 檢視資料庫清單。
此 API 會建立可從 BlueXP UI 的 * 工作監控 * 標籤追蹤的工作。
參數
名稱 | 類型 | 必要 |
---|---|---|
backup_id |
字串 |
是的 |
Overwrite 資料庫 |
布爾 |
是的 |
Retain 複寫設定 |
布爾 |
錯 |
recovery 模式 |
字串 支援的 3 個字串分別是 Operational _ 、 _nonOperational _ 和 _ReadOnly 。 |
是的 |
undo_file_directory |
字串 |
是的 |
還原類型 |
字串 |
是的 |
回應
如果 API 執行成功、則會顯示回應碼 202 。
範例:
{ "job": { "_links": { "self": { "href": "/api/resourcelink" } }, "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } }