问题
If user is owner of the resource group and SQL server instance in it, he/she can configure LTR polices. However, when trying to list them in Available backups tab... nothing is there. Same applies to the DB restore when Long-term backup retention is selected. Is anyone aware of some role or resource access that could resolve this?
p.s. Vault is not used any more.
[RESOLUTION] 'SQL Server contributor' role on the subscription level resolves it. Anyway, thanks everyone.
回答1:
As a workaround, you can try using PowerShell to list the LTR backups within a server:
# Get the list of all LTR backups in a specific Azure region
# The backups are grouped by the logical database id.
# Within each group they are ordered by the timestamp, the earliest
# backup first.
$ltrBackups = Get-AzureRmSqlDatabaseLongTermRetentionBackup -LocationName $server.Location
# Get the list of LTR backups from the Azure region under
# the named server.
$ltrBackups = Get-AzureRmSqlDatabaseLongTermRetentionBackup -LocationName $server.Location -ServerName $serverName
# Get the LTR backups for a specific database from the Azure region under the named server
$ltrBackups = Get-AzureRmSqlDatabaseLongTermRetentionBackup -LocationName $server.Location -ServerName $serverName -DatabaseName $dbName
# List LTR backups only from live databases (you have option to choose All/Live/Deleted)
$ltrBackups = Get-AzureRmSqlDatabaseLongTermRetentionBackup -LocationName $server.Location -DatabaseState Live
# Only list the latest LTR backup for each database
$ltrBackups = Get-AzureRmSqlDatabaseLongTermRetentionBackup -LocationName $server.Location -ServerName $serverName -OnlyLatestPerDatabase
Make sure you have configured LTR backups correctly as explained here.
来源:https://stackoverflow.com/questions/51071129/long-term-backup-retention-list-is-not-available