Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit cd95287

Browse files
committed
Merge branch '20220222-add-documentation-for-database-backups' of https://github.com/SudhirRaparla/sql-docs-pr-sraparla-edits into 20220222-add-documentation-for-database-backups
2 parents b7ed6a5 + a45d376 commit cd95287

1 file changed

Lines changed: 17 additions & 8 deletions

File tree

docs/relational-databases/system-dynamic-management-views/sys-dm-database-backups-azure-sql-database.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,25 @@ monikerRange: "= azuresqldb-current"
3434
|Column Name|Data Type|Description|
3535
|-----------------|---------------|-----------------|
3636
|backup_file_id|**uniqueidentifier**|ID of the generated backup file. Not null|
37-
|database_guid|**sql_variant**|Logical Database ID of the [!INCLUDE[ssSDSfull](../../includes/sssdsfull-md.md)] on which the operation is performed. Not Null.|
38-
|physical_database_name|**sql_variant**|Name of the Physical [!INCLUDE[ssSDSfull](../../includes/sssdsfull-md.md)] on which the operation is performed.|
39-
|server_name|**sql_variant**|Name of the Physical server on which the [!INCLUDE[ssSDSfull](../../includes/sssdsfull-md.md)] which is being backed up is present. Not Null.|
40-
|backup_start_date|**datetime**|Timestamp when the Backup operation started|
41-
|backup_finish_date|**datetime**|Timestamp when the Backup operation finished|
42-
|backup_type|**nvarchar(60)**|Type of Backup<br /><br /> D = Full Database Backup<br />I = Incremental Backup<br />L = Log Backup|
43-
|in_retention|**tinyint**|Backup Retention Status. Tells whether backup is within retention period<br /><br />1 = In Retention <br />0 = Out of Retention|
37+
|database_guid|**uniqueidentifier**|Logical Database ID of the [!INCLUDE[ssSDSfull](../../includes/sssdsfull-md.md)] on which the operation is performed. Not Null.|
38+
|physical_database_name|**nvarchar(128)**|Name of the Physical [!INCLUDE[ssSDSfull](../../includes/sssdsfull-md.md)] on which the operation is performed.Not Null|
39+
|server_name|**nvarchar(128)**|Name of the Physical server on which the [!INCLUDE[ssSDSfull](../../includes/sssdsfull-md.md)] which is being backed up is present. Not Null.|
40+
|backup_start_date|**datetime2(7)**|Timestamp when the Backup operation started. Not Null.|
41+
|backup_finish_date|**datetime2(7)**|Timestamp when the Backup operation finished. Not Null.|
42+
|backup_type|**char(1)**|Type of Backup<br /><br /> D = Full Database Backup<br />I = Incremental or Differential Backup<br />L = Log Backup. Not Null.|
43+
|in_retention|**bit**|Backup Retention Status. Tells whether backup is within retention period<br /><br />1 = In Retention <br />0 = Out of Retention. Null.|
4444

4545
## Permissions
4646
Requires VIEW DATABASE STATE permission on the database.
4747

4848
## Remarks
49-
Backups retained and shown in Backup history view depend on configured backup retention. Some backups older than the retention period, in_retention=0, are also shown in dm_database_backups view. They're needed to do point in restore within the configured retention.
49+
Backups retained and shown in Backup history view depend on configured backup retention. Some backups older than the retention period, in_retention=0, are also shown in dm_database_backups view. They're needed to do point in restore within the configured retention.
50+
51+
## Example
52+
Show list of all active backups for the current database ordered by backup finish date.
53+
54+
```
55+
SELECT *
56+
FROM sys.dm_database_backups
57+
ORDER BY backup_finish_date DESC;
58+
```

0 commit comments

Comments
 (0)