Table Table Table Class

Definition

Instance class encapsulating : Server[@Name='']/Database/Table

[Microsoft.SqlServer.Management.Facets.EvaluationMode(Microsoft.SqlServer.Management.Dmf.AutomatedPolicyEvaluationMode.CheckOnSchedule)]
[Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcElement(Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcElementFlags.Standalone | Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcElementFlags.SqlAzureDatabase)]
[Microsoft.SqlServer.Management.Sdk.Sfc.PhysicalFacet]
public sealed class Table : Microsoft.SqlServer.Management.Smo.TableViewBase, Microsoft.SqlServer.Management.Common.IAlterable, Microsoft.SqlServer.Management.Common.ICreatable, Microsoft.SqlServer.Management.Common.IDropIfExists, Microsoft.SqlServer.Management.Common.IDroppable, Microsoft.SqlServer.Management.Common.IRenamable, Microsoft.SqlServer.Management.Sdk.Sfc.IDmfFacet, Microsoft.SqlServer.Management.Sdk.Sfc.ISfcSupportsDesignMode, Microsoft.SqlServer.Management.Smo.IColumnPermission, Microsoft.SqlServer.Management.Smo.ITableOptions
type Table = class
    inherit TableViewBase
    interface ISfcSupportsDesignMode
    interface IColumnPermission
    interface IObjectPermission
    interface ICreatable
    interface IAlterable
    interface IDroppable
    interface IDropIfExists
    interface IRenamable
    interface ITableOptions
    interface IDmfFacet
Public NotInheritable Class Table
Inherits TableViewBase
Implements IAlterable, IColumnPermission, ICreatable, IDmfFacet, IDropIfExists, IDroppable, IRenamable, ISfcSupportsDesignMode, ITableOptions
Inheritance
Attributes
EvaluationModeAttribute Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcElementAttribute PhysicalFacetAttribute
Implements

Constructors

Table() Table() Table()
Table(Database, String) Table(Database, String) Table(Database, String)
Table(Database, String, String) Table(Database, String, String) Table(Database, String, String)

Properties

AnsiNullsStatus AnsiNullsStatus AnsiNullsStatus
ChangeTrackingEnabled ChangeTrackingEnabled ChangeTrackingEnabled
Checks Checks Checks
Columns Columns Columns Inherited from TableViewTableTypeBase
CreateDate CreateDate CreateDate
DatabaseEngineEdition DatabaseEngineEdition DatabaseEngineEdition

Returns the DatabaseEngineEdition of the SMO object

(Inherited from SqlSmoObject)
DatabaseEngineType DatabaseEngineType DatabaseEngineType

Returns the DatabaseEngineType of the SMO object

(Inherited from SqlSmoObject)
DataConsistencyCheck DataConsistencyCheck DataConsistencyCheck

Property for setting/getting if DATA_CONSISTENCY_CHECK option is used when creating system-versioned temporal table Sample syntax: CREATE TABLE t (....) WITH (SYSTEM_VERSIONING = ON (HISTORY_TABLE = dbo.History, DATA_CONSISTENCY_CHECK = ON))

DataSourceName DataSourceName DataSourceName
DataSpaceUsed DataSpaceUsed DataSpaceUsed
DateLastModified DateLastModified DateLastModified
Durability Durability Durability
DwTableDistribution DwTableDistribution DwTableDistribution
Events Events Events
ExecuteForScalar ExecuteForScalar ExecuteForScalar Inherited from SqlSmoObject
ExecutionManager ExecutionManager ExecutionManager Inherited from SqlSmoObject
ExtendedProperties ExtendedProperties ExtendedProperties Inherited from TableViewTableTypeBase
ExternalTableDistribution ExternalTableDistribution ExternalTableDistribution
FakeSystemTable FakeSystemTable FakeSystemTable
FileFormatName FileFormatName FileFormatName
FileGroup FileGroup FileGroup
FileStreamFileGroup FileStreamFileGroup FileStreamFileGroup
FileStreamPartitionScheme FileStreamPartitionScheme FileStreamPartitionScheme
FileTableDirectoryName FileTableDirectoryName FileTableDirectoryName
FileTableNameColumnCollation FileTableNameColumnCollation FileTableNameColumnCollation
FileTableNamespaceEnabled FileTableNamespaceEnabled FileTableNamespaceEnabled
ForeignKeys ForeignKeys ForeignKeys
FullTextIndex FullTextIndex FullTextIndex Inherited from TableViewBase
HasAfterTrigger HasAfterTrigger HasAfterTrigger
HasClusteredColumnStoreIndex HasClusteredColumnStoreIndex HasClusteredColumnStoreIndex
HasClusteredIndex HasClusteredIndex HasClusteredIndex
HasCompressedPartitions HasCompressedPartitions HasCompressedPartitions
HasDeleteTrigger HasDeleteTrigger HasDeleteTrigger
HasHeapIndex HasHeapIndex HasHeapIndex
HasIndex HasIndex HasIndex
HasInsertTrigger HasInsertTrigger HasInsertTrigger
HasInsteadOfTrigger HasInsteadOfTrigger HasInsteadOfTrigger
HasNonClusteredColumnStoreIndex HasNonClusteredColumnStoreIndex HasNonClusteredColumnStoreIndex
HasNonClusteredIndex HasNonClusteredIndex HasNonClusteredIndex
HasPrimaryClusteredIndex HasPrimaryClusteredIndex HasPrimaryClusteredIndex
HasSparseColumn HasSparseColumn HasSparseColumn
HasSpatialData HasSpatialData HasSpatialData
HasSystemTimePeriod HasSystemTimePeriod HasSystemTimePeriod
HasUpdateTrigger HasUpdateTrigger HasUpdateTrigger
HasXmlData HasXmlData HasXmlData
HasXmlIndex HasXmlIndex HasXmlIndex
HistoryRetentionPeriod HistoryRetentionPeriod HistoryRetentionPeriod
HistoryRetentionPeriodUnit HistoryRetentionPeriodUnit HistoryRetentionPeriodUnit
HistoryTableID HistoryTableID HistoryTableID
HistoryTableName HistoryTableName HistoryTableName
HistoryTableSchema HistoryTableSchema HistoryTableSchema
ID ID ID
Indexes Indexes Indexes
IndexSpaceUsed IndexSpaceUsed IndexSpaceUsed
IsEdge IsEdge IsEdge

Whether this Table is an edge table.

IsExternal IsExternal IsExternal
IsFileTable IsFileTable IsFileTable
IsIndexable IsIndexable IsIndexable
IsMemoryOptimized IsMemoryOptimized IsMemoryOptimized
IsNode IsNode IsNode

Whether this table is a node table.

IsPartitioned IsPartitioned IsPartitioned
IsSchemaOwned IsSchemaOwned IsSchemaOwned
IsSystemObject IsSystemObject IsSystemObject
IsSystemVersioned IsSystemVersioned IsSystemVersioned
IsTouched IsTouched IsTouched

Whether the object has been touched for unconditional scripting of Alter

(Inherited from SqlSmoObject)
IsVarDecimalStorageFormatEnabled IsVarDecimalStorageFormatEnabled IsVarDecimalStorageFormatEnabled

Whether decimal data is stored in variable-length fields in the table

Location Location Location
LockEscalation LockEscalation LockEscalation
LowPriorityAbortAfterWait LowPriorityAbortAfterWait LowPriorityAbortAfterWait

Gets or sets the ABORT_AFTER_WAIT action for the WAIT_AT_LOW_PRIORITY option of the DDL operation.

LowPriorityMaxDuration LowPriorityMaxDuration LowPriorityMaxDuration

Gets or sets the MAX_DURATION for the WAIT_AT_LOW_PRIORITY option of the DDL operation.

MaximumDegreeOfParallelism MaximumDegreeOfParallelism MaximumDegreeOfParallelism

Property for setting maximum number of processors that can be used when running rebuild heap

Name Name Name Inherited from TableViewTableTypeBase
ObjectInSpace ObjectInSpace ObjectInSpace Inherited from SqlSmoObject
OnlineHeapOperation OnlineHeapOperation OnlineHeapOperation

Online property for rebuild heap

Owner Owner Owner
Parent Parent Parent
PartitionScheme PartitionScheme PartitionScheme
PartitionSchemeParameters PartitionSchemeParameters PartitionSchemeParameters

Specifies the columns that define the input parameters for the Partition Scheme.

PhysicalPartitions PhysicalPartitions PhysicalPartitions

Collection class instance for the PhysicalPartitions of the table

Properties Properties Properties Inherited from SqlSmoObject
QuotedIdentifierStatus QuotedIdentifierStatus QuotedIdentifierStatus
RejectedRowLocation RejectedRowLocation RejectedRowLocation
RejectSampleValue RejectSampleValue RejectSampleValue
RejectType RejectType RejectType
RejectValue RejectValue RejectValue
RemoteDataArchiveDataMigrationState RemoteDataArchiveDataMigrationState RemoteDataArchiveDataMigrationState
RemoteDataArchiveEnabled RemoteDataArchiveEnabled RemoteDataArchiveEnabled
RemoteDataArchiveFilterPredicate RemoteDataArchiveFilterPredicate RemoteDataArchiveFilterPredicate
RemoteObjectName RemoteObjectName RemoteObjectName
RemoteSchemaName RemoteSchemaName RemoteSchemaName
RemoteTableName RemoteTableName RemoteTableName
RemoteTableProvisioned RemoteTableProvisioned RemoteTableProvisioned
Replicated Replicated Replicated
ResumableIndexes ResumableIndexes ResumableIndexes
RowCount RowCount RowCount
RowCountAsDouble RowCountAsDouble RowCountAsDouble
ScalarResult ScalarResult ScalarResult Inherited from SqlSmoObject
Schema Schema Schema Inherited from TableViewTableTypeBase
ShardingColumnName ShardingColumnName ShardingColumnName
State State State

Returns the state of the object

(Inherited from SmoObjectBase)
Statistics Statistics Statistics Inherited from TableViewBase
SystemTimePeriodEndColumn SystemTimePeriodEndColumn SystemTimePeriodEndColumn
SystemTimePeriodStartColumn SystemTimePeriodStartColumn SystemTimePeriodStartColumn
TemporalType TemporalType TemporalType
TextFileGroup TextFileGroup TextFileGroup
TrackColumnsUpdatedEnabled TrackColumnsUpdatedEnabled TrackColumnsUpdatedEnabled
Triggers Triggers Triggers Inherited from TableViewBase
Urn Urn Urn

Returns the Urn of the object, computed on the fly

(Inherited from SqlSmoObject)
UserData UserData UserData Inherited from SmoObjectBase

Methods

AddDatabaseContext(StringCollection) AddDatabaseContext(StringCollection) AddDatabaseContext(StringCollection)

