Partager via


Classe SqlSmoObject

The SqlSmoObject object represents all SQL Server objects.

Hiérarchie d'héritage

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

Espace de noms :  Microsoft.SqlServer.Management.Smo
Assembly :  Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)

Syntaxe

'Déclaration
<TypeConverterAttribute(GetType(LocalizableTypeConverter))> _
Public MustInherit Class SqlSmoObject _
    Inherits SmoObjectBase _
    Implements ISfcPropertyProvider, ISfcNotifyPropertyMetadataChanged, INotifyPropertyChanged, IRefreshable,  _
    IAlienObject
'Utilisation
Dim instance As SqlSmoObject
[TypeConverterAttribute(typeof(LocalizableTypeConverter))]
public abstract class SqlSmoObject : SmoObjectBase, 
    ISfcPropertyProvider, ISfcNotifyPropertyMetadataChanged, INotifyPropertyChanged, IRefreshable, IAlienObject
[TypeConverterAttribute(typeof(LocalizableTypeConverter))]
public ref class SqlSmoObject abstract : public SmoObjectBase, 
    ISfcPropertyProvider, ISfcNotifyPropertyMetadataChanged, INotifyPropertyChanged, IRefreshable, IAlienObject
[<AbstractClassAttribute>]
[<TypeConverterAttribute(typeof(LocalizableTypeConverter))>]
type SqlSmoObject =  
    class 
        inherit SmoObjectBase 
        interface ISfcPropertyProvider 
        interface ISfcNotifyPropertyMetadataChanged 
        interface INotifyPropertyChanged 
        interface IRefreshable 
        interface IAlienObject 
    end
public abstract class SqlSmoObject extends SmoObjectBase implements ISfcPropertyProvider, ISfcNotifyPropertyMetadataChanged, INotifyPropertyChanged, IRefreshable, IAlienObject

Le type SqlSmoObject expose les membres suivants.

Constructeurs

  Nom Description
Méthode protégée SqlSmoObject Initializes a new instance of the SqlSmoObject class.

Haut de la page

Propriétés

  Nom Description
Propriété protégée ExecuteForScalar Gets or sets the Boolean property value that specifies whether the object is set to the execute for scalar option.
Propriété protégée IsTouched Gets the Boolean property value that specifies whether the object properties have been updated but not yet persisted on the server.
Propriété protégée ObjectInSpace Gets 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.
Propriété publique Properties Gets a collection of Property objects that represent the object properties.
Propriété protégée ScalarResult Gets the scalar result for the referenced object.
Propriété publique State Gets the state of the referenced object. (hérité de SmoObjectBase.)
Propriété publique Urn Gets the Uniform Resource Name (URN) address value that uniquely identifies the object.
Propriété publique UserData Gets or sets user-defined data associated with the referenced object. (hérité de SmoObjectBase.)

Haut de la page

Méthodes

  Nom Description
