Table of Contents

Class SecuritySchema.DataContext

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

Constructors

DataContext(IDataContext)

public DataContext(IDataContext dataContext)

Parameters

dataContext IDataContext

Properties

AsymmetricKeys

sys.asymmetric_keys (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database

Returns a row for each asymmetric key.


See sys.asymmetric_keys.

public ITable<SecuritySchema.AsymmetricKey> AsymmetricKeys { get; }

Property Value

ITable<SecuritySchema.AsymmetricKey>

Certificates

sys.certificates (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics √ Analytics Platform System (PDW)

Returns a row for each certificate in the database.


See sys.certificates.

public ITable<SecuritySchema.Certificate> Certificates { get; }

Property Value

ITable<SecuritySchema.Certificate>

ColumnEncryptionKeyValues

sys.column_encryption_key_values (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database

Returns information about encrypted values of column encryption keys (CEKs) created with either the CREATE COLUMN ENCRYPTION KEY or the ALTER COLUMN ENCRYPTION KEY (Transact-SQL) statement. Each row represents a value of a CEK, encrypted with a column master key (CMK).


See sys.column_encryption_key_values.

public ITable<SecuritySchema.ColumnEncryptionKeyValue> ColumnEncryptionKeyValues { get; }

Property Value

ITable<SecuritySchema.ColumnEncryptionKeyValue>

ColumnEncryptionKeys

sys.column_encryption_keys (Transact-SQL)

APPLIES TO: (Yes) SQL Server 2016 and later (No) Azure SQL Database (Yes) Azure Synapse Analytics (No) Parallel Data Warehouse

Returns information about column encryption keys (CEKs) created with the CREATE COLUMN ENCRYPTION KEY statement. Each row represents a CEK.


See sys.column_encryption_keys.

public ITable<SecuritySchema.ColumnEncryptionKey> ColumnEncryptionKeys { get; }

Property Value

ITable<SecuritySchema.ColumnEncryptionKey>

ColumnMasterKeys

sys.column_master_keys (Transact-SQL)

Applies to: √ SQL Server 2016 (13.x) and later √ Azure SQL Database √ Azure SQL Managed Instance

Returns a row for each database master key added by using the CREATE MASTER KEY statement. Each row represents a single column master key (CMK).


See sys.column_master_keys.

public ITable<SecuritySchema.ColumnMasterKey> ColumnMasterKeys { get; }

Property Value

ITable<SecuritySchema.ColumnMasterKey>

Credentials

sys.credentials (Transact-SQL)

APPLIES TO: (Yes) SQL Server (Yes) Azure SQL Managed Instance ![yes](media/yes-icon.png)Azure Synapse Analytics (Yes) Parallel Data Warehouse

Returns one row for each server-level credential.


See sys.credentials.

public ITable<SecuritySchema.Credential> Credentials { get; }

Property Value

ITable<SecuritySchema.Credential>

CryptProperties

sys.crypt_properties (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database

Returns one row for each cryptographic property associated with a securable.


See sys.crypt_properties.

public ITable<SecuritySchema.CryptProperty> CryptProperties { get; }

Property Value

ITable<SecuritySchema.CryptProperty>

CryptographicProviders

sys.cryptographic_providers (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database

Returns one row for each registered cryptographic provider.


See sys.cryptographic_providers.

public ITable<SecuritySchema.CryptographicProvider> CryptographicProviders { get; }

Property Value

ITable<SecuritySchema.CryptographicProvider>

DatabaseAuditSpecificationDetails

sys.database_audit_specification_details (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

Contains information about the database audit specifications in a SQL Server audit on a server instance for all databases. For more information, see SQL Server Audit (Database Engine). For a list of all audit_action_id's and their names, query sys.dm_audit_actions (Transact-SQL).


See sys.database_audit_specification_details.

public ITable<SecuritySchema.DatabaseAuditSpecificationDetail> DatabaseAuditSpecificationDetails { get; }

Property Value

ITable<SecuritySchema.DatabaseAuditSpecificationDetail>

DatabaseAuditSpecifications

sys.database_audit_specifications (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

Contains information about the database audit specifications in a SQL Server audit on a server instance. For more information, see SQL Server Audit (Database Engine).


See sys.database_audit_specifications.

public ITable<SecuritySchema.DatabaseAuditSpecification> DatabaseAuditSpecifications { get; }

Property Value

ITable<SecuritySchema.DatabaseAuditSpecification>

DatabaseCredentials

sys.database_credentials (Transact-SQL)

Applies to: √ SQL Server 2016 (13.x) and later √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics

Returns one row for each database scoped credential in the database.

important


This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Use sys.database_scoped_credentials instead.


See sys.database_credentials.

public ITable<SecuritySchema.DatabaseCredential> DatabaseCredentials { get; }

Property Value

ITable<SecuritySchema.DatabaseCredential>

DatabaseLedgerBlocks

sys.database_ledger_blocks (Transact-SQL)

Applies to: √ Azure SQL Database

Captures the cryptographically chained blocks, each of which represents a block of transactions against ledger tables.
For more information on database ledger, see Azure SQL Database ledger


See sys.database_ledger_blocks.

public ITable<SecuritySchema.DatabaseLedgerBlock> DatabaseLedgerBlocks { get; }

Property Value

ITable<SecuritySchema.DatabaseLedgerBlock>

DatabaseLedgerDigestLocations

sys.database_ledger_digest_locations (Transact-SQL)

Applies to: √ Azure SQL Database

Captures the current and the historical ledger digest storage endpoints for the ledger feature.
For more information on database ledger, see Azure SQL Database ledger.


See sys.database_ledger_digest_locations.

public ITable<SecuritySchema.DatabaseLedgerDigestLocation> DatabaseLedgerDigestLocations { get; }

Property Value

ITable<SecuritySchema.DatabaseLedgerDigestLocation>

DatabaseLedgerTransactions

sys.database_ledger_transactions (Transact-SQL)

Applies to: √ Azure SQL Database

Captures the cryptographically protected history of database transactions against ledger tables in the database. A row in this view represents a database transaction.
For more information on database ledger, see Azure SQL Database ledger.


See sys.database_ledger_transactions.

public ITable<SecuritySchema.DatabaseLedgerTransaction> DatabaseLedgerTransactions { get; }

Property Value

ITable<SecuritySchema.DatabaseLedgerTransaction>

DatabasePermissions

sys.database_permissions (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics √ Analytics Platform System (PDW)

Returns a row for every permission or column-exception permission in the database. For columns, there is a row for every permission that is different from the corresponding object-level permission. If the column permission is the same as the corresponding object permission, there is no row for it and the permission applied is that of the object.

important


Column-level permissions override object-level permissions on the same entity.


See sys.database_permissions.

public ITable<SecuritySchema.DatabasePermission> DatabasePermissions { get; }

Property Value

ITable<SecuritySchema.DatabasePermission>

DatabasePrincipals

sys.database_principals (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics √ Analytics Platform System (PDW)

Returns a row for each security principal in a SQL Server database.


See sys.database_principals.

public ITable<SecuritySchema.DatabasePrincipal> DatabasePrincipals { get; }

Property Value

ITable<SecuritySchema.DatabasePrincipal>

DatabaseRoleMembers

sys.database_role_members (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics √ Analytics Platform System (PDW)

Returns one row for each member of each database role. Database users, application roles, and other database roles can be members of a database role. To add members to a role, use the ALTER ROLE statement with the ADD MEMBER option. Join with sys.database_principals to return the names of the principal_id values.


See sys.database_role_members.

public ITable<SecuritySchema.DatabaseRoleMember> DatabaseRoleMembers { get; }

Property Value

ITable<SecuritySchema.DatabaseRoleMember>

DatabaseScopedCredentials

sys.database_scoped_credentials (Transact-SQL)

Applies to: √ SQL Server 2016 (13.x) and later √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics

Returns one row for each database scoped credential in the database.
::: moniker range='=sql-server-2016'


See sys.database_scoped_credentials.

public ITable<SecuritySchema.DatabaseScopedCredential> DatabaseScopedCredentials { get; }

Property Value

ITable<SecuritySchema.DatabaseScopedCredential>

KeyEncryptions

sys.key_encryptions (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database

Returns a row for each symmetric key encryption specified by using the ENCRYPTION BY clause of the CREATE SYMMETRIC KEY statement.


See sys.key_encryptions.

public ITable<SecuritySchema.KeyEncryption> KeyEncryptions { get; }

Property Value

ITable<SecuritySchema.KeyEncryption>

LedgerColumnHistories

sys.ledger_column_history (Transact-SQL)

Applies to: √ Azure SQL Database

Captures the cryptographically protected history of operations on columns of ledger tables: adding, renaming, and dropping columns.
For more information on database ledger, see Azure SQL Database ledger


See sys.ledger_column_history.

public ITable<SecuritySchema.LedgerColumnHistory> LedgerColumnHistories { get; }

Property Value

ITable<SecuritySchema.LedgerColumnHistory>

LedgerTableHistories

sys.ledger_table_history (Transact-SQL)

Applies to: √ Azure SQL Database

Captures the cryptographically protected history of operations on ledger tables: creating ledger tables, renaming ledger tables or ledger views, and dropping ledger tables.
For more information on database ledger, see Azure SQL Database ledger


See sys.ledger_table_history.

public ITable<SecuritySchema.LedgerTableHistory> LedgerTableHistories { get; }

Property Value

ITable<SecuritySchema.LedgerTableHistory>

LoginTokens

sys.login_token (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

Returns one row for every server principal that is part of the login token.


See sys.login_token.

public ITable<SecuritySchema.LoginToken> LoginTokens { get; }

Property Value

ITable<SecuritySchema.LoginToken>

MasterKeyPasswords

sys.master_key_passwords (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Managed Instance

Returns a row for each database master key password added by using the sp_control_dbmasterkey_password stored procedure. The passwords that are used to protect the master keys are stored in the credential store. The credential name follows this format: ##DBMKEY_<database_family_guid>_<random_password_guid>##. The password is stored as the credential secret. For each password added by using sp_control_dbmasterkey_password, there is a row in sys.credentials.
Each row in this view shows a credential_id and the family_guid of a database the master key of which is protected by the password associated with that credential. A join with sys.credentials on the credential_id will return useful fields, such as the create_date and credential name.


See sys.master_key_passwords.

public ITable<SecuritySchema.MasterKeyPassword> MasterKeyPasswords { get; }

Property Value

ITable<SecuritySchema.MasterKeyPassword>

OpenKeys

sys.openkeys (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database

This catalog view returns information about encryption keys that are open in the current session.


See sys.openkeys.

public ITable<SecuritySchema.OpenKey> OpenKeys { get; }

Property Value

ITable<SecuritySchema.OpenKey>

SecurableClasses

sys.securable_classes (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics √ Analytics Platform System (PDW)

Returns a list of securable classes


See sys.securable_classes.

public ITable<SecuritySchema.SecurableClass> SecurableClasses { get; }

Property Value

ITable<SecuritySchema.SecurableClass>

SecurityPolicies

sys.security_policies (Transact-SQL)

Applies to: √ SQL Server 2016 (13.x) and later √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics

Returns a row for each security policy in the database.


See sys.security_policies.

public ITable<SecuritySchema.SecurityPolicy> SecurityPolicies { get; }

Property Value

ITable<SecuritySchema.SecurityPolicy>

SecurityPredicates

sys.security_predicates (Transact-SQL)

Applies to: √ SQL Server 2016 (13.x) and later √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics

Returns a row for each security predicate in the database.


See sys.security_predicates.

public ITable<SecuritySchema.SecurityPredicate> SecurityPredicates { get; }

Property Value

ITable<SecuritySchema.SecurityPredicate>

SensitivityClassifications

sys.sensitivity_classifications (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics

Returns a row for each classified item in the database.


See sys.sensitivity_classifications.

public ITable<SecuritySchema.SensitivityClassification> SensitivityClassifications { get; }

Property Value

ITable<SecuritySchema.SensitivityClassification>

ServerAuditSpecificationDetails

sys.server_audit_specification_details (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

Contains information about the server audit specification details (actions) in a SQL Server audit on a server instance. For more information, see SQL Server Audit (Database Engine). For a list of all audit_action_id's and their names, query sys.dm_audit_actions (Transact-SQL).


See sys.server_audit_specification_details.

public ITable<SecuritySchema.ServerAuditSpecificationDetail> ServerAuditSpecificationDetails { get; }

Property Value

ITable<SecuritySchema.ServerAuditSpecificationDetail>

ServerAuditSpecifications

sys.server_audit_specifications (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

Contains information about the server audit specifications in a SQL Server audit on a server instance. For more information on SQL Server Audit, see SQL Server Audit (Database Engine).


See sys.server_audit_specifications.

public ITable<SecuritySchema.ServerAuditSpecification> ServerAuditSpecifications { get; }

Property Value

ITable<SecuritySchema.ServerAuditSpecification>

ServerAudits

sys.server_audits (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

Contains one row for each SQL Server audit in a server instance. For more information, see SQL Server Audit (Database Engine).


See sys.server_audits.

public ITable<SecuritySchema.ServerAudit> ServerAudits { get; }

Property Value

ITable<SecuritySchema.ServerAudit>

ServerFileAudits

sys.server_file_audits (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

Contains extended information about the file audit type in a SQL Server audit on a server instance. For more information, see SQL Server Audit (Database Engine).


See sys.server_file_audits.

public ITable<SecuritySchema.ServerFileAudit> ServerFileAudits { get; }

Property Value

ITable<SecuritySchema.ServerFileAudit>

ServerPermissions

sys.server_permissions (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Managed Instance √ Analytics Platform System (PDW)

Returns one row for each server-level permission.


See sys.server_permissions.

public ITable<SecuritySchema.ServerPermission> ServerPermissions { get; }

Property Value

ITable<SecuritySchema.ServerPermission>

ServerPrincipals

sys.server_principals (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Managed Instance √ Analytics Platform System (PDW)

Contains a row for every server-level principal.


See sys.server_principals.

public ITable<SecuritySchema.ServerPrincipal> ServerPrincipals { get; }

Property Value

ITable<SecuritySchema.ServerPrincipal>

ServerRoleMembers

sys.server_role_members (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Managed Instance √ Analytics Platform System (PDW)

Returns one row for each member of each fixed and user-defined server role.


See sys.server_role_members.

public ITable<SecuritySchema.ServerRoleMember> ServerRoleMembers { get; }

Property Value

ITable<SecuritySchema.ServerRoleMember>

SqlLogins

sys.sql_logins (Transact-SQL)

APPLIES TO: (Yes) SQL Server (Yes) Azure SQL Database (No) Azure Synapse Analytics (Yes) Parallel Data Warehouse

Returns one row for every SQL Server authentication login.


See sys.sql_logins.

public ITable<SecuritySchema.SqlLogin> SqlLogins { get; }

Property Value

ITable<SecuritySchema.SqlLogin>

SymmetricKeys

sys.symmetric_keys (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database √ Azure SQL Managed Instance √ Azure Synapse Analytics √ Analytics Platform System (PDW)

Returns one row for every symmetric key created with the CREATE SYMMETRIC KEY statement.


See sys.symmetric_keys.

public ITable<SecuritySchema.SymmetricKey> SymmetricKeys { get; }

Property Value

ITable<SecuritySchema.SymmetricKey>

SystemComponentsSurfaceAreaConfigurations

sys.system_components_surface_area_configuration (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

Returns one row for each executable system object that can be enabled or disabled by a surface area configuration component. For more information, see Surface Area Configuration.


See sys.system_components_surface_area_configuration.

public ITable<SecuritySchema.SystemComponentsSurfaceAreaConfiguration> SystemComponentsSurfaceAreaConfigurations { get; }

Property Value

ITable<SecuritySchema.SystemComponentsSurfaceAreaConfiguration>

UserTokens

sys.user_token (Transact-SQL)

APPLIES TO: (Yes) SQL Server (Yes) Azure SQL Database (Yes) Azure Synapse Analytics (No) Parallel Data Warehouse

Returns one row for every database principal that is part of the user token in SQL Server.


See sys.user_token.

public ITable<SecuritySchema.UserToken> UserTokens { get; }

Property Value

ITable<SecuritySchema.UserToken>