Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Microsoft.SqlServer.Management.Dmf Namespace

The Microsoft.SqlServer.Management.Dmf namespace contains classes that represent the SQL Server policy-based management objects. 

The top-level instance is the PolicyStore class, which proves the connection to the instance of SQL Server. The other : Policy, Condition, PolicyGroupSubscription, PolicyCategory, Facets.

The DMF objects can be used to create and manage policies that control the behavior and configuration of an instance of SQL Server. All behavior and configurations are represented by facets. The Microsoft.SqlServer.Management.Facets namespace contains the objects that represent the repository of facets used when defining policies. Policies are used when defining a DAC package using the DAC objects. This enables you control policies when installing a database application structure stored in the DAC package onto an instance of SQL Server. The specified policies determine the instances of SQL Server in the SQL Fabric to which the DAC package can be deployed.

A policy is the result of applying a condition to one of more target object. The condition is a facet combined with a state of behavior, for example, Database Mail is the facet and whether it is installed or not is the state. So, specifying that Database Mail must be installed is a condition. You can create a target set of objects by applying a filter. Then, apply the condition to the target object set to make a policy.

The Microsoft.SqlServer.Management.Dmf namespace resides in the Microsoft.SqlServer.Dmf.dll file. Additionally, some supporting objects are in the Microsoft.SqlServer.DmfSqlClrWrapper.dll and Microsoft.SqlServer.Dmf.Adapters.dll files. You will have to import these files to access the classes in the Microsoft.SqlServer.Management.Dmf namespace.

By using the Microsoft.SqlServer.Management.Dmf namespace, you can do the following:

  • Create, read, update and delete policies, target objects, conditions, filters and subscriptions.

  • Script out the DMF objects associated with the connection.

  • Define a target object set by using a filter.

  • Extract the existing configuration state from an instance of SQL Server and create a policy.

  • Export and import DMF objects.

  • Assign a policy to a set of target objects.

  • Evaluate a policy.

  • Have target subscribe to policy.

  ClassDescription
