ManagedInstance Class

The ManagedInstance type represents an instance of SQL Server that is managed by the SQL Server Utility services to control policy, and deployments.

Inheritance Hierarchy

System.Object
  Microsoft.SqlServer.Management.Sdk.Sfc.SfcInstance
    Microsoft.SqlServer.Management.Utility.ManagedInstance

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

Syntax

'Declaration
Public Class ManagedInstance _
    Inherits SfcInstance _
    Implements ISfcCreatable, ICreatable, ISfcDroppable, IDroppable
'Usage
Dim instance As ManagedInstance
public class ManagedInstance : SfcInstance, 
    ISfcCreatable, ICreatable, ISfcDroppable, IDroppable
public ref class ManagedInstance : public SfcInstance, 
    ISfcCreatable, ICreatable, ISfcDroppable, IDroppable
type ManagedInstance =  
    class 
        inherit SfcInstance 
        interface ISfcCreatable 
        interface ICreatable 
        interface ISfcDroppable 
        interface IDroppable 
    end
public class ManagedInstance extends SfcInstance implements ISfcCreatable, ICreatable, ISfcDroppable, IDroppable

The ManagedInstance type exposes the following members.

Constructors

  Name Description
Public method ManagedInstance Initializes a new instance of the ManagedInstance class.

Top

Properties

  Name Description
Protected property AbstractIdentityKey Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public property AgentProxyAccount Gets the SQL Server Agent proxy account used to run scheduled jobs on the instance of SQL Server.
Public property BackupDirectory Gets the backup directory for the server instance.
Public property CacheDirectory Gets the cache directory where temporary files can be stored during deployment onto the instance of SQL Server.
Public property Collation Gets the collation for the server instance.
Public property ComputerNamePhysicalNetBIOS Gives the physical NetBIOS for the server instance.
Public property ComputerProcessorHealthState Gets the computer processor health state.
Public property ContainsOverUtilizedDatabases Gets a value that indicates whether the server instance contains an over utilized databases.
Public property ContainsOverUtilizedVolumes Gets a value that indicates whether the server instance contains an over utilized volumes.
Public property ContainsUnderUtilizedDatabases Gets a value that indicates whether the server instance contains an under utilized databases.
Public property ContainsUnderUtilizedVolumes Gets a value that indicates whether the server instance contains an under utilized volumes.
Public property CpuMaxClockSpeed Gets the maximum clock speed of the CPU.
Public property CpuName Gets the name of the CPU.
Public property DateCreated Gets the time and date when the ManagedInstance object was created.
Public property Edition Gets the edition of the instance of SQL Server.
Public property EngineEdition Gets the engine edition for the instance of SQL Server.
Public property FileSpaceHealthState Gets the file space health state.
Public property ID Gets ID value that uniquely identifies the managed instance of SQL Server.
Public property IdentityKey Gets the key value that identifies the managed instance.
Public property InstanceName Gets the name of the instance of SQL Server.
Public property IsCaseSensitive Gets a value that indicates whether the server instance is case-sensitive.
Public property IsClustered Gets a value that indicates whether the server instance is part of a clustered server.
Public property IsPolicyOverridden Gets a value that indicates whether any of the server instance policies have been overridden.
Public property Language Gets the language used by the managed instance of SQL Server.
Public property LastReportedTime Gets the latest reported time for the properties of the server instance object.
Public property ManagementState Gets the current state of instance of SQL Server with regard to being managed by the SQL Server Utility service.
Public property Metadata Returns metadata about the instance and its domain. (Inherited from SfcInstance.)
Public property Name Gets or sets the name of the managed instance.
Public property NetName Gets the NetBIOS name of the network on which the server instance is running.
Public property OSVersion Gets the operating system version of the managed instance of SQL Server.
Public property Parent Gets or sets the Utility object that is the parent of the ManagedInstance object.
Public property PhysicalMemory Gets the physical memory of the managed instance of SQL Server.
Public property Processors Gets the number of processors for the managed instance of SQL Server.
Public property ProductLevel Gets the product level of the server instance.
Public property Properties Returns a collection instance properties. (Inherited from SfcInstance.)
Protected property PropertyStorageProvider Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public property ServerProcessorHealthState Gets the server instance processor health state.
Public property ServerType Gets the type of the server instance.
Public property ServerUrn Gets the uniform resource name (URN) of the server instance.
Protected property State Returns the state of the SfcInstance object. (Inherited from SfcInstance.)
Public property Urn Returns the uniform resource name of the SfcInstance object. (Inherited from SfcInstance.)
Public property Version Specifies the version of the server instance.
Public property VolumeSpaceHealthState Gets the volume space health state.