method get called from the create script related method (from derived classes like Table, Index etc..)

(Inherited from SqlSmoObject)
AddPeriodForSystemTime(String, String, Boolean) AddPeriodForSystemTime(String, String, Boolean) AddPeriodForSystemTime(String, String, Boolean)

Adds period information for the system-versioned temporal table.

Alter() Alter() Alter()
AlterImpl() AlterImpl() AlterImpl() Inherited from SqlSmoObject
AlterImplWorker() AlterImplWorker() AlterImplWorker() Inherited from SqlSmoObject
AlterWithNoCheck() AlterWithNoCheck() AlterWithNoCheck()
AppendCommaText(StringBuilder, String, Boolean, String) AppendCommaText(StringBuilder, String, Boolean, String) AppendCommaText(StringBuilder, String, Boolean, String) Inherited from ScriptNameObjectBase
AppendWithCommaText(StringBuilder, String, Boolean) AppendWithCommaText(StringBuilder, String, Boolean) AppendWithCommaText(StringBuilder, String, Boolean) Inherited from ScriptNameObjectBase
AppendWithOption(StringBuilder, String, String, Boolean) AppendWithOption(StringBuilder, String, String, Boolean) AppendWithOption(StringBuilder, String, String, Boolean) Inherited from ScriptNameObjectBase
AutoGenerateName() AutoGenerateName() AutoGenerateName() Inherited from ScriptNameObjectBase
BindDefaultImpl(String, String, Boolean) BindDefaultImpl(String, String, Boolean) BindDefaultImpl(String, String, Boolean) Inherited from SqlSmoObject
BindRuleImpl(String, String, Boolean) BindRuleImpl(String, String, Boolean) BindRuleImpl(String, String, Boolean) Inherited from SqlSmoObject
ChangeSchema(String) ChangeSchema(String) ChangeSchema(String)
CheckIdentityValue() CheckIdentityValue() CheckIdentityValue()
CheckObjectDirty() CheckObjectDirty() CheckObjectDirty()

If there are some properties which are respected in special cases then use this function. currently applicable for DatabaseDdltriggers

(Inherited from ScriptNameObjectBase)
CheckObjectState() CheckObjectState() CheckObjectState() Inherited from SqlSmoObject
CheckObjectState(Boolean) CheckObjectState(Boolean) CheckObjectState(Boolean)

This is a virtual function, so that derived classes can override it if they want to do additional checks on the state of the object

(Inherited from SqlSmoObject)
CheckObjectStateImpl(Boolean) CheckObjectStateImpl(Boolean) CheckObjectStateImpl(Boolean)

Checks object state Because it is not recusrive, this function can be called directly and which means derived classes can't supply their own validation

(Inherited from SqlSmoObject)
CheckTable() CheckTable() CheckTable()

Tests the integrity of database pages implementing storage for the referenced table and indexes defined on it.

CheckTableDataOnly() CheckTableDataOnly() CheckTableDataOnly()

Tests the integrity of database pages implementing storage for the referenced table

CheckTextCorrectness(String, Boolean, Boolean, Boolean, String[], DdlTextParserHeaderInfo) CheckTextCorrectness(String, Boolean, Boolean, Boolean, String[], DdlTextParserHeaderInfo) CheckTextCorrectness(String, Boolean, Boolean, Boolean, String[], DdlTextParserHeaderInfo)

checks text syntax, that it manipulates the right type of object ( PROC, TRIGGER, etc )

(Inherited from ScriptNameObjectBase)
CheckTextCorrectness(String, Boolean, Boolean, String[], DdlTextParserHeaderInfo) CheckTextCorrectness(String, Boolean, Boolean, String[], DdlTextParserHeaderInfo) CheckTextCorrectness(String, Boolean, Boolean, String[], DdlTextParserHeaderInfo)

checks text syntax, that it manipulates the right type of object ( PROC, TRIGGER, etc )

(Inherited from ScriptNameObjectBase)
CheckTextModeSupport() CheckTextModeSupport() CheckTextModeSupport() Inherited from ScriptNameObjectBase
CleanObject() CleanObject() CleanObject() Inherited from ScriptNameObjectBase
Create() Create() Create()
CreateImpl() CreateImpl() CreateImpl() Inherited from SqlSmoObject
CreateOrAlterImpl() CreateOrAlterImpl() CreateOrAlterImpl() Inherited from SqlSmoObject
Deny(ObjectPermissionSet, String) Deny(ObjectPermissionSet, String) Deny(ObjectPermissionSet, String)
Deny(ObjectPermissionSet, String, Boolean) Deny(ObjectPermissionSet, String, Boolean) Deny(ObjectPermissionSet, String, Boolean)
Deny(ObjectPermissionSet, String, String[]) Deny(ObjectPermissionSet, String, String[]) Deny(ObjectPermissionSet, String, String[])
Deny(ObjectPermissionSet, String, String[], Boolean) Deny(ObjectPermissionSet, String, String[], Boolean) Deny(ObjectPermissionSet, String, String[], Boolean)
Deny(ObjectPermissionSet, String[]) Deny(ObjectPermissionSet, String[]) Deny(ObjectPermissionSet, String[])
Deny(ObjectPermissionSet, String[], Boolean) Deny(ObjectPermissionSet, String[], Boolean) Deny(ObjectPermissionSet, String[], Boolean)
Deny(ObjectPermissionSet, String[], String[]) Deny(ObjectPermissionSet, String[], String[]) Deny(ObjectPermissionSet, String[], String[])
Deny(ObjectPermissionSet, String[], String[], Boolean) Deny(ObjectPermissionSet, String[], String[], Boolean) Deny(ObjectPermissionSet, String[], String[], Boolean)
DisableAllIndexes() DisableAllIndexes() DisableAllIndexes()