Public classAdapterAlreadyExistsExceptionThe AdapterAlreadyExistsException class is an exception that is raised when an attempt is made to retrieve a collection that is not available.
Public classAdapterWrongNumberOfArgumentsExceptionThe AdapterWrongNumberOfArgumentsException class is an exception that is raised when the adapter receives the wrong number of arguments.
Public classAssemblyAlreadyRegisteredExceptionThe AssemblyAlreadyRegistered class is an exception that is raised when an the adapter receives the wrong number of arguments.
Public classBadEventDataExceptionThe BadEventDataException class is an exception that is raised when the event data is incorrect.
Public classBadExpressionTreeExceptionThe BadExpressionTreeException class is an exception that is raised when the expression tree is incorrect.
Public classConditionThe Condition object represents a policy-based management condition.
Public classCondition.KeyThe Condition.Key class represents the key that identifies the Condition class.
Public classConditionCollectionThe ConditionCollection class represents a collection of Condition objects that represent all the conditions in the policy store.
Public classConditionExtenderThe ConditionExtender class is an exception that is raised when the expression tree is incorrect.
Public classConflictingPropertyValuesExceptionThe ConflictingPropertyValuesException class is an exception that is raised when property values conflict.
Public classConnectionEvaluationHistoryThe ConnectionEvaluationHistory object represents information about parent policy evaluation that is stored in the system catalogs.
Public classConnectionEvaluationHistory.KeyThe ConnectionEvaluationHistory.Key class represents the key that is used to identify the ConnectionEvaluationHistory class.
Public classConnectionEvaluationHistoryCollectionThe ConnectionEvaluationHistoryCollection class represents a collection of ConnectionEvaluationHistory objects that represent all the connection evaluation histories that are in the evaluation history.
Public classConversionNotSupportedExceptionThe ConversionNotSupportedException class is an exception that is raised when an unsupported conversion is attempted on a type.
Public classDmfExceptionThe DmfException class represents a generic policy-based management exception.
Public classEvaluationDetailThe EvaluationDetail object represents the evaluation information that is stored in the system catalogs about the parent policy for a given target.
Public classEvaluationDetail.KeyThe EvaluationDetail.Key class represents the key that is used to identify the EvaluationDetail class.
Public classEvaluationDetailCollectionThe EvaluationDetailCollection class represents a collection of EvaluationDetail objects that represent all the detail rows that are in the evaluation.
Public classEvaluationFactoryRepresents the evaluation factory in policy-based management services.
Public classEvaluationHistoryThe EvaluationHistory object represents information about parent policy evaluation that is stored in the system catalogs.
Public classEvaluationHistory.KeyThe EvaluationHistory.Key class represents the key that identifies the EvaluationHistory class.
Public classEvaluationHistoryCollectionThe EvaluationHistoryCollection class represents a collection of EvaluationHistory objects that represent all evaluation histories that are in the policy store.
Public classExpressionNodeThe ExpressionNode object represents a policy-based management expression node. The expression node describes part of an expression, such as a constant value, an operator, or a function.
Public classExpressionNodeAttributeThe ExpressionNodeAttribute object represents an attribute of a policy-based management expression node.
Public classExpressionNodeChildrenThe ExpressionNodeChildren object represents the child expression nodes that are dependent on an expression node.
Public classExpressionNodeConfigurationExceptionThe ExpressionNodeConfigurationException class is an exception that is raised when the adapter receives the wrong number of arguments.
Public classExpressionNodeConstantThe ExpressionNodeConstant object represents an constant value that is used in an expression.
Public classExpressionNodeFunctionThe ExpressionNodeFunction object represents part of a policy-based management expression that is a function.
Public classExpressionNodeGroupThe ExpressionNodeGroup object represents an expression node that is a group.
Public classExpressionNodeNotConfigurableExceptionThe ExpressionNodeNotConfigurableException class is an exception that is raised when the expression node cannot be configured.
Public classExpressionNodeNotConfigurableOperatorExceptionThe ExpressionNodeNotConfigurableOperatorException class is an exception that is raised if the operator cannot configure the expression node.
Public classExpressionNodeOperatorThe ExpressionNodeOperator object represents an expression node that is an operator.
Public classExpressionSerializationExceptionThe ExpressionSerializationException class is an exception that is raised when an the adapter receives the wrong number of arguments.
Public classExpressionTypeMistmatchExceptionThe ExpressionTypeMismatchException class is an exception that is raised when the types in the expression do not match.
Public classFacetInfoThe FacetInfo object represents facet information. A facet represents a logical dimension of a target object and is used, together with a local expression, to build a condition.
Public classFacetInfoCollectionThe FacetInfoCollection class represents a collection of FacetInfo objects that represent all facets on the instance of SQL Server.
Public classFailedOperationExceptionThe FailedOperationException class is an exception that is raised when a policy-based management operation fails.
Public classFunctionBadDatePartExceptionThe FunctionBadDatePartException class is an exception that is raised when the date that is supplied to the function is not the correct format.
Public classFunctionNoServerExceptionThe FunctionNoServerException class is an exception that is raised when the server is not recognized.
Public classFunctionNotASmoObjectExceptionThe FunctionNotASmoObjectException class is an exception that is raised when the function encounters an unsupported object.
Public classFunctionTooManyColumnsExceptionThe FunctionTooManyColumnsException class is an exception that is raised when the function has too many columns.
Public classFunctionWrongArgumentsNumberExceptionThe FunctionWrongArgumentsNumberException class is an exception that is raised when the function receives the incorrect number of arguments.
Public classFunctionWrongArgumentTypeExceptionThe FunctionWrongArgumentTypeException class is an exception that is raised when the function receives an argument that is the incorrect type.
Public classFunctionWrongReturnTypeExceptionThe FunctionWrongReturnTypeException class is an exception that is raised when the specified return type is not the same as the type that is returned by the function.
Public classInvalidInOperatorExceptionThe InvalidInOperatorException class is an exception that is raised when the operator is not valid.
Public classInvalidOperandExceptionThe InvalidOperandException class is an exception that is raised when an operand is encountered that is not valid.
Public classMissingJobScheduleExceptionThe MissingJobScheduleException class is an exception that is raised when there in no job schedule.
Public classMissingObjectExceptionThe MissingObjectException class is an exception that is raised when a specified object is missing.
Public classMissingPropertyExceptionThe MissingPropertyException class is an exception that is raised when a specified property is missing.
Public classMissingTypeFacetAssociationExceptionThe MissingTypeFacetAssociationException class is an exception that is raised when a specified association between a facet and a type is missing.
Public classNonConfigurableReadOnlyPropertyExceptionThe NonConfigurableReadOnlyPropertyException class is an exception that is raised when there is an attempt to configure a read-only property.
Public classNonRetrievablePropertyExceptionThe NonRetrievablePropertyException class is an exception that is raised when a property cannot be retrieved.
Public classNoTargetSetEnabledExceptionThe NoTargetSetEnabledException class is an exception that is raised when the target set has not been enabled.
Public classNullFacetExceptionThe NullFacetException class is an exception that is raised when the facet is not set.
Public classObjectAlreadyExistsExceptionThe ObjectAlreadyExistsException class is an exception that is raised when an attempt to create an object that already exists is made.
Public classObjectSetThe ObjectSet object represents a policy-based management set of objects.
Public classObjectSet.KeyThe ObjectSet.Key class represents the key that identifies the ObjectSet class.
Public classObjectSetCollectionThe ObjectSetCollection class represents a collection of ObjectSet objects that represent all the object sets in the policy store.
Public classObjectValidationExceptionThe ObjectValidationException class is an exception that is raised when an object encounters an error during validation.
Public classOperatorNotApplicableExceptionThe OperatorNotApplicableException class is an exception that is raised when an operator does not have the appropriate permissions.
Public classPolicyThe Policy object represents a Policy-Based Management policy. A policy represents the relationship between a target object and a condition.
Public classPolicy.ConnectionProcessingFinishedEventArgsRepresents the arguments that are passed to the event handler when the connection processing is finished.
Public classPolicy.ConnectionProcessingStartedEventArgsRepresents the arguments that are passed to the event handler when the connection processing has started.
Public classPolicy.KeyThe Policy.Key class represents the key that identifies each instance of the Policy class.
Public classPolicy.PolicyEvaluationFinishedEventArgsRepresents the arguments that are passed to the event handler when the evaluation of a policy finishes.
Public classPolicy.TargetProcessedEventArgsRepresents the arguments that are passed to the event handler when the target is processed.
Public classPolicyCategoryRepresents a category that classifies policies in SQL Server Policy-Based Management. Policy Categories are used to group policies together to which target objects can subscribe.
Public classPolicyCategory.KeyThe PolicyCategory.Key class represents the key that identifies the PolicyCategory class.
Public classPolicyCategoryCollectionThe PolicyCategoryCollection class represents a collection of PolicyCategory objects that represent all policy categories in the policy store.
Public classPolicyCategoryInformationContains information about the policy category in policy-based management services.
Public classPolicyCategorySubscriptionThe PolicyCategorySubscription object represents a subscription to a particular policy category.
Public classPolicyCategorySubscription.KeyThe PolicyCategorySubscription.Key class represents the key that identifies the PolicyCategorySubscription class.
Public classPolicyCategorySubscriptionCollectionThe PolicyCategorySubscriptionCollection class represents a collection of PolicyCategorySubscription objects that represent all policy category subscriptions that are in the policy store.
Public classPolicyCollectionThe PolicyCollection class represents a collection of Policy objects that represent all policies in the policy store.
Public classPolicyEvaluationExceptionThe PolicyEvaluationException class is an exception that is raised when an error occurs during the evaluation of a policy.
Public classPolicyEvaluationResultsWriterRepresents the XML writer that records the policy evaluation history in Policy-Based Management.
Public classPolicyEvaluationWrapperRepresents a wrapper class for the policy evaluation.
Public classPolicyExtenderContains additional functionality for the Policy object.
Public classPolicyStoreThe PolicyStore type is the root of the DMF object model.
Public classPolicyStore.KeyThe PolicyStore.Key class represents the key that identifies each instance of the PolicyStore class.
Public classPolicyStoreUpgradeSessionRepresents a policy store upgrade session.
Public classPostConfigurationActionAttributeRepresents a set post configuration action attributes.
Public classRestartPendingExceptionThe RestartPendingException class represents the exception that is raised when a system restart is pending.
Public classRestartPendingException<T>The RestartPendingException class is an exception that is raised when an error occurs when a system restart is pending.
Public classStringPropertyTooLongExceptionThe StringPropertyTooLongException class is an exception that is raised when the string that is assigned to a property is too long.
Public classTargetEvaluationRepresents the target evaluation in policy-based management services.
Public classTargetSetThe TargetSet object represents a policy-based Management target set that holds information about levels, the condition for each level, and the target types.
Public classTargetSet.KeyThe TargetSet.Key class represents the key that identifies the TargetSet class.
Public classTargetSetCollectionThe TargetSetCollectionCollection class represents a collection of TargetSet objects that represent all the policies in the policy store.
Public classTargetSetCountMismatchExceptionThe TargetSetCountMismatchException class is an exception that is raised when the target set and facet counts do not match.
Public classTargetSetLevelRepresents the target set level in policy-based management services.
Public classTargetSetLevel.KeyThe TargetSetLevel.Key class represents the key that identifies the TargetSetLevel class.
Public classTargetSetLevelCollectionThe TargetSetLevelCollection class represents a collection of TargetSetLevel objects that represent all target set levels in the target set.
Public classTypeConversionExceptionThe TypeConversionException class is an exception that is raised when a type conversion error occurs.
Public classUnsupportedObjectTypeExceptionThe UnsupportedObjectTypeException class is an exception that is raised when an error occurs when the policy encounters an unsupported object.
Public classUnsupportedTargetSetForFacetExceptionThe UnsupportedTargetSetForFacetException class is an exception that is raised when an error occurs when the target set is not supported by the facet.
Public classUnsupportedTypeExceptionThe UnsupportedTypeException class is an exception that is raised when an unsupported type is encountered.
Public classUtilsRepresents a utility class that is used in policy-based management services.
  DelegateDescription
