Table of Contents

Class DatabasesAndFilesSchema.DatabaseRecoveryStatus

Namespace
LinqToDB.Tools.DataProvider.SqlServer.Schemas
Assembly
linq2db.Tools.dll

sys.database_recovery_status (Transact-SQL)

Applies to:SQL ServerAzure SQL Managed Instance

Contains one row per database. If the database is not opened, the SQL Server Database Engine tries to start it.
To see the row for a database other than master or tempdb, one of the following must apply:
- Be the owner of the database.
- Have ALTER ANY DATABASE or VIEW ANY DATABASE server-level permissions.
- Have CREATE DATABASE permission in the master database.


See sys.database_recovery_status.

[Table(Schema = "sys", Name = "database_recovery_status", IsView = true)]
public class DatabasesAndFilesSchema.DatabaseRecoveryStatus
Inheritance
DatabasesAndFilesSchema.DatabaseRecoveryStatus
Inherited Members
Extension Methods

Properties

DatabaseGuid

database_guid NULL uniqueidentifier

Used to relate all the database files of a database together. All files must have this GUID in their header page for the database to start as expected. Only one database should ever have this GUID, but duplicates can be created by copying and attaching databases. RESTORE always generates a new GUID when you restore a database that does not yet exist.

NULL= Database is offline, or the database will not start.
[Column("database_guid")]
[Nullable]
public Guid? DatabaseGuid { get; set; }

Property Value

Guid?

DatabaseID

database_id NOT NULL int

ID of the database, unique within an instance of SQL Server.
[Column("database_id")]
[NotNull]
public int DatabaseID { get; set; }

Property Value

int

FamilyGuid

family_guid NULL uniqueidentifier

Identifier of the 'backup family' for the database for detecting matching restore states.

NULL= Database is offline or the database will not start.
[Column("family_guid")]
[Nullable]
public Guid? FamilyGuid { get; set; }

Property Value

Guid?

FirstRecoveryForkGuid

first_recovery_fork_guid NULL uniqueidentifier

Identifier of the starting recovery fork.

NULL= Database is offline, or the database will not start.
[Column("first_recovery_fork_guid")]
[Nullable]
public Guid? FirstRecoveryForkGuid { get; set; }

Property Value

Guid?

ForkPointLsn

fork_point_lsn NULL numeric(25,0)

If first_recovery_fork_guid is not equal (!=) to recovery_fork_guid, fork_point_lsn is the log sequence number of the current fork point. Otherwise, the value is NULL.
[Column("fork_point_lsn")]
[Nullable]
public decimal? ForkPointLsn { get; set; }

Property Value

decimal?

LastLogBackupLsn

last_log_backup_lsn NULL numeric(25,0)

The starting log sequence number of the next log backup.

If NULL, a transaction log back up cannot be performed because either the database is in SIMPLE recovery or there is no current full or differential database backup.
[Column("last_log_backup_lsn")]
[Nullable]
public decimal? LastLogBackupLsn { get; set; }

Property Value

decimal?

RecoveryForkGuid

recovery_fork_guid NULL uniqueidentifier

Identifies the current recovery fork on which the database is currently active.

NULL= Database is offline, or the database will not start.
[Column("recovery_fork_guid")]
[Nullable]
public Guid? RecoveryForkGuid { get; set; }

Property Value

Guid?