Disables all indexes.

Discover() Discover() Discover()

Best Effort Discovery mechanism : This method reflects upon metadata and gets all available objects

(Inherited from SqlSmoObject)
Drop() Drop() Drop()
DropIfExists() DropIfExists() DropIfExists()

Drops the object with IF EXISTS option. If object is invalid for drop function will return without exception.

DropImpl(Boolean) DropImpl(Boolean) DropImpl(Boolean)

drops the object

(Inherited from SqlSmoObject)
DropImplWorker(Urn, Boolean) DropImplWorker(Urn, Boolean) DropImplWorker(Urn, Boolean)

drops the object

(Inherited from SqlSmoObject)
DropPeriodForSystemTime() DropPeriodForSystemTime() DropPeriodForSystemTime()

Drops sytem period from the temporal table

EnableAllIndexes(IndexEnableAction) EnableAllIndexes(IndexEnableAction) EnableAllIndexes(IndexEnableAction)

Enables all indexes. The action argument specifies how enable the index. It is possible to call Create() or Rebuild() on the Index

EnumColumnPermissions() EnumColumnPermissions() EnumColumnPermissions()
EnumColumnPermissions(ObjectPermissionSet) EnumColumnPermissions(ObjectPermissionSet) EnumColumnPermissions(ObjectPermissionSet)
EnumColumnPermissions(String) EnumColumnPermissions(String) EnumColumnPermissions(String)
EnumColumnPermissions(String, ObjectPermissionSet) EnumColumnPermissions(String, ObjectPermissionSet) EnumColumnPermissions(String, ObjectPermissionSet)
EnumForeignKeys() EnumForeignKeys() EnumForeignKeys()

this function enumerates all the ForeignKeys that reference the primary key of this table

EnumFragmentation() EnumFragmentation() EnumFragmentation() Inherited from TableViewBase
EnumFragmentation(FragmentationOption) EnumFragmentation(FragmentationOption) EnumFragmentation(FragmentationOption) Inherited from TableViewBase
EnumFragmentation(FragmentationOption, Int32) EnumFragmentation(FragmentationOption, Int32) EnumFragmentation(FragmentationOption, Int32) Inherited from TableViewBase
EnumLastStatisticsUpdates() EnumLastStatisticsUpdates() EnumLastStatisticsUpdates()
EnumLastStatisticsUpdates(String) EnumLastStatisticsUpdates(String) EnumLastStatisticsUpdates(String)
EnumObjectPermissions() EnumObjectPermissions() EnumObjectPermissions()
EnumObjectPermissions(ObjectPermissionSet) EnumObjectPermissions(ObjectPermissionSet) EnumObjectPermissions(ObjectPermissionSet)
EnumObjectPermissions(String) EnumObjectPermissions(String) EnumObjectPermissions(String)
EnumObjectPermissions(String, ObjectPermissionSet) EnumObjectPermissions(String, ObjectPermissionSet) EnumObjectPermissions(String, ObjectPermissionSet)
EnumScript() EnumScript() EnumScript()
EnumScript(ScriptingOptions) EnumScript(ScriptingOptions) EnumScript(ScriptingOptions)
ExecuteNonQuery(StringCollection, Boolean, Boolean) ExecuteNonQuery(StringCollection, Boolean, Boolean) ExecuteNonQuery(StringCollection, Boolean, Boolean)

Executes sql statements

(Inherited from SqlSmoObject)
ExecuteRenameQuery(String) ExecuteRenameQuery(String) ExecuteRenameQuery(String)

Creates the Rename query for a SqlSmoObject and Executes it on the Server.

(Inherited from NamedSmoObject)
ExecuteWithModes(SqlExecutionModes, Action) ExecuteWithModes(SqlExecutionModes, Action) ExecuteWithModes(SqlExecutionModes, Action)

Executes the given action under the given execution modes.

Resets the original modes after the action completes or fails.

(Inherited from SqlSmoObject)
ForceTextModeOnTextBody() ForceTextModeOnTextBody() ForceTextModeOnTextBody() Inherited from ScriptNameObjectBase
FormatSqlVariant(Object) FormatSqlVariant(Object) FormatSqlVariant(Object) Inherited from SqlSmoObject
GenerateAlterEvent() GenerateAlterEvent() GenerateAlterEvent() Inherited from SqlSmoObject
GenerateAlterEvent(Urn, Object) GenerateAlterEvent(Urn, Object) GenerateAlterEvent(Urn, Object) Inherited from SqlSmoObject
GetBraketNameForText() GetBraketNameForText() GetBraketNameForText() Inherited from ScriptNameObjectBase
GetContextDB() GetContextDB() GetContextDB() Inherited from SqlSmoObject
GetDBName() GetDBName() GetDBName() Inherited from SqlSmoObject
GetFragOptionString(FragmentationOption) GetFragOptionString(FragmentationOption) GetFragOptionString(FragmentationOption) Inherited from SqlSmoObject
GetIsSystemNamed() GetIsSystemNamed() GetIsSystemNamed() Inherited from ScriptNameObjectBase
GetIsTextDirty() GetIsTextDirty() GetIsTextDirty() Inherited from ScriptNameObjectBase
GetPropValue(String) GetPropValue(String) GetPropValue(String)

