az sql midb log-replay
SQL 托管实例数据库日志重播服务命令。
命令
| 名称 | 说明 | 类型 | Status |
|---|---|---|---|
| az sql midb log-replay complete |
在指定的数据库上完成 Log Replay 服务。 |
Core | GA |
| az sql midb log-replay show |
获取 Log Replay 服务的状态。 |
Core | GA |
| az sql midb log-replay start |
在指定的数据库上启动 Log Replay 服务。 |
Core | GA |
| az sql midb log-replay stop |
停止日志重播服务。 |
Core | GA |
| az sql midb log-replay wait |
将 CLI 置于等待状态,直到满足托管数据库的条件。 |
Core | GA |
az sql midb log-replay complete
在指定的数据库上完成 Log Replay 服务。
az sql midb log-replay complete [--ids]
[--last-backup-name --last-bn]
[--managed-instance --mi]
[--name]
[--resource-group]
[--subscription]
示例
完成日志重播服务。
az sql midb log-replay complete -g mygroup --mi myinstance -n mymanageddb --last-backup-name "backup.bak"
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
要还原的最后一个备份的名称。
Azure SQL 托管实例的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Azure SQL 托管数据库的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az sql midb log-replay show
获取 Log Replay 服务的状态。
az sql midb log-replay show [--ids]
[--managed-instance --mi]
[--name]
[--resource-group]
[--subscription]
示例
获取正在进行的日志重播服务的状态。
az sql midb log-replay show -g mygroup --mi myinstance -n mymanageddb
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Azure SQL 托管实例的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Azure SQL 托管数据库的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az sql midb log-replay start
在指定的数据库上启动 Log Replay 服务。
az sql midb log-replay start --ss --storage-sas
--storage-uri --su
[--auto-complete]
[--ids]
[--last-backup-name --last-bn]
[--managed-instance --mi]
[--name]
[--no-wait]
[--resource-group]
[--si --storage-identity {ManagedIdentity, SharedAccessSignature}]
[--subscription]
示例
使用自动完成选项启动 Log Replay 服务。
az sql midb log-replay start -g mygroup --mi myinstance -n mymanageddb -a --last-bn "backup.bak" --storage-uri "https://test.blob.core.windows.net/testing" --storage-sas "sv=2019-02-02&ss=b&srt=sco&sp=rl&se=2023-12-02T00:09:14Z&st=2019-11-25T16:09:14Z&spr=https&sig=92kAe4QYmXaht%2Fgjocqwerqwer41s%3D"
在没有自动完成选项的情况下启动 Log Replay 服务。
az sql midb log-replay start -g mygroup --mi myinstance -n mymanageddb --storage-uri "https://test.blob.core.windows.net/testing" --storage-sas "sv=2019-02-02&ss=b&srt=sco&sp=rl&se=2023-12-02T00:09:14Z&st=2019-11-25T16:09:14Z&spr=https&sig=92kAe4QYmXaht%2Fgjocqwerqwer41s%3D"
必需参数
用于访问备份所在的存储容器的授权 Sas 令牌。
备份所在的存储容器的 URI。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
last_backup_name使用的标志会自动完成日志重播保留。
| 属性 | 值 |
|---|---|
| 默认值: | False |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
要还原的最后一个备份的名称。
Azure SQL 托管实例的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Azure SQL 托管数据库的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 默认值: | False |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
要使用的存储容器标识。
| 属性 | 值 |
|---|---|
| 接受的值: | ManagedIdentity, SharedAccessSignature |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az sql midb log-replay stop
停止日志重播服务。
az sql midb log-replay stop [--ids]
[--managed-instance --mi]
[--name]
[--no-wait]
[--resource-group]
[--subscription]
[--yes]
示例
通过删除数据库停止正在进行的日志重播服务。
az sql midb log-replay stop -g mygroup --mi myinstance -n mymanageddb
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Azure SQL 托管实例的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Azure SQL 托管数据库的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 默认值: | False |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
不要提示确认。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az sql midb log-replay wait
将 CLI 置于等待状态,直到满足托管数据库的条件。
az sql midb log-replay wait [--created]
[--custom]
[--deleted]
[--exists]
[--ids]
[--interval]
[--managed-instance --mi]
[--name]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
示例
将 CLI 置于等待状态,直到启动日志重播服务后满足托管数据库的条件。
az sql midb log-replay wait --exists --resource-group mygroup --managed-instance myinstance --name mymanageddb
将 CLI 置于等待状态,直到停止日志重播服务后满足托管数据库的条件。
az sql midb log-replay wait --deleted --resource-group mygroup --managed-instance myinstance --name mymanageddb
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
等待在“Succeeded”中使用“provisioningState”创建。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | False |
等待条件满足自定义 JMESPath 查询。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
等到删除为止。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | False |
等待资源存在。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | False |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
轮询间隔(以秒为单位)。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | 30 |
Azure SQL 托管实例的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Azure SQL 托管数据库的名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
最大等待(以秒为单位)。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | 3600 |
等到 provisioningState 更新为“Succeeded”。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |