Class SecuritySchema.ServerPrincipal
- Namespace
- LinqToDB.Tools.DataProvider.SqlServer.Schemas
- Assembly
- linq2db.Tools.dll
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.
[Table(Schema = "sys", Name = "server_principals", IsView = true)]
public class SecuritySchema.ServerPrincipal
- Inheritance
-
SecuritySchema.ServerPrincipal
- Extension Methods
Properties
CreateDate
Time at which the principal was created.
[Column("create_date")]
[NotNull]
public DateTime CreateDate { get; set; }
Property Value
CredentialID
ID of a credential associated with this principal. If no credential is associated with this principal, credential_id will be NULL.
[Column("credential_id")]
[Nullable]
public int? CredentialID { get; set; }
Property Value
- int?
DefaultDatabaseName
Default database for this principal.
[Column("default_database_name")]
[Nullable]
public string? DefaultDatabaseName { get; set; }
Property Value
DefaultLanguageName
Default language for this principal.
[Column("default_language_name")]
[Nullable]
public string? DefaultLanguageName { get; set; }
Property Value
IsDisabled
1 = Login is disabled.
[Column("is_disabled")]
[Nullable]
public int? IsDisabled { get; set; }
Property Value
- int?
IsFixedRole
Returns 1 if the principal is one of the built-in server roles with fixed permissions. For more information, see Server-Level Roles.
[Column("is_fixed_role")]
[NotNull]
public bool IsFixedRole { get; set; }
Property Value
ModifyDate
Time at which the principal definition was last modified.
[Column("modify_date")]
[NotNull]
public DateTime ModifyDate { get; set; }
Property Value
Name
Name of the principal. Is unique within a server.
[Column("name")]
[NotNull]
public string Name { get; set; }
Property Value
OwningPrincipalID
The principal_id of the owner of a server role. NULL if the principal is not a server role.
[Column("owning_principal_id")]
[Nullable]
public int? OwningPrincipalID { get; set; }
Property Value
- int?
PrincipalID
ID number of the Principal. Is unique within a server.
[Column("principal_id")]
[NotNull]
public int PrincipalID { get; set; }
Property Value
SID
SID (Security-IDentifier) of the principal. If Windows principal, then it matches Windows SID.
[Column("sid")]
[Nullable]
public byte[]? SID { get; set; }
Property Value
- byte[]
TypeColumn
Principal type:
S = SQL login
U = Windows login
G = Windows group
R = Server role
C = Login mapped to a certificate
E = External Login from Azure Active Directory
X = External group from Azure Active Directory group or applications
K = Login mapped to an asymmetric key
[Column("type")]
[NotNull]
public string TypeColumn { get; set; }
Property Value
TypeDesc
Description of the principal type:
SQL_LOGIN
WINDOWS_LOGIN
WINDOWS_GROUP
SERVER_ROLE
CERTIFICATE_MAPPED_LOGIN
EXTERNAL_LOGIN
EXTERNAL_GROUP
ASYMMETRIC_KEY_MAPPED_LOGIN
[Column("type_desc")]
[Nullable]
public string? TypeDesc { get; set; }