Retrieve the property value from : - The property bag directly if property is available (dirty or retrieved) - A call to our OnPropertyMissing method otherwise

Will throw an exception if the property value is NULL in either case.

(Inherited from SqlSmoObject)
GetPropValueOptional(String) GetPropValueOptional(String) GetPropValueOptional(String)

Retrieve the property value from : - The property bag if the state is creating or we're in Design Mode (possible NULL value) - A call to our OnPropertyMissing method otherwise (will throw exception if value is NULL)

(Inherited from SqlSmoObject)
GetPropValueOptionalAllowNull(String) GetPropValueOptionalAllowNull(String) GetPropValueOptionalAllowNull(String)

Retrieve the property value from : - The property bag if the state is creating or we're in Design Mode (possible NULL) - A call to our OnPropertyMissing method otherwise (possible NULL)

(Inherited from SqlSmoObject)
GetRealValue(Property, Object) GetRealValue(Property, Object) GetRealValue(Property, Object)

Returns the real value for the property.

(Inherited from SqlSmoObject)
GetRemoteTableMigrationStatistics() GetRemoteTableMigrationStatistics() GetRemoteTableMigrationStatistics()

Get remote table migration statistics. Null if Remote Data Archive is not enabled for table or the remote table provisioning is not complete

GetServerName() GetServerName() GetServerName() Inherited from SqlSmoObject
GetServerObject() GetServerObject() GetServerObject() Inherited from SqlSmoObject
GetSqlServerVersionName() GetSqlServerVersionName() GetSqlServerVersionName()

Gets the sqlserver public name for the current connection, e.g: will transfer "SQLTOOLS2008-2" to "SQL Server 2008".

(Inherited from SqlSmoObject)
GetTextBody() GetTextBody() GetTextBody() Inherited from ScriptNameObjectBase
GetTextBody(Boolean) GetTextBody(Boolean) GetTextBody(Boolean) Inherited from ScriptNameObjectBase
GetTextHeader(Boolean) GetTextHeader(Boolean) GetTextHeader(Boolean) Inherited from ScriptNameObjectBase
GetTextHeader(ScriptNameObjectBase+ScriptHeaderType) GetTextHeader(ScriptNameObjectBase+ScriptHeaderType) GetTextHeader(ScriptNameObjectBase+ScriptHeaderType) Inherited from ScriptNameObjectBase
GetTextMode() GetTextMode() GetTextMode() Inherited from ScriptNameObjectBase
GetTextProperty(String) GetTextProperty(String) GetTextProperty(String)

get the text of the object, if not available, throw apropiate exception based on the State of the object

(Inherited from ScriptNameObjectBase)
GetUrnRecursive(StringBuilder) GetUrnRecursive(StringBuilder) GetUrnRecursive(StringBuilder)

Computes the Urn for the object.

(Inherited from SqlSmoObject)
GetUrnRecursive(StringBuilder, UrnIdOption) GetUrnRecursive(StringBuilder, UrnIdOption) GetUrnRecursive(StringBuilder, UrnIdOption)

Computes the Urn for the object, potentially including other fields in the definition besides the key fields.

(Inherited from SqlSmoObject)
Grant(ObjectPermissionSet, String) Grant(ObjectPermissionSet, String) Grant(ObjectPermissionSet, String)
Grant(ObjectPermissionSet, String, Boolean) Grant(ObjectPermissionSet, String, Boolean) Grant(ObjectPermissionSet, String, Boolean)
Grant(ObjectPermissionSet, String, Boolean, String) Grant(ObjectPermissionSet, String, Boolean, String) Grant(ObjectPermissionSet, String, Boolean, String)
Grant(ObjectPermissionSet, String, String[]) Grant(ObjectPermissionSet, String, String[]) Grant(ObjectPermissionSet, String, String[])
Grant(ObjectPermissionSet, String, String[], Boolean) Grant(ObjectPermissionSet, String, String[], Boolean) Grant(ObjectPermissionSet, String, String[], Boolean)
Grant(ObjectPermissionSet, String, String[], Boolean, String) Grant(ObjectPermissionSet, String, String[], Boolean, String) Grant(ObjectPermissionSet, String, String[], Boolean, String)
Grant(ObjectPermissionSet, String[]) Grant(ObjectPermissionSet, String[]) Grant(ObjectPermissionSet, String[])
Grant(ObjectPermissionSet, String[], Boolean) Grant(ObjectPermissionSet, String[], Boolean) Grant(ObjectPermissionSet, String[], Boolean)
Grant(ObjectPermissionSet, String[], Boolean, String) Grant(ObjectPermissionSet, String[], Boolean, String) Grant(ObjectPermissionSet, String[], Boolean, String)
Grant(ObjectPermissionSet, String[], String[]) Grant(ObjectPermissionSet, String[], String[]) Grant(ObjectPermissionSet, String[], String[])
Grant(ObjectPermissionSet, String[], String[], Boolean) Grant(ObjectPermissionSet, String[], String[], Boolean) Grant(ObjectPermissionSet, String[], String[], Boolean)
Grant(ObjectPermissionSet, String[], String[], Boolean, String) Grant(ObjectPermissionSet, String[], String[], Boolean, String) Grant(ObjectPermissionSet, String[], String[], Boolean, String)
ImplInitialize(String[], OrderBy[]) ImplInitialize(String[], OrderBy[]) ImplInitialize(String[], OrderBy[]) Inherited from SqlSmoObject
Initialize() Initialize() Initialize() Inherited from SqlSmoObject
Initialize(Boolean) Initialize(Boolean) Initialize(Boolean)

Initializes the object, by reading its properties from the enumerator

(Inherited from SqlSmoObject)
IsExpressSku() IsExpressSku() IsExpressSku()

Returns whether the server containing this object is an Express SKU

(Inherited from SqlSmoObject)
IsObjectDirty() IsObjectDirty() IsObjectDirty() Inherited from ScriptNameObjectBase
IsObjectInitialized() IsObjectInitialized() IsObjectInitialized() Inherited from SqlSmoObject
IsObjectInSpace() IsObjectInSpace() IsObjectInSpace() Inherited from SqlSmoObject
IsSupportedProperty(String) IsSupportedProperty(String) IsSupportedProperty(String)

Validate whether the specified property is supported in current server environment

(Inherited from SqlSmoObject)
IsVersion80SP3() IsVersion80SP3() IsVersion80SP3() Inherited from SqlSmoObject
IsVersion90AndAbove() IsVersion90AndAbove() IsVersion90AndAbove() Inherited from SqlSmoObject
MarkDropped() MarkDropped() MarkDropped() Inherited from TableViewTableTypeBase
MarkForDropImpl(Boolean) MarkForDropImpl(Boolean) MarkForDropImpl(Boolean) Inherited from SqlSmoObject
PostAlter() PostAlter() PostAlter()

this function is meant to be overriden by derived classes, if they have to do supplimentary actions after altering the object

(Inherited from SqlSmoObject)
PostCreate() PostCreate() PostCreate()

this function is meant to be overriden by derived classes, if they have to do supplimentary actions after object creation

(Inherited from SqlSmoObject)
PostDrop() PostDrop() PostDrop()

this function is meant to be overriden by derived classes, if they have to do supplimentary actions after dropping the object

(Inherited from SqlSmoObject)
Rebuild() Rebuild() Rebuild()

Rebuild table

Rebuild(Int32) Rebuild(Int32) Rebuild(Int32)

Rebuild particular partition

RebuildIndexes(Int32) RebuildIndexes(Int32) RebuildIndexes(Int32)
RecalculateSpaceUsage() RecalculateSpaceUsage() RecalculateSpaceUsage()
ReCompileReferences() ReCompileReferences() ReCompileReferences() Inherited from TableViewBase
Refresh() Refresh() Refresh() Inherited from TableViewBase
Rename(String) Rename(String) Rename(String)
RenameImpl(String) RenameImpl(String) RenameImpl(String)

change object name

(Inherited from NamedSmoObject)
RenameImplWorker(String) RenameImplWorker(String) RenameImplWorker(String) Inherited from NamedSmoObject
Revoke(ObjectPermissionSet, String) Revoke(ObjectPermissionSet, String) Revoke(ObjectPermissionSet, String)
Revoke(ObjectPermissionSet, String, Boolean, Boolean) Revoke(ObjectPermissionSet, String, Boolean, Boolean) Revoke(ObjectPermissionSet, String, Boolean, Boolean)
Revoke(ObjectPermissionSet, String, Boolean, Boolean, String) Revoke(ObjectPermissionSet, String, Boolean, Boolean, String) Revoke(ObjectPermissionSet, String, Boolean, Boolean, String)
Revoke(ObjectPermissionSet, String, String[]) Revoke(ObjectPermissionSet, String, String[]) Revoke(ObjectPermissionSet, String, String[])
Revoke(ObjectPermissionSet, String, String[], Boolean, Boolean) Revoke(ObjectPermissionSet, String, String[], Boolean, Boolean) Revoke(ObjectPermissionSet, String, String[], Boolean, Boolean)
Revoke(ObjectPermissionSet, String, String[], Boolean, Boolean, String) Revoke(ObjectPermissionSet, String, String[], Boolean, Boolean, String) Revoke(ObjectPermissionSet, String, String[], Boolean, Boolean, String)
Revoke(ObjectPermissionSet, String[]) Revoke(ObjectPermissionSet, String[]) Revoke(ObjectPermissionSet, String[])
Revoke(ObjectPermissionSet, String[], Boolean, Boolean) Revoke(ObjectPermissionSet, String[], Boolean, Boolean) Revoke(ObjectPermissionSet, String[], Boolean, Boolean)
Revoke(ObjectPermissionSet, String[], Boolean, Boolean, String) Revoke(ObjectPermissionSet, String[], Boolean, Boolean, String) Revoke(ObjectPermissionSet, String[], Boolean, Boolean, String)
Revoke(ObjectPermissionSet, String[], String[]) Revoke(ObjectPermissionSet, String[], String[]) Revoke(ObjectPermissionSet, String[], String[])
Revoke(ObjectPermissionSet, String[], String[], Boolean, Boolean) Revoke(ObjectPermissionSet, String[], String[], Boolean, Boolean) Revoke(ObjectPermissionSet, String[], String[], Boolean, Boolean)
Revoke(ObjectPermissionSet, String[], String[], Boolean, Boolean, String) Revoke(ObjectPermissionSet, String[], String[], Boolean, Boolean, String) Revoke(ObjectPermissionSet, String[], String[], Boolean, Boolean, String)
Script() Script() Script() Inherited from TableViewTableTypeBase
Script(ScriptingOptions) Script(ScriptingOptions) Script(ScriptingOptions) Inherited from TableViewTableTypeBase
ScriptImpl() ScriptImpl() ScriptImpl() Inherited from SqlSmoObject
ScriptImpl(ScriptingOptions) ScriptImpl(ScriptingOptions) ScriptImpl(ScriptingOptions)

Returns a StringCollection object with the script for the object. This method throws an error if ScriptData is true

(Inherited from SqlSmoObject)
SetAccessToken(IRenewableToken) SetAccessToken(IRenewableToken) SetAccessToken(IRenewableToken)

Set the accessToken for connection.

(Inherited from SqlSmoObject)
SetCollectionTextMode(Boolean, SmoCollectionBase) SetCollectionTextMode(Boolean, SmoCollectionBase) SetCollectionTextMode(Boolean, SmoCollectionBase) Inherited from ScriptNameObjectBase
SetIsSystemNamed(Boolean) SetIsSystemNamed(Boolean) SetIsSystemNamed(Boolean) Inherited from ScriptNameObjectBase
SetParentImpl(SqlSmoObject) SetParentImpl(SqlSmoObject) SetParentImpl(SqlSmoObject) Inherited from SqlSmoObject
SetSchemaOwned() SetSchemaOwned() SetSchemaOwned() Inherited from NamedSmoObject
SetTextBody(String) SetTextBody(String) SetTextBody(String) Inherited from ScriptNameObjectBase
SetTextHeader(String) SetTextHeader(String) SetTextHeader(String) Inherited from ScriptNameObjectBase
SetTextMode(Boolean, SmoCollectionBase[]) SetTextMode(Boolean, SmoCollectionBase[]) SetTextMode(Boolean, SmoCollectionBase[]) Inherited from ScriptNameObjectBase
SwitchPartition(Int32, Table) SwitchPartition(Int32, Table) SwitchPartition(Int32, Table)

Switches the partition with the partition number sourcePartitionNumber of the current table to the table specified with targetTable. This assumes that the target table is not partitioned.

SwitchPartition(Int32, Table, Int32) SwitchPartition(Int32, Table, Int32) SwitchPartition(Int32, Table, Int32)

Switches the partition with the partition number sourcePartitionNumber of the current table to the partition with the partition number targetPartitionNumber of the table specified with targetTable.

SwitchPartition(Table) SwitchPartition(Table) SwitchPartition(Table)

Switches the current table to the table specified with targetTable.

SwitchPartition(Table, Int32) SwitchPartition(Table, Int32) SwitchPartition(Table, Int32)

Switches the current table to the partition with the partition number targetPartitionNumber of the table specified with targetTable.

SwitchTextMode(Boolean, SmoCollectionBase[]) SwitchTextMode(Boolean, SmoCollectionBase[]) SwitchTextMode(Boolean, SmoCollectionBase[]) Inherited from ScriptNameObjectBase
ThrowIfAboveVersion100(String) ThrowIfAboveVersion100(String) ThrowIfAboveVersion100(String)

Throws an exception if the ServerVersion major version for this object is above 10.0 (SQL 2008)

(Inherited from SqlSmoObject)
ThrowIfAboveVersion80(String) ThrowIfAboveVersion80(String) ThrowIfAboveVersion80(String)

Throws an exception if the ServerVersion major version for this object is above 8.0 (SQL 2000)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion100(String) ThrowIfBelowVersion100(String) ThrowIfBelowVersion100(String)

Throws an exception if the ServerVersion major version for this object is below 10.0 (SQL 2008)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion110(String) ThrowIfBelowVersion110(String) ThrowIfBelowVersion110(String)

Throws an UnsupportedVersionException if either the source or destination server is below 11.0 (SQL 2012)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion110Prop(String) ThrowIfBelowVersion110Prop(String) ThrowIfBelowVersion110Prop(String)

Throws an exception with text saying the specified property is not supported if the ServerVersion major version for this object is below 11.0 (SQL 2012)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion120(String) ThrowIfBelowVersion120(String) ThrowIfBelowVersion120(String)

Throws an exception if the ServerVersion major version for this object is below 12.0 (SQL 2014)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion120Prop(String) ThrowIfBelowVersion120Prop(String) ThrowIfBelowVersion120Prop(String)

Throws an exception with text saying the specified property is not supported if the ServerVersion major version for this object is below 12.0 (SQL 2014)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion130(String) ThrowIfBelowVersion130(String) ThrowIfBelowVersion130(String)

Throws an exception if the ServerVersion major version for this object is below 13.0 (SQL 2016)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion130Prop(String) ThrowIfBelowVersion130Prop(String) ThrowIfBelowVersion130Prop(String)

Throws an exception with text saying the specified property is not supported if the ServerVersion major version for this object is below 13.0 (SQL 2016)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion140(String) ThrowIfBelowVersion140(String) ThrowIfBelowVersion140(String)

Throws an exception if the ServerVersion major version for this object is below 14.0 (SQL 2017)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion140Prop(String) ThrowIfBelowVersion140Prop(String) ThrowIfBelowVersion140Prop(String)

Throws an exception with text saying the specified property is not supported if the ServerVersion major version for this object is below 14.0 (SQL 2017)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion80(String) ThrowIfBelowVersion80(String) ThrowIfBelowVersion80(String)

Throws an exception if the ServerVersion major version for this object is below 8.0 (SQL 2000)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion80SP3() ThrowIfBelowVersion80SP3() ThrowIfBelowVersion80SP3()