Top

Methods

  Name Description
Protected method AlterImpl Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected method CheckObjectCreated Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected method CheckObjectState Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected method CreateIdentityKey Creates an SfcKey object. (Overrides SfcInstance.CreateIdentityKey().)
Protected method CreateImpl Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public method Discover Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected method DropImpl Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Protected method GetChildCollection Throws a UtilityException. There is no such collection. (Overrides SfcInstance.GetChildCollection(String).)
Public method GetDomain Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public method GetHashCode (Inherited from Object.)
Public methodStatic member GetObjectFactory Gets the factory object used to create new instances.
Public method GetPropertySet Returns the set of properties for the SfcInstance object. (Inherited from SfcInstance.)
Public method GetType (Inherited from Object.)
Protected method GetTypeMetadataImpl Indicates the domains that override by returning the right TypeMetadata class directly. Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected method InitializeUIPropertyState Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected method MarkForDropImpl Returns a value that indicates the existing objects to be dropped. Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected method MarkRootAsConnected Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected method MemberwiseClone (Inherited from Object.)
Protected method MoveImpl Indicates the new parent object to move in an instance. Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected method OnPropertyMetadataChanges Invoked whenever the effective value of any SfcInstance metadata is updated. (Inherited from SfcInstance.)
Protected method OnPropertyValueChanges Invoked whenever the effective value of any SfcInstance property is updated. (Inherited from SfcInstance.)
Protected method PostAlter Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected method PostCreate Sets the ID property of the base type to the execution result. (Overrides SfcInstance.PostCreate(Object).)
Protected method PostDrop Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected method PostMove Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected method PostRename Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public method Refresh Refreshes the object's properties by reading them from the server. (Inherited from SfcInstance.)
Public method Remove Gets the parent SqlStoreConnection object.
Protected method RenameImpl Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected method ResetKey Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public method Serialize Serializes the instance to XML. (Inherited from SfcInstance.)
Public method ToString Returns a string representation of the instance Urn. (Inherited from SfcInstance.)
Protected method UpdateUIPropertyState Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected method Validate Indicates the basic child object's validation. Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)

Top

Events

  Name Description
Protected event propertyChanged Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public event PropertyChanged CLS-compliant event for property changes. (Inherited from SfcInstance.)
Protected event propertyMetadataChanged Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public event PropertyMetadataChanged CLS-compliant event for property metadata changes. (Inherited from SfcInstance.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method ICreatable.Create Tests whether the state is managed and creates a server and connection if in the managed state.
Explicit interface implemetationPrivate method IDroppable.Drop Tests whether state is managed and drops the instance if it is managed.
Explicit interface implemetationPrivate method ISfcCreatable.ScriptCreate Creates an ISfcScript object.
Explicit interface implemetationPrivate method ISfcDroppable.ScriptDrop Drops an ISfcScript object.

Top

Remarks

The Managed instance object represents an instance of SQL Server that is included in the group of computers managed by SQL Server Utility services. Using the ManagedObject object, you can:

  • Determine the agent proxy account that runs scheduled jobs on the instance of SQL Server.

  • Determine the cache directory where temporary files are stored during a deployment.

  • Determine the management state of the instance of SQL Server.

  • Stop managing the instance of SQL Server and remove it from the SQL Server Utility.

Thread Safety

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

See Also

Reference

Microsoft.SqlServer.Management.Utility Namespace