Share via


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 --last-bn]
                                [--managed-instance --mi]
                                [--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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--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.

Property Value
Parameter group: 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.

Property Value
Parameter group: Resource Id Arguments
--name -n

The name of the Azure SQL Managed Database.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False

az sql midb log-replay show

Get status of Log Replay service.

az sql midb log-replay show [--ids]
                            [--managed-instance --mi]
                            [--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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--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.

Property Value
Parameter group: Resource Id Arguments
--managed-instance --mi

Name of the Azure SQL Managed Instance.

Property Value
Parameter group: Resource Id Arguments
--name -n

The name of the Azure SQL Managed Database.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False

az sql midb log-replay start

Start Log Replay service on specified database.

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]

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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--auto-complete -a

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

Property Value
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.

Property Value
Parameter group: 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.

Property Value
Parameter group: Resource Id Arguments
--name -n

The name of the Azure SQL Managed Database.

Property Value
Parameter group: Resource Id Arguments
--no-wait

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

Property Value
Default value: False
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--si --storage-identity

The storage container identity to use.

Property Value
Accepted values: ManagedIdentity, SharedAccessSignature
--subscription

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

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False

az sql midb log-replay stop

Stop Log Replay service.

az sql midb log-replay stop [--ids]
                            [--managed-instance --mi]
                            [--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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--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.

Property Value
Parameter group: Resource Id Arguments
--managed-instance --mi

Name of the Azure SQL Managed Instance.

Property Value
Parameter group: Resource Id Arguments
--name -n

The name of the Azure SQL Managed Database.

Property Value
Parameter group: Resource Id Arguments
--no-wait

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

Property Value
Default value: False
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False

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 --mi]
                            [--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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--created

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

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--custom

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

Property Value
Parameter group: Wait Condition Arguments
--deleted

Wait until deleted.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--exists

Wait until the resource exists.

Property Value
Parameter group: Wait Condition Arguments
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.

Property Value
Parameter group: Resource Id Arguments
--interval

Polling interval in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 30
--managed-instance --mi

Name of the Azure SQL Managed Instance.

Property Value
Parameter group: Resource Id Arguments
--name -n

The name of the Azure SQL Managed Database.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--timeout

Maximum wait in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False