Table of Contents

Class AvailabilitySchema.DataContext

Namespace
LinqToDB.Tools.DataProvider.SqlServer.Schemas
Assembly
linq2db.Tools.dll
public class AvailabilitySchema.DataContext
Inheritance
AvailabilitySchema.DataContext
Extension Methods

Constructors

DataContext(IDataContext)

public DataContext(IDataContext dataContext)

Parameters

dataContext IDataContext

Properties

AvailabilityDatabasesClusters

sys.availability_databases_cluster (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

Contains one row for each availability database on the instance of SQL Server that is hosting an availability replica for any Always On availability group in the Windows Server Failover Clustering (WSFC) cluster, regardless of whether the local copy database has been joined to the availability group yet.

note


When a database is added to an availability group, the primary database is automatically joined to the group. Secondary databases must be prepared on each secondary replica before they can be joined to the availability group.


See sys.availability_databases_cluster.

public ITable<AvailabilitySchema.AvailabilityDatabasesCluster> AvailabilityDatabasesClusters { get; }

Property Value

ITable<AvailabilitySchema.AvailabilityDatabasesCluster>

AvailabilityGroupListenerIpAddresses

sys.availability_group_listener_ip_addresses (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

Returns a row for every IP address that is associated with any Always On availability group listener in the Windows Server Failover Clustering (WSFC) cluster.
Primary key: listener_id + ip_address + ip_sub_mask


See sys.availability_group_listener_ip_addresses.

public ITable<AvailabilitySchema.AvailabilityGroupListenerIpAddress> AvailabilityGroupListenerIpAddresses { get; }

Property Value

ITable<AvailabilitySchema.AvailabilityGroupListenerIpAddress>

AvailabilityGroupListeners

sys.availability_group_listeners (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

For each Always On availability group, returns either zero rows indicating that no network name is associated with the availability group, or returns a row for each availability-group listener configuration in the Windows Server Failover Clustering (WSFC) cluster. This view displays the real-time configuration gathered from cluster.

note


This catalog view does not describe details of an IP configuration, that was defined in the WSFC cluster.


See sys.availability_group_listeners.

public ITable<AvailabilitySchema.AvailabilityGroupListener> AvailabilityGroupListeners { get; }

Property Value

ITable<AvailabilitySchema.AvailabilityGroupListener>

AvailabilityGroups

sys.availability_groups (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

Returns a row for each availability group for which the local instance of SQL Server hosts an availability replica. Each row contains a cached copy of the availability group metadata.


See sys.availability_groups.

public ITable<AvailabilitySchema.AvailabilityGroup> AvailabilityGroups { get; }

Property Value

ITable<AvailabilitySchema.AvailabilityGroup>

AvailabilityGroupsClusters

sys.availability_groups_cluster (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

Returns a row for each Always On availability group in the Windows Server Failover Clustering (WSFC) . Each row contains the availability group metadata from the WSFC cluster.


See sys.availability_groups_cluster.

public ITable<AvailabilitySchema.AvailabilityGroupsCluster> AvailabilityGroupsClusters { get; }

Property Value

ITable<AvailabilitySchema.AvailabilityGroupsCluster>

AvailabilityReadOnlyRoutingLists

sys.availability_read_only_routing_lists (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

Returns a row for the read only routing list of each availability replica in an Always On availability group in the WSFC failover cluster.


See sys.availability_read_only_routing_lists.

public ITable<AvailabilitySchema.AvailabilityReadOnlyRoutingList> AvailabilityReadOnlyRoutingLists { get; }

Property Value

ITable<AvailabilitySchema.AvailabilityReadOnlyRoutingList>

AvailabilityReplicas

sys.availability_replicas (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

Returns a row for each of the availability replicas that belong to any Always On availability group in the WSFC failover cluster.
If the local server instance is unable to talk to the WSFC failover cluster, for example because the cluster is down or quorum has been lost, only rows for local availability replicas are returned. These rows will contain only the columns of data that are cached locally in metadata.


See sys.availability_replicas.

public ITable<AvailabilitySchema.AvailabilityReplica> AvailabilityReplicas { get; }

Property Value

ITable<AvailabilitySchema.AvailabilityReplica>