Public delegatePolicy.ConnectionProcessingFinishedEventHandlerThe Policy.ConnectionProcessingFinishedEventHandler class represents the event handler that handles the event that occurs when the processing of the connection has finished.
Public delegatePolicy.ConnectionProcessingStartedEventHandlerThe Policy.ConnectionProcessingStartedEventHandler class represents the event handler that handles the event that occurs when the processing of a connection has started.
Public delegatePolicy.PolicyEvaluationFinishedEventHandlerRepresents the arguments that are passed to the event handler when a policy evaluation finishes.
Public delegatePolicy.PolicyEvaluationStartedEventHandlerThe PolicyEvaluationStartedEventHandler class represents the event handler that handles the event that occurs when the evaluation of a policy has started.
Public delegatePolicy.TargetProcessedEventHandlerThe TargetProcessedEventHandler class represents the event handler that handles the event that occurs when the target has been processed.
  EnumerationDescription
Public enumerationAdHocPolicyEvaluationModeThe AdHocPolicyEvaluationMode enumeration contains values that specify the method that is used to evaluate the policy.
Public enumerationAutomatedPolicyEvaluationModeThe AutomatedPolicyEvaluationMode enumeration contains values that specify the Policy-Based Management automated policy evaluation modes.
Public enumerationDmfExceptionTypeThe DmfExceptionType enumeration contains values that are used to specify the policy-based management exception types.
Public enumerationExpressionNodeFunction.FunctionThe ExpressionNodeFunction.Function enumeration contains values that represent the different types of supported functions.
Public enumerationExpressionNodeTypeThe ExpressionNodeType enumeration contains values that specify the type of expression node.
Public enumerationExpressionSerializationException.ReaderActionTypeRepresents the reader action type that is associated with the serialization. Do not reference this member directly in your code. It supports the SQL Server infrastructure.
Public enumerationImportPolicyEnabledStateThe ImportPolicyEnabledState enumeration contains values that are used to specify the state of the import policy.
Public enumerationNameConditionTypeThe NameConditionType enumeration contains values that are used to specify the condition that is used in a policy.
Public enumerationOperatorTypeThe OperatorType enumeration contains values that are used to specify the type of operator.
Public enumerationPolicyEffectiveStateThe PolicyEffectiveState enumeration contains values that are used to specify the effectiveness of the policy.
Public enumerationPolicyHealthStateThe PolicyHealthState enumeration contains values that specify the health state of the policy.
Public enumerationPolicyStore.EnumerationModeSpecifies the enumeration mode for the PolicyStore object.
Public enumerationPostConfigurationActionThe PostConfigurationAction enumeration contains values that specify the action to take after configuration finishes.
Public enumerationTypeClassThe TypeClass enumeration contains values that describe the different class types.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.