Export (0) Print
Expand All

SqlSmoObject Class

The SqlSmoObject object represents all SQL Server objects.

System.Object
  Microsoft.SqlServer.Management.Smo.SmoObjectBase
    Microsoft.SqlServer.Management.Smo.SqlSmoObject
      More...

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

[TypeConverterAttribute(typeof(LocalizableTypeConverter))]
public abstract class SqlSmoObject : SmoObjectBase, 
	ISfcPropertyProvider, ISfcNotifyPropertyMetadataChanged, INotifyPropertyChanged, IRefreshable, IAlienObject

The SqlSmoObject type exposes the following members.

  NameDescription
Protected methodSqlSmoObjectInitializes a new instance of the SqlSmoObject class.
Top

  NameDescription
Protected propertyExecuteForScalarGets or sets the Boolean property value that specifies whether the object is set to the execute for scalar option.
Protected propertyIsTouchedGets the Boolean property value that specifies whether the object properties have been updated but not yet persisted on the server.
Protected propertyObjectInSpaceGets the Boolean property value that specifies whether the object exists in isolation, or whether it is directly or indirectly connected to the instance of SQL Server.
Public propertyPropertiesGets a collection of Property objects that represent the object properties.
Protected propertyScalarResultGets the scalar result for the referenced object.
Public propertyStateGets the state of the referenced object. (Inherited from SmoObjectBase.)
Public propertyUrnGets the Uniform Resource Name (URN) address value that uniquely identifies the object.
Public propertyUserDataGets or sets user-defined data associated with the referenced object. (Inherited from SmoObjectBase.)
Top

  NameDescription
