Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ Once locked, the immutability policy cannot be removed, there is no way for the

### Example 1
```powershell
Lock-AzSqlDatabaseLongTermRetentionBackupImmutability -Location northeurope -ServerName server01 -DatabaseName testdb2 -BackupName "601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000" -PassThru
Lock-AzSqlDatabaseLongTermRetentionBackupImmutability -Location northeurope -ServerName server01 -DatabaseName testdb2 -BackupName "b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000" -PassThru
```

```output
BackupExpirationTime : 8/5/2025 8:23:33 PM
BackupName : 601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000
BackupName : b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000
BackupTime : 7/29/2025 8:23:33 PM
DatabaseName : testdb2
DatabaseDeletionTime :
Location : northeurope
ResourceId : /subscriptions/b75889fa-6661-44e0-a844-cd96ec938991/resourceGroups/resourcegroup01/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server01/longTermRetentionDatabases/testdb2/longTermRetentionBackups/601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000
ResourceId : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/resourcegroup01/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server01/longTermRetentionDatabases/testdb2/longTermRetentionBackups/b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000
ServerName : server01
ServerCreateTime : 7/29/2025 7:28:46 PM
ResourceGroupName : resourcegroup01
Expand All @@ -65,7 +65,7 @@ TimeBasedImmutabilityMode : Locked
LegalHoldImmutability : Disabled
```

This locks the time-based immutability policy for the backup "601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000".
This locks the time-based immutability policy for the backup "b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000".
Note that a prerequisite to this operation is that the backup has TimeBasedImmutability set to "Enabled" and TimeBasedImmutabilityMode set to "Unlocked".

## PARAMETERS
Expand Down
2 changes: 1 addition & 1 deletion azps-15.4.0/Az.Sql/New-AzSqlInstance.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ AdministratorType : ActiveDirectory
PrincipalType : Group
Login : DummyLogin
Sid : df7667b8-f9fd-4029-a0e3-b43c75ce9538
TenantId : 00001111-aaaa-2222-bbbb-3333cccc4444
TenantId : aaaabbbb-0000-cccc-1111-dddd2222eeee
AzureADOnlyAuthentication : True
```

Expand Down
2 changes: 1 addition & 1 deletion azps-15.4.0/Az.Sql/New-AzSqlServer.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ AdministratorType : ActiveDirectory
PrincipalType : Group
Login : DummyLogin
Sid : df7667b8-f9fd-4029-a0e3-b43c75ce9538
TenantId : 00001111-aaaa-2222-bbbb-3333cccc4444
TenantId : aaaabbbb-0000-cccc-1111-dddd2222eeee
AzureADOnlyAuthentication : True
```

Expand Down
26 changes: 13 additions & 13 deletions azps-15.4.0/Az.Sql/Remove-AzSqlDatabaseLongTermRetentionBackup.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,41 +40,41 @@ The **Remove-AzSqlDatabaseLongTermRetentionBackup** cmdlet deletes the backup sp

### Example 1: Delete a single backup with resource group
```powershell
Remove-AzSqlDatabaseLongTermRetentionBackup -Location northeurope -ServerName server01 -DatabaseName database01 -BackupName "601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000" -ResourceGroupName resourcegroup01
Remove-AzSqlDatabaseLongTermRetentionBackup -Location northeurope -ServerName server01 -DatabaseName database01 -BackupName "b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000" -ResourceGroupName resourcegroup01
```

```output
BackupExpirationTime : 3/22/2018 5:50:55 AM
BackupName : 601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000
BackupName : b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000
BackupTime : 3/15/2018 5:50:55 AM
DatabaseName : database01
DatabaseDeletionTime :
Location : northeurope
ResourceId : /subscriptions/371edd6d-9630-4558-a7bd-ee139498e6a1/resourceGroups/resourcegroup01/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server01/longTermRetentionDatabases/database01/longTermRetentionBackups/601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000
ResourceId : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/resourcegroup01/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server01/longTermRetentionDatabases/database01/longTermRetentionBackups/b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000
ServerName : server01
ServerCreateTime : 2/29/2018 12:12:19 AM
```

Deletes the backup with name 601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000
Deletes the backup with name b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000

### Example 2: Delete a single backup without resource group
```powershell
Remove-AzSqlDatabaseLongTermRetentionBackup -Location northeurope -ServerName server02 -DatabaseName database02 -BackupName "55970792-164c-4a4a-88e5-7158d092d503;131656309980000000"
Remove-AzSqlDatabaseLongTermRetentionBackup -Location northeurope -ServerName server02 -DatabaseName database02 -BackupName "c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3;131656309980000000"
```

```output
BackupExpirationTime : 3/22/2018 11:43:18 PM
BackupName : 55970792-164c-4a4a-88e5-7158d092d503;131656309980000000
BackupName : c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3;131656309980000000
BackupTime : 3/15/2018 11:43:18 PM
DatabaseName : database02
DatabaseDeletionTime : 3/18/2018 4:36:00 PM
Location : northeurope
ResourceId : /subscriptions/371edd6d-9630-4558-a7bd-ee139498e6a1/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server02/longTermRetentionDatabases/database02/longTermRetentionBackups/55970792-164c-4a4a-88e5-7158d092d503;131656309980000000
ResourceId : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server02/longTermRetentionDatabases/database02/longTermRetentionBackups/c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3;131656309980000000
ServerName : server02
ServerCreateTime : 2/28/2018 12:12:19 AM
```

Deletes the backup with name 601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000
Deletes the backup with name b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000

### Example 3: Delete all backups for a location
```powershell
Expand All @@ -83,22 +83,22 @@ Get-AzSqlDatabaseLongTermRetentionBackup -Location northeurope | Remove-AzSqlDat

```output
BackupExpirationTime : 3/22/2018 5:50:55 AM
BackupName : 601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000
BackupName : b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000
BackupTime : 3/15/2018 5:50:55 AM
DatabaseName : database01
DatabaseDeletionTime :
Location : northeurope
ResourceId : /subscriptions/371edd6d-9630-4558-a7bd-ee139498e6a1/resourceGroups/resourcegroup01/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server01/longTermRetentionDatabases/database01/longTermRetentionBackups/601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000
ResourceId : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/resourcegroup01/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server01/longTermRetentionDatabases/database01/longTermRetentionBackups/b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000
ServerName : server01
ServerCreateTime : 2/29/2018 12:12:19 AM

BackupExpirationTime : 3/22/2018 11:43:18 PM
BackupName : 55970792-164c-4a4a-88e5-7158d092d503;131656309980000000
BackupName : c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3;131656309980000000
BackupTime : 3/15/2018 11:43:18 PM
DatabaseName : database02
DatabaseDeletionTime : 3/18/2018 4:36:00 PM
Location : northeurope
ResourceId : /subscriptions/371edd6d-9630-4558-a7bd-ee139498e6a1/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server02/longTermRetentionDatabases/database02/longTermRetentionBackups/55970792-164c-4a4a-88e5-7158d092d503;131656309980000000
ResourceId : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server02/longTermRetentionDatabases/database02/longTermRetentionBackups/c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3;131656309980000000
ServerName : server02
ServerCreateTime : 2/28/2018 12:12:19 AM
```
Expand Down Expand Up @@ -313,4 +313,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

[Set-AzSqlDatabaseBackupLongTermRetentionPolicy](./Set-AzSqlDatabaseBackupLongTermRetentionPolicy.md)

[SQL Database Documentation](https://learn.microsoft.com/azure/sql-database/)
[SQL Database Documentation](https://learn.microsoft.com/azure/sql-database/)
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ Once removed, the backup will be able to be deleted manually. It is not possible

### Example 1: Remove the time-based immutability policy for a single backup.
```powershell
Remove-AzSqlDatabaseLongTermRetentionBackupImmutability -Location northeurope -ServerName server01 -DatabaseName testdb2 -BackupName "601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000" -PassThru
Remove-AzSqlDatabaseLongTermRetentionBackupImmutability -Location northeurope -ServerName server01 -DatabaseName testdb2 -BackupName "b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000" -PassThru
```

```output
BackupExpirationTime : 8/5/2025 8:23:33 PM
BackupName : 601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000
BackupName : b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000
BackupTime : 7/29/2025 8:23:33 PM
DatabaseName : testdb2
DatabaseDeletionTime :
Location : northeurope
ResourceId : /subscriptions/b75889fa-6661-44e0-a844-cd96ec938991/resourceGroups/resourcegroup01/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server01/longTermRetentionDatabases/testdb2/longTermRetentionBackups/601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000
ResourceId : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/resourcegroup01/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server01/longTermRetentionDatabases/testdb2/longTermRetentionBackups/b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000
ServerName : server01
ServerCreateTime : 7/29/2025 7:28:46 PM
ResourceGroupName : resourcegroup01
Expand All @@ -65,7 +65,7 @@ TimeBasedImmutabilityMode : Unlocked
LegalHoldImmutability : Disabled
```

This removes the time-based immutability policy for the backup "601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000".
This removes the time-based immutability policy for the backup "b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000".
Note that a prerequisite to this operation is that the backup has TimeBasedImmutability set to "Enabled" and TimeBasedImmutabilityMode set to "Unlocked".

## PARAMETERS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ The **Remove-AzSqlDatabaseLongTermRetentionBackupLegalHold** removes a legal hol

### Example 1: Remove legal hold for a single backup
```powershell
Remove-AzSqlDatabaseLongTermRetentionBackupLegalHold -Location northeurope -ServerName server01 -DatabaseName testdb -BackupName "601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000" -PassThru:$true
Remove-AzSqlDatabaseLongTermRetentionBackupLegalHold -Location northeurope -ServerName server01 -DatabaseName testdb -BackupName "b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000" -PassThru:$true
```

```output
BackupExpirationTime : 8/5/2025 8:08:27 PM
BackupName : 601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000
BackupName : b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000
BackupTime : 7/29/2025 8:08:27 PM
DatabaseName : testdb
DatabaseDeletionTime :
Location : northeurope
ResourceId : /subscriptions/b75889fa-6661-44e0-a844-cd96ec938991/resourceGroups/resourcegroup01/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server01/longTermRetentionDatabases/testdb/longTermRetentionBackups/601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000
ResourceId : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/resourcegroup01/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server01/longTermRetentionDatabases/testdb/longTermRetentionBackups/b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000
ServerName : server01
ServerCreateTime : 7/29/2025 7:28:46 PM
ResourceGroupName : resourcegroup01
Expand Down
8 changes: 4 additions & 4 deletions azps-15.4.0/Az.Sql/Remove-AzSqlInstanceKeyVaultKey.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ManagedInstanceName : ContosoManagedInstanceName
KeyId : https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901
ManagedInstanceKeyName : contoso_contosokey_01234567890123456789012345678901
CreationDate : 9/1/2018 12:11:49 AM
Thumbprint : 6AB10000F99E1B6A22222F39E3F11CB5DC5A55A1
Thumbprint : AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00
Type : AzureKeyVault
```

Expand All @@ -66,7 +66,7 @@ ManagedInstanceName : ContosoManagedInstanceName
KeyId : https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901
ManagedInstanceKeyName : contoso_contosokey_01234567890123456789012345678901
CreationDate : 9/1/2018 12:11:49 AM
Thumbprint : 6AB10000F99E1B6A22222F39E3F11CB5DC5A55A1
Thumbprint : AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00
Type : AzureKeyVault
```

Expand All @@ -84,7 +84,7 @@ ManagedInstanceName : ContosoManagedInstanceName
KeyId : https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901
ManagedInstanceKeyName : contoso_contosokey_01234567890123456789012345678901
CreationDate : 9/1/2018 12:11:49 AM
Thumbprint : 6AB10000F99E1B6A22222F39E3F11CB5DC5A55A1
Thumbprint : AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00
Type : AzureKeyVault
```

Expand All @@ -102,7 +102,7 @@ ManagedInstanceName : ContosoManagedInstanceName
KeyId : https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901
ManagedInstanceKeyName : contoso_contosokey_01234567890123456789012345678901
CreationDate : 9/1/2018 12:11:49 AM
Thumbprint : 6AB10000F99E1B6A22222F39E3F11CB5DC5A55A1
Thumbprint : AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00
Type : AzureKeyVault
```

Expand Down
2 changes: 1 addition & 1 deletion azps-15.4.0/Az.Sql/Remove-AzSqlServerKeyVaultKey.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ServerName : ContosoServer
ServerKeyName : contoso_contosokey_01234567890123456789012345678901
Type : AzureKeyVault
Uri : https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901
Thumbprint : 1122334455667788990011223344556677889900
Thumbprint : AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00
CreationDate : 1/1/2017 12:00:00 AM
```

Expand Down
4 changes: 2 additions & 2 deletions azps-15.4.0/Az.Sql/Restore-AzSqlInstanceDatabase.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ The second command restores the fetched database, from the specified point-in-ti

### Example 6: Restore a database from LTR backup.
```powershell
Restore-AzSqlInstanceDatabase -FromLongTermRetentionBackup -ResourceId "/subscriptions/f46521f3-5bb0-4eea-a3c2-c2d5987df96b/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/southeastasia/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/test/longTermRetentionManagedInstanceBackups/15be823c-7e2c-49d8-819f-a3fdcad92215;132268250550000000" -TargetInstanceDatabaseName "restoreTarget" -TargetInstanceName "testInstance" -TargetResourceGroupName "testResourceGroup"
Restore-AzSqlInstanceDatabase -FromLongTermRetentionBackup -ResourceId "/subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/southeastasia/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/test/longTermRetentionManagedInstanceBackups/b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;132268250550000000" -TargetInstanceDatabaseName "restoreTarget" -TargetInstanceName "testInstance" -TargetResourceGroupName "testResourceGroup"
```

```output
Expand All @@ -209,7 +209,7 @@ ManagedInstanceName : testInstance
Name : restoreTarget
CreationDate : 3/4/2020 8:12:56 AM
EarliestRestorePoint : 3/4/2020 8:14:29 AM
Id : /subscriptions/f46521f3-5bb0-4eea-a3c2-c2d5987df96b/resourceGroups/testResourceGroup/providers/Microsoft.Sql/managedInstances/testInstance/databases/restoreTarget
Id : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/testResourceGroup/providers/Microsoft.Sql/managedInstances/testInstance/databases/restoreTarget
```

Restores LTR backup with the given resource ID (which can be found by running Get-AzSqlInstanceDatabaseLongTermRetentionBackup).
Expand Down