Table of Contents

Class ObjectSchema.AllObject

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

sys.all_objects (Transact-SQL)

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

Shows the UNION of all schema-scoped user-defined objects and system objects.


See sys.all_objects.

[Table(Schema = "sys", Name = "all_objects", IsView = true)]
public class ObjectSchema.AllObject
Inheritance
ObjectSchema.AllObject
Extension Methods

Properties

AllColumns

all_columns (sys.all_columns)

[Association(ThisKey = "ObjectID", OtherKey = "ObjectID", CanBeNull = true)]
public IList<ObjectSchema.AllColumn> AllColumns { get; set; }

Property Value

IList<ObjectSchema.AllColumn>

AllParameters

all_parameters (sys.all_parameters)

[Association(ThisKey = "ObjectID", OtherKey = "ObjectID", CanBeNull = true)]
public IList<ObjectSchema.AllParameter> AllParameters { get; set; }

Property Value

IList<ObjectSchema.AllParameter>

AllSqlModules

all_sql_modules (sys.all_sql_modules)

[Association(ThisKey = "ObjectID", OtherKey = "ObjectID", CanBeNull = true)]
public IList<ObjectSchema.AllSqlModule> AllSqlModules { get; set; }

Property Value

IList<ObjectSchema.AllSqlModule>

AllView

all_views (sys.all_views)

[Association(ThisKey = "ObjectID", OtherKey = "ObjectID", CanBeNull = true)]
public ObjectSchema.AllView? AllView { get; set; }

Property Value

ObjectSchema.AllView

CreateDate

Date the object was created.

[Column("create_date")]
[NotNull]
public DateTime CreateDate { get; set; }

Property Value

DateTime

IsMSShipped

Object created by an internal SQL Server component.

[Column("is_ms_shipped")]
[Nullable]
public bool? IsMSShipped { get; set; }

Property Value

bool?

IsPublished

Object is published.

[Column("is_published")]
[Nullable]
public bool? IsPublished { get; set; }

Property Value

bool?

IsSchemaPublished

Only the schema of the object is published.

[Column("is_schema_published")]
[Nullable]
public bool? IsSchemaPublished { get; set; }

Property Value

bool?

ModifyDate

Date the object was last modified by using an ALTER statement. If the object is a table or a view, modify_date also changes when an index on the table or view is created or modified.

[Column("modify_date")]
[NotNull]
public DateTime ModifyDate { get; set; }

Property Value

DateTime

Name

Object name.

[Column("name")]
[NotNull]
public string Name { get; set; }

Property Value

string

ObjectID

Object identification number. Is unique within a database.

[Column("object_id")]
[NotNull]
public int ObjectID { get; set; }

Property Value

int

ParentObjectID

ID of the object to which this object belongs.

0 = Not a child object.

[Column("parent_object_id")]
[NotNull]
public int ParentObjectID { get; set; }

Property Value

int

PrincipalID

ID of the individual owner if different from the schema owner. By default, schema-contained objects are owned by the schema owner. However, another owner can be specified by using the ALTER AUTHORIZATION statement to change ownership.

Is NULL if there is no alternative individual owner.

Is NULL if the object type is one of the following:

C = CHECK constraint

D = DEFAULT (constraint or stand-alone)

F = FOREIGN KEY constraint

PK = PRIMARY KEY constraint

R = Rule (old-style, stand-alone)

TA = Assembly (CLR) trigger

TR = SQL trigger

UQ = UNIQUE constraint

[Column("principal_id")]
[Nullable]
public int? PrincipalID { get; set; }

Property Value

int?

SchemaID

ID of the schema that contains the object.

For all schema scoped system objects that are included with SQL Server, this value is always in (schema_id('sys'), schema_id('INFORMATION_SCHEMA')).

[Column("schema_id")]
[NotNull]
public int SchemaID { get; set; }

Property Value

int

TypeColumn

Object type:

AF = Aggregate function (CLR)

C = CHECK constraint

D = DEFAULT (constraint or stand-alone)

F = FOREIGN KEY constraint

FN = SQL scalar function

FS = Assembly (CLR) scalar-function

FT = Assembly (CLR) table-valued function

IF = SQL inline table-valued function

IT = Internal table

P = SQL Stored Procedure

PC = Assembly (CLR) stored-procedure

PG = Plan guide

PK = PRIMARY KEY constraint

R = Rule (old-style, stand-alone)

RF = Replication-filter-procedure

S = System base table

SN = Synonym

SO = Sequence object

SQ = Service queue

TA = Assembly (CLR) DML trigger

TF = SQL table-valued-function

TR = SQL DML trigger

TT = Table type

U = Table (user-defined)

UQ = UNIQUE constraint

V = View

X = Extended stored procedure

[Column("type")]
[Nullable]
public string? TypeColumn { get; set; }

Property Value

string

TypeDesc

Description of the object type. AGGREGATE_FUNCTION

CHECK_CONSTRAINT

DEFAULT_CONSTRAINT

FOREIGN_KEY_CONSTRAINT

SQL_SCALAR_FUNCTION

CLR_SCALAR_FUNCTION

CLR_TABLE_VALUED_FUNCTION

SQL_INLINE_TABLE_VALUED_FUNCTION

INTERNAL_TABLE

SQL_STORED_PROCEDURE

CLR_STORED_PROCEDURE

PLAN_GUIDE

PRIMARY_KEY_CONSTRAINT

RULE

REPLICATION_FILTER_PROCEDURE

SYSTEM_TABLE

SYNONYM

SERVICE_QUEUE

CLR_TRIGGER

SQL_TABLE_VALUED_FUNCTION

SQL_TRIGGER

TABLE_TYPE

USER_TABLE

UNIQUE_CONSTRAINT

VIEW

EXTENDED_STORED_PROCEDURE

[Column("type_desc")]
[Nullable]
public string? TypeDesc { get; set; }

Property Value

string