Protected methodAddDatabaseContext(StringCollection)Add the database context to the collection of queries identified by the queries parameter.
Protected methodAddDatabaseContext(StringCollection, ScriptingOptions)Add the database context to the collection of queries identified by the queries parameter, and using the specified scripting options.
Protected methodAlterImplActivates the object altered event.
Protected methodAlterImplFinishMethod called when object altered event finishes.
Protected methodAlterImplInitMethod called when object-altered event is intialized.
Protected methodAlterImplWorkerCalls the Alter methods.
Protected methodBindDefaultImplBinds the default items identified by the parameters.
Protected methodBindRuleImplBinds the rule schema to the rule and columns identified by the parameters.
Protected methodCheckCollationChecks the order of the scripting options by the collation method identified by the collationName parameter.
Protected methodCheckObjectState()Validates the state of the referenced object.
Protected methodCheckObjectState(Boolean)Validates the state of the referenced object with the option to specify that an exception is thrown if the object is not yet created.
Protected methodCheckObjectStateImplChecks the state of a SqlSmoObject.
Protected methodCheckVersion100Checks whether version of SQL Server is SQL Server 2008.
Protected methodCheckVersion80Checks the validity of the object on SQL Server 2000.
Protected methodCheckVersion80SP3Checks the validity of the object on SQL Server 2000 SP3.
Protected methodCheckVersion90Check the validity of the object on SQL Server 2005.
Protected methodCheckVersionBelow90Checks whether version of SQL Server is before SQL Server 2005.
Protected methodCleanObjectSets the object to unmodified state.
Protected methodCreateImplCreates an object with scripting options.
Protected methodCreateImplFinishMethod called when the create event finishes.
Protected methodCreateImplInitMethod called when the create event initializes.
Public methodDiscoverDiscovers a list of type Object.
Protected methodDropImplDrops a SqlSmoObject.
Protected methodDropImplWorkerCalls the drop methods.
Protected methodEnumScriptImplEnumerates scripts specified by the so parameter.
Protected methodEnumScriptImplWorkerCalls the methods that enumerate scripts specified by the so parameter.
Protected methodEnumScriptImplWorkerSOChangedReturns an IEnumerable string describing the scripting options for an object.
Public methodEquals (Inherited from Object.)
Protected methodExecuteNonQueryExecutes a batch in the context of the database where there are no results returned.
Protected methodFinalize (Inherited from Object.)
Protected methodFormatSqlVariantFormats an object as SqlVariant type.
Protected methodGenerateDataSpaceFileStreamScriptGenerates a script to create data file.
Protected methodGenerateDataSpaceScriptGenerates a script to allocate space in the data file.
Protected methodGetBindDefaultScriptGets the script that binds defaults specified by the defSchema and defName parameters.
Protected methodGetBindRuleScriptGets the script that specifies the binding rules.
Protected methodGetBoolParameter(StringBuilder, ScriptingOptions, String, String, Int32)Assigns a Boolean parameter of the SqlSmoObject.
Protected methodGetBoolParameter(StringBuilder, ScriptingOptions, String, String, Int32, Boolean)Assigns a Boolean property of the SqlSmoObject.
Public methodStatic memberGetChildTypeGets the type of a child element.
Protected methodGetDateTimeParameterAssigns the datetime property of the SqlSmoObject.
Protected methodGetDateTimeParameterAsIntAssigns the datetime property of the SqlSmoObject as an integer value if the datetime property is not null.
Protected methodGetDBNameGets the database name that is associated with the object.
Protected methodGetEnumParameterAssigns an enumeration property of the SqlSmoObject.
Protected methodGetFragOptionStringGets a FragmentationOption object as a string value.
Protected methodGetGuidParameterAssigns a Guid property of the SqlSmoObject.
Public methodGetHashCode (Inherited from Object.)
Protected methodGetParameter(StringBuilder, ScriptingOptions, String, String, Int32)Assigns a parameter of the SqlSmoObject.
Protected methodGetParameter(StringBuilder, ScriptingOptions, String, String, Int32, Boolean)Assigns a parameter of the SqlSmoObject.
Protected methodGetPropValueGets a property value of the SqlSmoObject object.
Protected methodGetPropValueOptionalGets a property value of the SqlSmoObject object.
Protected methodGetPropValueOptionalAllowNullGets a property value of the SqlSmoObject object.
Protected methodGetRealValueGets a property value of the SqlSmoObject object.
Protected methodGetScriptingOptionsForCreateGets ScriptingOptions for the SqlSmoObject object.
Protected methodGetServerNameGets the name of the instance of SQL Server with which the object is associated.
Protected methodGetServerObjectGets the server of the SqlSmoObject object.
Protected methodGetSqlServerVersionNameGets the version name of the instance of SQL Server with which the object is associated.
Protected methodGetStringParameter(StringBuilder, ScriptingOptions, String, String, Int32)Assigns a string parameter of the SqlSmoObject object.
Protected methodGetStringParameter(StringBuilder, ScriptingOptions, String, String, Int32, Boolean)Assigns a string parameter of the SqlSmoObject object.
Protected methodGetTimeSpanParameterAsIntAssigns a time span parameter of the SqlSmoObject object.
Public methodGetType (Inherited from Object.)
Public methodStatic memberGetTypeFromUrnSkeletonGets the type from the Urn object specified by the parameter.
Protected methodGetUrnRecursive(StringBuilder)Assigns an Urn object of the SqlSmoObject object.
Protected methodGetUrnRecursive(StringBuilder, UrnIdOption)Assigns an Urn object of the SqlSmoObject object.
Protected methodImplInitializeInitializes the fields of the SqlSmoObject object.
Public methodInitialize()Initializes the object and forces the properties be loaded.
Public methodInitialize(Boolean)Initializes the object and forces the properties be loaded.
Protected methodStatic memberIsCollectionDirtyDetermines whether any object in the SqlSmoObject collection has been modified.
Protected methodIsObjectDirtyVerifies whether the object properties have been modified and the changes have not yet been persisted on the instance of SQL Server.
Protected methodIsObjectInitializedVerifies whether the object has been initialized.
Protected methodIsObjectInSpaceVerifies whether the object is isolated or connected to the instance of SQL Server.
Protected methodIsVersion80SP3Determines whether the version of SQL Server is SQL Server 2000 with SP3.
Protected methodIsVersion90AndAboveDetermines whether the version of SQL Server is SQL Server 2005 or later.
Protected methodMarkDroppedSets the SqlSmoState to dropped.
Protected methodMarkForDropImplSets the SqlSmoState to dropped.
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodPostAlterMethod activated after the SqlSmoObject is altered.
Protected methodPostCreateMethod activated after the SqlSmoObject is created.
Protected methodPostDropMethod activated after the SqlSmoObject is dropped.
Public methodRefreshRefreshes the object and retrieves properties when the object is next accessed.
Protected methodScriptAlterAlters the SqlSmoObject according to the parameters.
Protected methodScriptCreateAlters the SqlSmoObject according to the parameters.
Protected methodScriptDdlThrows InvalidSmoOperationException.
Protected methodScriptDropThrows InvalidSmoOperationException.
Protected methodScriptImpl()Gets a collection of scripts of the SqlSmoObject.
Protected methodScriptImpl(ScriptingOptions)Gets a collection of scripts of the SqlSmoObject.
Protected methodScriptImplWorkerGets a collection of scripts of the SqlSmoObject.
Protected methodSetParentImplSets the parent of the SqlSmoObject to the newParent parameter.
Public methodToStringReturns a String that represents the referenced object. (Overrides Object.ToString().)
Protected methodTouchImplNot implemented.
Protected methodStatic memberTraceTraces the object.
Protected methodUnbindDefaultImplUnbinds the default columns of the SqlSmoObject.
Protected methodUnbindRuleImplUnbinds rules of the SqlSmoObject.
Protected methodStatic memberUpdateCollectionState2Updates the collection state of the SqlSmoObject.
Public methodValidateValidates the state of an object. (Inherited from SmoObjectBase.)
Top

  NameDescription
