Applies To: SQL Server 2014, SQL Server 2016 Preview
Returns a table of 0, one or more rows of the available backup files for the specified database. The backup files returned are backups created by SQL Server Managed Backup to Windows Azure.
Applies to: SQL Server (SQL Server 2016 Community Technology Preview 2 (CTP2) through current version).
The name of the database. The @database_name is NVARCHAR(512).
The table has a unique clustered constraint on (database_guid, backup_start_date, and first_lsn, backup_type).
If a database is dropped and then recreated, the backup sets for all the databases are returned. The output is ordered by the database_guid, which uniquely identified each database.
If there are gaps in LSN meaning that there is a break in the log chain, the table will contain a special row for each missing LSN segment.
NVARCHAR(260) COLLATE Latin1_General_CI_AS_KS_WS
The URL of the backup file.
‘DB’ for database backup ‘LOG’ for log backup
The date on which this file is expected to be deleted. This is set based on the ability to recover the database to a point in time within the specified retention period.
The GUID value for the specified database. The GUID uniquely identifies a database.
Log sequence number of the first or oldest log record in the backup set. Can be NULL.
Log sequence number of the next log record after the backup set. Can be NULL.
Date and time the backup operation started.
Date and time the backup operation finished.
Name of the computer where the SQL Server instance is installed and running SQL Server Managed Backup to Windows Azure.
Identification number for the ending recovery fork.
ID of the starting recovery fork. For data backups, first_recovery_fork_guid equals last_recovery_fork_guid.
If first_recovery_fork_id is not equal to last_recovery_fork_id, this is the log sequence number of the fork point. Otherwise, this value is NULL.
If a database is an AlwaysOn database, this is the GUID of the availability group. Otherwise this value is NULL.
0 (success) or 1 (failure).
The following example lists all the available backups backed up through SQL Server Managed Backup to Windows Azure for the database ‘MyDB’
SELECT * FROM managed_backup.fn_available_backups ('MyDB')