Throws an exception if the ServerVersion for this object is below 8.760 (8.0 SP3)

(Inherited from SqlSmoObject)
ThrowIfBelowVersion90(String) ThrowIfBelowVersion90(String) ThrowIfBelowVersion90(String)

Throws an exception if the ServerVersion major version for this object is below 9.0 (SQL 2005)

(Inherited from SqlSmoObject)
ThrowIfTextIsDirtyForAlter() ThrowIfTextIsDirtyForAlter() ThrowIfTextIsDirtyForAlter() Inherited from ScriptNameObjectBase
ToString() ToString() ToString() Inherited from SqlSmoObject
Touch() Touch() Touch()

Mark the object "touched" for unconditional scripting of Alter.

(Inherited from SqlSmoObject)
TouchImpl() TouchImpl() TouchImpl()

Virtual method to allow derived classes to do additional work when touched.

(Inherited from SqlSmoObject)
TruncateData() TruncateData() TruncateData()

Truncate a table

TruncateData(Int32) TruncateData(Int32) TruncateData(Int32)

Truncate a partition of partitioned table with the partition number

UnbindDefaultImpl(Boolean) UnbindDefaultImpl(Boolean) UnbindDefaultImpl(Boolean) Inherited from SqlSmoObject
UnbindRuleImpl(Boolean) UnbindRuleImpl(Boolean) UnbindRuleImpl(Boolean) Inherited from SqlSmoObject
UpdateStatistics() UpdateStatistics() UpdateStatistics()

forces data distribution statistics update for a referenced index or all indexes defined on a SQL Server table.

(Inherited from TableViewBase)
UpdateStatistics(StatisticsTarget, StatisticsScanType) UpdateStatistics(StatisticsTarget, StatisticsScanType) UpdateStatistics(StatisticsTarget, StatisticsScanType)

forces data distribution statistics update for a referenced index or all indexes defined on a SQL Server table.

(Inherited from TableViewBase)
UpdateStatistics(StatisticsTarget, StatisticsScanType, Int32) UpdateStatistics(StatisticsTarget, StatisticsScanType, Int32) UpdateStatistics(StatisticsTarget, StatisticsScanType, Int32)

forces data distribution statistics update for a referenced index or all indexes defined on a SQL Server table.

(Inherited from TableViewBase)
UpdateStatistics(StatisticsTarget, StatisticsScanType, Int32, Boolean) UpdateStatistics(StatisticsTarget, StatisticsScanType, Int32, Boolean) UpdateStatistics(StatisticsTarget, StatisticsScanType, Int32, Boolean)

forces data distribution statistics update for a referenced index or all indexes defined on a SQL Server table.

(Inherited from TableViewBase)
Validate(String, Object[]) Validate(String, Object[]) Validate(String, Object[]) Inherited from SmoObjectBase

Explicit Interface Implementations

IAlienObject.Discover() IAlienObject.Discover() IAlienObject.Discover() Inherited from SqlSmoObject
IAlienObject.GetDomainRoot() IAlienObject.GetDomainRoot() IAlienObject.GetDomainRoot() Inherited from SqlSmoObject
IAlienObject.GetParent() IAlienObject.GetParent() IAlienObject.GetParent() Inherited from SqlSmoObject
IAlienObject.GetPropertyType(String) IAlienObject.GetPropertyType(String) IAlienObject.GetPropertyType(String)

Discovers type of property.

(Inherited from SqlSmoObject)
IAlienObject.GetPropertyValue(String, Type) IAlienObject.GetPropertyValue(String, Type) IAlienObject.GetPropertyValue(String, Type)

Retrieves value for a given property. Throws if property is not found.

(Inherited from SqlSmoObject)
IAlienObject.GetUrn() IAlienObject.GetUrn() IAlienObject.GetUrn() Inherited from SqlSmoObject
IAlienObject.Resolve(String) IAlienObject.Resolve(String) IAlienObject.Resolve(String) Inherited from SqlSmoObject
IAlienObject.SetObjectState(SfcObjectState) IAlienObject.SetObjectState(SfcObjectState) IAlienObject.SetObjectState(SfcObjectState)

Sets state of this object based on provided SfcObjectState.

(Inherited from SqlSmoObject)
IAlienObject.SetPropertyValue(String, Type, Object) IAlienObject.SetPropertyValue(String, Type, Object) IAlienObject.SetPropertyValue(String, Type, Object)

Sets the value of given property, if it is writable. If property is not in property bag, reflection is used. Throws exception if the property is not found.

(Inherited from SqlSmoObject)
ISfcPropertyProvider.GetPropertySet() ISfcPropertyProvider.GetPropertySet() ISfcPropertyProvider.GetPropertySet() Inherited from SqlSmoObject
ISfcSupportsDesignMode.IsDesignMode ISfcSupportsDesignMode.IsDesignMode ISfcSupportsDesignMode.IsDesignMode

This object extend ISfcSupportsDesignMode.

Fields

m_ExtendedProperties m_ExtendedProperties m_ExtendedProperties Inherited from SqlSmoObject
singletonParent singletonParent singletonParent

Regular SMO objects access the parent class reference through parentColl (corresponding collection in parent class). Singleton class has no collection in parent.

(Inherited from SqlSmoObject)

Events

PropertyChanged PropertyChanged PropertyChanged Inherited from SqlSmoObject
PropertyMetadataChanged PropertyMetadataChanged PropertyMetadataChanged Inherited from SqlSmoObject

Applies to