Méthode protégée AddDatabaseContext Add the database context to the collection of queries identified by the queries parameter.
Méthode protégée AlterImpl Activates the object altered event.
Méthode protégée AlterImplWorker Calls the Alter methods.
Méthode protégée BindDefaultImpl Binds the default items identified by the parameters.
Méthode protégée BindRuleImpl Binds the rule schema to the rule and columns identified by the parameters.
Méthode protégée CheckObjectState() Validates the state of the referenced object.
Méthode protégée CheckObjectState(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.
Méthode protégée CheckObjectStateImpl Checks the state of a SqlSmoObject.
Méthode protégée CheckVersion100 Checks whether version of SQL Server is SQL Server 2008.
Méthode protégée CheckVersion110() Checks whether version of SQL Server is SQL Server 2012.
Méthode protégée CheckVersion110(String) Checks whether the version of SQL Server is SQL Server 2012 with the specified name.
Méthode protégée CheckVersion80 Checks the validity of the object on SQL Server 2000.
Méthode protégée CheckVersion80SP3 Checks the validity of the object on SQL Server 2000 SP3.
Méthode protégée CheckVersion90 Check the validity of the object on SQL Server 2005.
Méthode protégée CheckVersionBelow110 Checks whether version of SQL Server is before SQL Server 2012.
Méthode protégée CheckVersionBelow90 Checks whether version of SQL Server is before SQL Server 2005.
Méthode protégée CleanObject Sets the object to its unmodified state.
Méthode protégée CreateImpl Creates an object with scripting options.
Méthode publique Discover Discovers a list of type Object.
Méthode protégée DropImpl Drops a SqlSmoObject.
Méthode protégée DropImplWorker Calls the drop methods.
Méthode publique Equals (hérité de Object.)
Méthode protégée ExecuteNonQuery Executes a batch of statements that does not return a result set.
Méthode protégée Finalize (hérité de Object.)
Méthode protégée FormatSqlVariant Formats an object as SqlVariant type.
Méthode protégée GenerateAlterEvent() Generates the alter event with the specified value.
Méthode protégée GenerateAlterEvent(Urn, Object) Generates alter event with the specified URN and inner object value.
Méthode publiqueMembre statique GetChildType Gets the type of a child element.
Méthode protégée GetContextDB Gets the context database that is associated with this object.
Méthode protégée GetDBName Gets the database name that is associated with the object.
Méthode protégée GetFragOptionString Gets a FragmentationOption object as a string value.
Méthode publique GetHashCode (hérité de Object.)
Méthode protégée GetPropValue Gets a property value of the SqlSmoObject object.
Méthode protégée GetPropValueOptional Gets a property value of the SqlSmoObject object.
Méthode protégée GetPropValueOptionalAllowNull Gets a property value of the SqlSmoObject object.
Méthode protégée GetRealValue Gets a property value of the SqlSmoObject object.
Méthode protégée GetServerName Gets the name of the instance of SQL Server with which the object is associated.
Méthode protégée GetServerObject Gets the server of the SqlSmoObject object.
Méthode protégée GetSqlServerVersionName Gets the version name of the instance of SQL Server with which the object is associated.
Méthode publique GetType (hérité de Object.)
Méthode publiqueMembre statique GetTypeFromUrnSkeleton Gets the type from the Urn object specified by the parameter.
Méthode protégée GetUrnRecursive(StringBuilder) Assigns an Urn object of the SqlSmoObject object.
Méthode protégée GetUrnRecursive(StringBuilder, UrnIdOption) Assigns an Urn object of the SqlSmoObject object.
Méthode protégée ImplInitialize Initializes the fields of the SqlSmoObject object.
Méthode publique Initialize() Initializes the object and forces the properties be loaded.
Méthode publique Initialize(Boolean) Initializes the object and forces the properties be loaded.
Méthode protégéeMembre statique IsCollectionDirty Determines whether any object in the SqlSmoObject collection has been modified.
Méthode protégée IsObjectDirty Verifies whether the object properties have been modified and the changes have not yet been persisted on the instance of SQL Server.
Méthode protégée IsObjectInitialized Verifies whether the object has been initialized.
Méthode protégée IsObjectInSpace Verifies whether the object is isolated or connected to the instance of SQL Server.
Méthode protégée IsVersion80SP3 Determines whether the version of SQL Server is SQL Server 2000 with SP3.
Méthode protégée IsVersion90AndAbove Determines whether the version of SQL Server is SQL Server 2005 or later.
Méthode protégée MarkDropped Sets the SqlSmoState to dropped.
Méthode protégée MarkForDropImpl Sets the SqlSmoState for drop operation.
Méthode protégée MemberwiseClone (hérité de Object.)
Méthode protégée PostAlter The method that is activated after the SqlSmoObject is altered.
Méthode protégée PostCreate The method that is activated after the SqlSmoObject is created.
Méthode protégée PostDrop The method that is activated after the SqlSmoObject is dropped.
Méthode publique Refresh Refreshes the object and retrieves properties when the object is next accessed.
Méthode protégée ScriptImpl() Gets a collection of scripts of the SqlSmoObject.
Méthode protégée ScriptImpl(ScriptingOptions) Gets a collection of scripts of the SqlSmoObject.
Méthode protégée SetParentImpl Sets the parent of the SqlSmoObject to the newParent parameter.
Méthode publique ToString Returns a String that represents the referenced object. (remplace Object.ToString().)
Méthode protégée TouchImpl Not implemented.
Méthode protégéeMembre statique Trace Traces the object.
Méthode protégée UnbindDefaultImpl Unbinds the default columns of the SqlSmoObject.
Méthode protégée UnbindRuleImpl Unbinds rules of the SqlSmoObject.
Méthode protégéeMembre statique UpdateCollectionState2 Updates the collection state of the SqlSmoObject.
Méthode publique Validate Validates the state of an object. (hérité de SmoObjectBase.)

Haut de la page

Événements

  Nom Description
Événement public PropertyChanged Represents the event that occurs when a property is changed.
Événement public PropertyMetadataChanged Represents the event that occurs when property metadata changes.

Haut de la page

Champs

  Nom Description
Champ protégé m_ExtendedProperties Represents a property that is defined to extend the properties provided by a SqlSmoObject.
Champ protégé singletonParent Represents the singleton parent.

Haut de la page

Implémentations d'interfaces explicites

  Nom Description
Implémentation d'interface expliciteMéthode privée IAlienObject.Discover Discovers any dependencies. Ne faites pas directement référence à ce membre dans votre code. Il prend en charge l'infrastructure SQL Server.
Implémentation d'interface expliciteMéthode privée IAlienObject.GetDomainRoot Returns the root of the domain.
Implémentation d'interface expliciteMéthode privée IAlienObject.GetParent Gets the parent of this object. Ne faites pas directement référence à ce membre dans votre code. Il prend en charge l'infrastructure SQL Server.
Implémentation d'interface expliciteMéthode privée IAlienObject.GetPropertyType Gets the type of the specified property.
Implémentation d'interface expliciteMéthode privée IAlienObject.GetPropertyValue Gets the value of the specified property.
Implémentation d'interface expliciteMéthode privée IAlienObject.GetUrn Gets the Unified Resource Name (URN) of the object. Ne faites pas directement référence à ce membre dans votre code. Il prend en charge l'infrastructure SQL Server.
Implémentation d'interface expliciteMéthode privée IAlienObject.Resolve Gets the instance that contains the information about the object from the Unified Resource Name (URN) of the object.
Implémentation d'interface expliciteMéthode privée IAlienObject.SetObjectState Sets the object state to the specified SfcObjectState value.
Implémentation d'interface expliciteMéthode privée IAlienObject.SetPropertyValue Sets the property value.
Implémentation d'interface expliciteMéthode privée ISfcPropertyProvider.GetPropertySet Gets the interface reference to the set of properties of this object.

Haut de la page

Notes

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

Tout membre statique public (Partagé dans Microsoft Visual Basic) de ce type est sûr dans le cadre des opérations à plusieurs threads. Tous les membres de l'instance ne sont pas garantis comme étant thread-safe.  

Sécurité des threads

Tous les membres publics static (Shared dans Visual Basic) de ce type sont thread-safe. Tous les membres de l'instance ne sont pas garantis comme étant thread-safe.

Voir aussi

Référence

Espace de noms Microsoft.SqlServer.Management.Smo

Hiérarchie d'héritage

System.Object
  Microsoft.SqlServer.Management.Smo.SmoObjectBase
    Microsoft.SqlServer.Management.Smo.SqlSmoObject
      Microsoft.SqlServer.Management.Smo.Agent.JobServer
      Microsoft.SqlServer.Management.Smo.AvailabilityGroupListenerIPAddress
      Microsoft.SqlServer.Management.Smo.Broker.ServiceBroker
      Microsoft.SqlServer.Management.Smo.DatabaseActiveDirectory
      Microsoft.SqlServer.Management.Smo.DatabaseEncryptionKey
      Microsoft.SqlServer.Management.Smo.DatabaseOptions
      Microsoft.SqlServer.Management.Smo.DatabaseReplicaState
      Microsoft.SqlServer.Management.Smo.EndpointPayload
      Microsoft.SqlServer.Management.Smo.EndpointProtocol
      Microsoft.SqlServer.Management.Smo.FullTextIndex
      Microsoft.SqlServer.Management.Smo.Information
      Microsoft.SqlServer.Management.Smo.Mail.SqlMail
      Microsoft.SqlServer.Management.Smo.MasterKey
      Microsoft.SqlServer.Management.Smo.MessageObjectBase
      Microsoft.SqlServer.Management.Smo.NamedSmoObject
      Microsoft.SqlServer.Management.Smo.PhysicalPartition
      Microsoft.SqlServer.Management.Smo.ResourceGovernor
      Microsoft.SqlServer.Management.Smo.Server
      Microsoft.SqlServer.Management.Smo.ServerActiveDirectory
      Microsoft.SqlServer.Management.Smo.ServerProxyAccount
      Microsoft.SqlServer.Management.Smo.ServiceMasterKey
      Microsoft.SqlServer.Management.Smo.Settings
      Microsoft.SqlServer.Management.Smo.UserOptions