From e49524f2e5e4d611314b0641ddf4fedc2fe3425f Mon Sep 17 00:00:00 2001 From: RakeshMohan-MSFT <49954584+RakeshMohanMSFT@users.noreply.github.com> Date: Fri, 25 Nov 2022 10:23:46 +0530 Subject: [PATCH 1/2] {SQL} Fix #11023: Fix incorrect input type object reference Fixes https://github.com/Azure/azure-powershell/issues/11023 --- src/Sql/Sql/help/Restore-AzSqlInstanceDatabase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sql/Sql/help/Restore-AzSqlInstanceDatabase.md b/src/Sql/Sql/help/Restore-AzSqlInstanceDatabase.md index 6316e2dd92ac..e7f42dfe1a1b 100644 --- a/src/Sql/Sql/help/Restore-AzSqlInstanceDatabase.md +++ b/src/Sql/Sql/help/Restore-AzSqlInstanceDatabase.md @@ -485,7 +485,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.Commands.Sql.ManagedDatabase.Model.AzureSqlManagedDatabaseModel +### Microsoft.Azure.Commands.Sql.ManagedDatabase.Model.AzureSqlManagedDatabaseBaseModel ### Microsoft.Azure.Commands.Sql.ManagedDatabase.Model.AzureSqlRecoverableManagedDatabaseModel From fe5218f2dfa2137c8eeabff81c910d1bdc6eee61 Mon Sep 17 00:00:00 2001 From: RakeshMohan-MSFT <49954584+RakeshMohanMSFT@users.noreply.github.com> Date: Fri, 25 Nov 2022 12:46:46 +0530 Subject: [PATCH 2/2] Update Restore-AzSqlInstanceDatabase.md --- src/Sql/Sql/help/Restore-AzSqlInstanceDatabase.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Sql/Sql/help/Restore-AzSqlInstanceDatabase.md b/src/Sql/Sql/help/Restore-AzSqlInstanceDatabase.md index e7f42dfe1a1b..db1322c38576 100644 --- a/src/Sql/Sql/help/Restore-AzSqlInstanceDatabase.md +++ b/src/Sql/Sql/help/Restore-AzSqlInstanceDatabase.md @@ -109,7 +109,7 @@ The restored database is created as a new instance database. ### Example 1: Restore an instance database from a point in time ```powershell -Restore-AzSqlinstanceDatabase -Name "Database01" -InstanceName "managedInstance1" -ResourceGroupName "ResourceGroup01" -PointInTime UTCDateTime -TargetInstanceDatabaseName "Database01_restored" +Restore-AzSqlInstanceDatabase -Name "Database01" -InstanceName "managedInstance1" -ResourceGroupName "ResourceGroup01" -PointInTime UTCDateTime -TargetInstanceDatabaseName "Database01_restored" ``` The command restores the instance database Database01 from the specified point-in-time backup to the instance database named Database01_restored. @@ -133,7 +133,7 @@ The second command restores the backup in $GeoBackup to the instance database na ### Example 4: Restore a deleted instance database from a point in time ```powershell $deletedDatabase = Get-AzSqlDeletedInstanceDatabaseBackup -ResourceGroupName "ResourceGroup01" -InstanceName "managedInstance1" -DatabaseName "DB1" -Restore-AzSqlinstanceDatabase -FromPointInTimeBackup -Name $deletedDatabase.Name -InstanceName $deletedDatabase.ManagedInstanceName -ResourceGroupName $deletedDatabase.ResourceGroupName -DeletionDate $deletedDatabase.DeletionDate -PointInTime UTCDateTime -TargetInstanceDatabaseName "Database01_restored" +Restore-AzSqlInstanceDatabase -FromPointInTimeBackup -Name $deletedDatabase.Name -InstanceName $deletedDatabase.ManagedInstanceName -ResourceGroupName $deletedDatabase.ResourceGroupName -DeletionDate $deletedDatabase.DeletionDate -PointInTime UTCDateTime -TargetInstanceDatabaseName "Database01_restored" ``` The first command gets the deleted instance databases named 'DB1' on Instance 'managedInstance1'. @@ -142,7 +142,7 @@ The second command restores the the fetched database, from the specified point-i ### Example 5: Restore a deleted instance database from a point in time ```powershell $deletedDatabase = Get-AzSqlDeletedInstanceDatabaseBackup -ResourceGroupName "ResourceGroup01" -InstanceName "managedInstance1" -DatabaseName "DB1" -Restore-AzSqlinstanceDatabase -FromPointInTimeBackup -InputObject $deletedDatabase[0] -PointInTime UTCDateTime -TargetInstanceDatabaseName "Database01_restored" +Restore-AzSqlInstanceDatabase -FromPointInTimeBackup -InputObject $deletedDatabase[0] -PointInTime UTCDateTime -TargetInstanceDatabaseName "Database01_restored" ``` The first command gets the deleted instance databases named 'DB1' on Instance 'managedInstance1'.