שתף באמצעות


az sql midb log-replay

SQL Managed Instance database Log Replay service commands.

Commands

Name Description Type Status
az sql midb log-replay complete

Complete Log Replay service on specified database.

Core GA
az sql midb log-replay show

Get status of Log Replay service.

Core GA
az sql midb log-replay start

Start Log Replay service on specified database.

Core GA
az sql midb log-replay stop

Stop Log Replay service.

Core GA
az sql midb log-replay wait

Place the CLI in a waiting state until a condition of the managed database is met.

Core GA

az sql midb log-replay complete

Complete Log Replay service on specified database.

az sql midb log-replay complete [--ids]
                                [--last-backup-name]
                                [--managed-instance]
                                [--name]
                                [--resource-group]
                                [--subscription]

Examples

Complete log replay service.

az sql midb log-replay complete -g mygroup --mi myinstance -n mymanageddb --last-backup-name "backup.bak"

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--last-backup-name --last-bn

The name of the last backup to restore.

--managed-instance --mi

Name of the Azure SQL Managed Instance.

--name -n

The name of the Azure SQL Managed Database.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az sql midb log-replay show

Get status of Log Replay service.

az sql midb log-replay show [--ids]
                            [--managed-instance]
                            [--name]
                            [--resource-group]
                            [--subscription]

Examples

Get status of the ongoing log replay service.

az sql midb log-replay show -g mygroup --mi myinstance -n mymanageddb

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--managed-instance --mi

Name of the Azure SQL Managed Instance.

--name -n

The name of the Azure SQL Managed Database.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az sql midb log-replay start

Start Log Replay service on specified database.

az sql midb log-replay start --ss
                             --storage-uri
                             [--auto-complete]
                             [--ids]
                             [--last-backup-name]
                             [--managed-instance]
                             [--name]
                             [--no-wait]
                             [--resource-group]
                             [--si {ManagedIdentity, SharedAccessSignature}]
                             [--subscription]

Examples

Start Log Replay service with auto complete option.

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"

Start Log Replay service without auto complete option.

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"

Required Parameters

--ss --storage-sas

The authorization Sas token to access storage container where backups are.

--storage-uri --su

The URI of the storage container where backups are.

Optional Parameters

--auto-complete -a

The flag that in usage with last_backup_name automatically completes log replay servise.

Default value: False
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--last-backup-name --last-bn

The name of the last backup to restore.

--managed-instance --mi

Name of the Azure SQL Managed Instance.

--name -n

The name of the Azure SQL Managed Database.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--si --storage-identity

The storage container identity to use.

Accepted values: ManagedIdentity, SharedAccessSignature
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az sql midb log-replay stop

Stop Log Replay service.

az sql midb log-replay stop [--ids]
                            [--managed-instance]
                            [--name]
                            [--no-wait]
                            [--resource-group]
                            [--subscription]
                            [--yes]

Examples

Stop ongoing log replay service by deleting database.

az sql midb log-replay stop -g mygroup --mi myinstance -n mymanageddb

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--managed-instance --mi

Name of the Azure SQL Managed Instance.

--name -n

The name of the Azure SQL Managed Database.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az sql midb log-replay wait

Place the CLI in a waiting state until a condition of the managed database is met.

az sql midb log-replay wait [--created]
                            [--custom]
                            [--deleted]
                            [--exists]
                            [--ids]
                            [--interval]
                            [--managed-instance]
                            [--name]
                            [--resource-group]
                            [--subscription]
                            [--timeout]
                            [--updated]

Examples

Place the CLI in a waiting state until a condition of the managed database is met after starting log replay service.

az sql midb log-replay wait --exists --resource-group mygroup --managed-instance myinstance --name mymanageddb

Place the CLI in a waiting state until a condition of the managed database is met after stopping log replay service.

az sql midb log-replay wait --deleted --resource-group mygroup --managed-instance myinstance --name mymanageddb

Optional Parameters

--created

Wait until created with 'provisioningState' at 'Succeeded'.

Default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

Default value: False
--exists

Wait until the resource exists.

Default value: False
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--interval

Polling interval in seconds.

Default value: 30
--managed-instance --mi

Name of the Azure SQL Managed Instance.

--name -n

The name of the Azure SQL Managed Database.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timeout

Maximum wait in seconds.

Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.