Azure SQL Database Managed Instance shows the earliest time when the database can be restored on Azure portal. Is there a way to find it programmatically using PowerShell or Azure CLI?
Asked
Active
Viewed 955 times
1 Answers
0
Earliest restore date can be programmatically retrieved using Get-AzureRmSqlInstanceDatabase PowerShell command using the following code:
Get-AzureRmSqlInstanceDatabase -InstanceName "jovanpop-test-instance" -ResourceGroupName "my_rg" |
Select-Object Name, CreationDate, EarliestRestorePoint
Name CreationDate EarliestRestorePoint
---- ------------ --------------------
ValidationDB 1/22/2019 11:00:42 AM 1/22/2019 11:02:35 AM
WideWorldImportersDWFull 7/4/2018 7:55:59 AM 1/15/2019 11:31:00 AM
tpcc1000 8/27/2018 2:37:23 PM 1/15/2019 11:31:00 AM
WideWorldImportersStandard 7/4/2018 8:00:14 AM 1/15/2019 11:31:00 AM
If you are initiating point-in-time restore, these dates are the boundary values that you can use.

Jovan MSFT
- 13,232
- 4
- 40
- 55