Public eventPropertyChangedRepresents the event that occurs when a property is changed.
Public eventPropertyMetadataChangedRepresents the event that occurs when property metadata changes.
Top

  NameDescription
Protected fieldm_ExtendedPropertiesRepresents a property that is defined to extend the properties provided by a SqlSmoObject.
Protected fieldsingletonParentRepresents the singleton parent.
Top

  NameDescription
Explicit interface implemetationPrivate methodIAlienObject.DiscoverDiscovers any dependencies. Do not reference this member directly in your code. It supports the SQL Server infrastructure.
Explicit interface implemetationPrivate methodIAlienObject.GetDomainRootReturns the root of the domain.
Explicit interface implemetationPrivate methodIAlienObject.GetParentGets the parent of this object. Do not reference this member directly in your code. It supports the SQL Server infrastructure.
Explicit interface implemetationPrivate methodIAlienObject.GetPropertyTypeGets the type of the specified property.
Explicit interface implemetationPrivate methodIAlienObject.GetPropertyValueGets the value of the specified property.
Explicit interface implemetationPrivate methodIAlienObject.GetUrnGets the Unified Resource Name of the object. Do not reference this member directly in your code. It supports the SQL Server infrastructure.
Explicit interface implemetationPrivate methodIAlienObject.ResolveGets the instance that contains the information about the object from the Unified Resource Name of the object.
Explicit interface implemetationPrivate methodIAlienObject.SetObjectStateSets the object state to the specified SfcObjectState value.
Explicit interface implemetationPrivate methodIAlienObject.SetPropertyValueSets the property value.
Explicit interface implemetationPrivate methodISfcPropertyProvider.GetPropertySetGets the interface reference to the set of properties of this object. Do not reference this member directly in your code. It supports the SQL Server infrastructure.
Top

The SqlSmoObject is a generic object that is used to referenced objects that are not of a specified type. The SqlSmoObject is also used as a base class.

Thread Safety

Any public static (Shared in Microsoft Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe. 

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft