Espace de noms Microsoft.SqlServer.Management.Dmf

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.

  ClasseDescription
Classe publiqueAdapterAlreadyExistsExceptionThe AdapterAlreadyExistsException class is an exception that is raised when an attempt is made to retrieve a collection that is not available.
Classe publiqueAdapterWrongNumberOfArgumentsExceptionThe AdapterWrongNumberOfArgumentsException class is an exception that is raised when the adapter receives the wrong number of arguments.
Classe publiqueAssemblyAlreadyRegisteredExceptionThe AssemblyAlreadyRegistered class is an exception that is raised when an the adapter receives the wrong number of arguments.
Classe publiqueBadEventDataExceptionThe BadEventDataException class is an exception that is raised when the event data is incorrect.
Classe publiqueBadExpressionTreeExceptionThe BadExpressionTreeException class is an exception that is raised when the expression tree is incorrect.
Classe publiqueConditionThe Condition object represents a policy-based management condition.
Classe publiqueCondition..::..KeyThe Condition..::..Key class represents the key that identifies the Condition class.
Classe publiqueConditionCollectionThe ConditionCollection class represents a collection of Condition objects that represent all the conditions in the policy store.
Classe publiqueConditionExtenderThe ConditionExtender class is an exception that is raised when the expression tree is incorrect.
Classe publiqueConflictingPropertyValuesExceptionThe ConflictingPropertyValuesException class is an exception that is raised when property values conflict.
Classe publiqueConnectionEvaluationHistoryThe ConnectionEvaluationHistory object represents information about parent policy evaluation that is stored in the system catalogs.
Classe publiqueConnectionEvaluationHistory..::..KeyThe ConnectionEvaluationHistory..::..Key class represents the key that is used to identify the ConnectionEvaluationHistory class.
Classe publiqueConnectionEvaluationHistoryCollectionThe ConnectionEvaluationHistoryCollection class represents a collection of ConnectionEvaluationHistory objects that represent all the connection evaluation histories that are in the evaluation history.
Classe publiqueConversionNotSupportedExceptionThe ConversionNotSupportedException class is an exception that is raised when an unsupported conversion is attempted on a type.
Classe publiqueDmfExceptionThe DmfException class represents a generic policy-based management exception.
Classe publiqueEvaluationDetailThe EvaluationDetail object represents the evaluation information that is stored in the system catalogs about the parent policy for a given target.
Classe publiqueEvaluationDetail..::..KeyThe EvaluationDetail..::..Key class represents the key that is used to identify the EvaluationDetail class.
Classe publiqueEvaluationDetailCollectionThe EvaluationDetailCollection class represents a collection of EvaluationDetail objects that represent all the detail rows that are in the evaluation.
Classe publiqueEvaluationFactoryRepresents the evaluation factory in policy-based management services.
Classe publiqueEvaluationHistoryThe EvaluationHistory object represents information about parent policy evaluation that is stored in the system catalogs.
Classe publiqueEvaluationHistory..::..KeyThe EvaluationHistory..::..Key class represents the key that identifies the EvaluationHistory class.
Classe publiqueEvaluationHistoryCollectionThe EvaluationHistoryCollection class represents a collection of EvaluationHistory objects that represent all evaluation histories that are in the policy store.
Classe publiqueExpressionNodeThe 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.
Classe publiqueExpressionNodeAttributeThe ExpressionNodeAttribute object represents an attribute of a policy-based management expression node.
Classe publiqueExpressionNodeChildrenThe ExpressionNodeChildren object represents the child expression nodes that are dependent on an expression node.
Classe publiqueExpressionNodeConfigurationExceptionThe ExpressionNodeConfigurationException class is an exception that is raised when the adapter receives the wrong number of arguments.
Classe publiqueExpressionNodeConstantThe ExpressionNodeConstant object represents an constant value that is used in an expression.
Classe publiqueExpressionNodeFunctionThe ExpressionNodeFunction object represents part of a policy-based management expression that is a function.
Classe publiqueExpressionNodeGroupThe ExpressionNodeGroup object represents an expression node that is a group.
Classe publiqueExpressionNodeNotConfigurableExceptionThe ExpressionNodeNotConfigurableException class is an exception that is raised when the expression node cannot be configured.
Classe publiqueExpressionNodeNotConfigurableOperatorExceptionThe ExpressionNodeNotConfigurableOperatorException class is an exception that is raised if the operator cannot configure the expression node.
Classe publiqueExpressionNodeOperatorThe ExpressionNodeOperator object represents an expression node that is an operator.
Classe publiqueExpressionSerializationExceptionThe ExpressionSerializationException class is an exception that is raised when an the adapter receives the wrong number of arguments.
Classe publiqueExpressionTypeMistmatchExceptionThe ExpressionTypeMismatchException class is an exception that is raised when the types in the expression do not match.
Classe publiqueFacetInfoThe 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.
Classe publiqueFacetInfoCollectionThe FacetInfoCollection class represents a collection of FacetInfo objects that represent all facets on the instance of SQL Server.
Classe publiqueFailedOperationExceptionThe FailedOperationException class is an exception that is raised when a policy-based management operation fails.
Classe publiqueFunctionBadDatePartExceptionThe FunctionBadDatePartException class is an exception that is raised when the date that is supplied to the function is not the correct format.
Classe publiqueFunctionNoServerExceptionThe FunctionNoServerException class is an exception that is raised when the server is not recognized.
Classe publiqueFunctionNotASmoObjectExceptionThe FunctionNotASmoObjectException class is an exception that is raised when the function encounters an unsupported object.
Classe publiqueFunctionTooManyColumnsExceptionThe FunctionTooManyColumnsException class is an exception that is raised when the function has too many columns.
Classe publiqueFunctionWrongArgumentsNumberExceptionThe FunctionWrongArgumentsNumberException class is an exception that is raised when the function receives the incorrect number of arguments.
Classe publiqueFunctionWrongArgumentTypeExceptionThe FunctionWrongArgumentTypeException class is an exception that is raised when the function receives an argument that is the incorrect type.
Classe publiqueFunctionWrongReturnTypeExceptionThe 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.
Classe publiqueInvalidInOperatorExceptionThe InvalidInOperatorException class is an exception that is raised when the operator is not valid.
Classe publiqueInvalidOperandExceptionThe InvalidOperandException class is an exception that is raised when an operand is encountered that is not valid.
Classe publiqueMissingJobScheduleExceptionThe MissingJobScheduleException class is an exception that is raised when there in no job schedule.
Classe publiqueMissingObjectExceptionThe MissingObjectException class is an exception that is raised when a specified object is missing.
Classe publiqueMissingPropertyExceptionThe MissingPropertyException class is an exception that is raised when a specified property is missing.
Classe publiqueMissingTypeFacetAssociationExceptionThe MissingTypeFacetAssociationException class is an exception that is raised when a specified association between a facet and a type is missing.
Classe publiqueNonConfigurableReadOnlyPropertyExceptionThe NonConfigurableReadOnlyPropertyException class is an exception that is raised when there is an attempt to configure a read-only property.
Classe publiqueNonRetrievablePropertyExceptionThe NonRetrievablePropertyException class is an exception that is raised when a property cannot be retrieved.
Classe publiqueNoTargetSetEnabledExceptionThe NoTargetSetEnabledException class is an exception that is raised when the target set has not been enabled.
Classe publiqueNullFacetExceptionThe NullFacetException class is an exception that is raised when the facet is not set.
Classe publiqueObjectAlreadyExistsExceptionThe ObjectAlreadyExistsException class is an exception that is raised when an attempt to create an object that already exists is made.
Classe publiqueObjectSetThe ObjectSet object represents a policy-based management set of objects.
Classe publiqueObjectSet..::..KeyThe ObjectSet..::..Key class represents the key that identifies the ObjectSet class.
Classe publiqueObjectSetCollectionThe ObjectSetCollection class represents a collection of ObjectSet objects that represent all the object sets in the policy store.
Classe publiqueObjectValidationExceptionThe ObjectValidationException class is an exception that is raised when an object encounters an error during validation.
Classe publiqueOperatorNotApplicableExceptionThe OperatorNotApplicableException class is an exception that is raised when an operator does not have the appropriate permissions.
Classe publiquePolicyThe Policy object represents a Policy-Based Management policy. A policy represents the relationship between a target object and a condition.
Classe publiquePolicy..::..ConnectionProcessingFinishedEventArgsRepresents the arguments that are passed to the event handler when the connection processing is finished.
Classe publiquePolicy..::..ConnectionProcessingStartedEventArgsRepresents the arguments that are passed to the event handler when the connection processing has started.
Classe publiquePolicy..::..KeyThe Policy..::..Key class represents the key that identifies each instance of the Policy class.
Classe publiquePolicy..::..PolicyEvaluationFinishedEventArgsRepresents the arguments that are passed to the event handler when the evaluation of a policy finishes.
Classe publiquePolicy..::..TargetProcessedEventArgsRepresents the arguments that are passed to the event handler when the target is processed.
Classe publiquePolicyCategoryRepresents 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.
Classe publiquePolicyCategory..::..KeyThe PolicyCategory..::..Key class represents the key that identifies the PolicyCategory class.
Classe publiquePolicyCategoryCollectionThe PolicyCategoryCollection class represents a collection of PolicyCategory objects that represent all policy categories in the policy store.
Classe publiquePolicyCategoryInformationContains information about the policy category in policy-based management services.
Classe publiquePolicyCategorySubscriptionThe PolicyCategorySubscription object represents a subscription to a particular policy category.
Classe publiquePolicyCategorySubscription..::..KeyThe PolicyCategorySubscription..::..Key class represents the key that identifies the PolicyCategorySubscription class.
Classe publiquePolicyCategorySubscriptionCollectionThe PolicyCategorySubscriptionCollection class represents a collection of PolicyCategorySubscription objects that represent all policy category subscriptions that are in the policy store.
Classe publiquePolicyCollectionThe PolicyCollection class represents a collection of Policy objects that represent all policies in the policy store.
Classe publiquePolicyEvaluationExceptionThe PolicyEvaluationException class is an exception that is raised when an error occurs during the evaluation of a policy.
Classe publiquePolicyEvaluationResultsWriterRepresents the XML writer that records the policy evaluation history in Policy-Based Management.
Classe publiquePolicyEvaluationWrapperRepresents a wrapper class for the policy evaluation.
Classe publiquePolicyExtenderContains additional functionality for the Policy object.
Classe publiquePolicyStoreThe PolicyStore type is the root of the DMF object model.
Classe publiquePolicyStore..::..KeyThe PolicyStore..::..Key class represents the key that identifies each instance of the PolicyStore class.
Classe publiquePolicyStoreUpgradeSessionRepresents a policy store upgrade session.
Classe publiquePostConfigurationActionAttributeRepresents a set post configuration action attributes.
Classe publiqueRestartPendingExceptionThe RestartPendingException class represents the exception that is raised when a system restart is pending.
Classe publiqueRestartPendingException<(Of <(<'T>)>)>The RestartPendingException class is an exception that is raised when an error occurs when a system restart is pending.
Classe publiqueStringPropertyTooLongExceptionThe StringPropertyTooLongException class is an exception that is raised when the string that is assigned to a property is too long.
Classe publiqueTargetEvaluationRepresents the target evaluation in policy-based management services.
Classe publiqueTargetSetThe TargetSet object represents a policy-based Management target set that holds information about levels, the condition for each level, and the target types.
Classe publiqueTargetSet..::..KeyThe TargetSet..::..Key class represents the key that identifies the TargetSet class.
Classe publiqueTargetSetCollectionThe TargetSetCollectionCollection class represents a collection of TargetSet objects that represent all the policies in the policy store.
Classe publiqueTargetSetCountMismatchExceptionThe TargetSetCountMismatchException class is an exception that is raised when the target set and facet counts do not match.
Classe publiqueTargetSetLevelRepresents the target set level in policy-based management services.
Classe publiqueTargetSetLevel..::..KeyThe TargetSetLevel..::..Key class represents the key that identifies the TargetSetLevel class.
Classe publiqueTargetSetLevelCollectionThe TargetSetLevelCollection class represents a collection of TargetSetLevel objects that represent all target set levels in the target set.
Classe publiqueTypeConversionExceptionThe TypeConversionException class is an exception that is raised when a type conversion error occurs.
Classe publiqueUnsupportedObjectTypeExceptionThe UnsupportedObjectTypeException class is an exception that is raised when an error occurs when the policy encounters an unsupported object.
Classe publiqueUnsupportedTargetSetForFacetExceptionThe UnsupportedTargetSetForFacetException class is an exception that is raised when an error occurs when the target set is not supported by the facet.
Classe publiqueUnsupportedTypeExceptionThe UnsupportedTypeException class is an exception that is raised when an unsupported type is encountered.
Classe publiqueUtilsRepresents a utility class that is used in policy-based management services.

  DéléguéDescription
Délégué publicPolicy..::..ConnectionProcessingFinishedEventHandlerThe Policy..::..ConnectionProcessingFinishedEventHandler class represents the event handler that handles the event that occurs when the processing of the connection has finished.
Délégué publicPolicy..::..ConnectionProcessingStartedEventHandlerThe Policy..::..ConnectionProcessingStartedEventHandler class represents the event handler that handles the event that occurs when the processing of a connection has started.
Délégué publicPolicy..::..PolicyEvaluationFinishedEventHandlerReprésente les arguments passés au gestionnaire d'événements à la fin de l'évaluation d'une stratégie.
Délégué publicPolicy..::..PolicyEvaluationStartedEventHandlerThe PolicyEvaluationStartedEventHandler class represents the event handler that handles the event that occurs when the evaluation of a policy has started.
Délégué publicPolicy..::..TargetProcessedEventHandlerThe TargetProcessedEventHandler class represents the event handler that handles the event that occurs when the target has been processed.

  ÉnumérationDescription
Énumération publiqueAdHocPolicyEvaluationModeThe AdHocPolicyEvaluationMode enumeration contains values that specify the method that is used to evaluate the policy.
Énumération publiqueAutomatedPolicyEvaluationModeThe AutomatedPolicyEvaluationMode enumeration contains values that specify the Policy-Based Management automated policy evaluation modes.
Énumération publiqueDmfExceptionTypeThe DmfExceptionType enumeration contains values that are used to specify the policy-based management exception types.
Énumération publiqueExpressionNodeFunction..::..FunctionThe ExpressionNodeFunction..::..Function enumeration contains values that represent the different types of supported functions.
Énumération publiqueExpressionNodeTypeThe ExpressionNodeType enumeration contains values that specify the type of expression node.
Énumération publiqueExpressionSerializationException..::..ReaderActionTypeRepresents the reader action type that is associated with the serialization. Ne référencez pas directement ce membre dans votre code. Il prend en charge l'infrastructure SQL Server.
Énumération publiqueImportPolicyEnabledStateL'énumération ImportPolicyEnabledState contient les valeurs utilisées pour spécifier l'état de la stratégie d'importation.
Énumération publiqueNameConditionTypeThe NameConditionType enumeration contains values that are used to specify the condition that is used in a policy.
Énumération publiqueOperatorTypeThe OperatorType enumeration contains values that are used to specify the type of operator.
Énumération publiquePolicyEffectiveStateThe PolicyEffectiveState enumeration contains values that are used to specify the effectiveness of the policy.
Énumération publiquePolicyHealthStateThe PolicyHealthState enumeration contains values that specify the health state of the policy.
Énumération publiquePolicyStore..::..EnumerationModeSpecifies the enumeration mode for the PolicyStore object.
Énumération publiquePostConfigurationActionThe PostConfigurationAction enumeration contains values that specify the action to take after configuration finishes.
Énumération publiqueTypeClassThe TypeClass enumeration contains values that describe the different class types.

Ajouts de la communauté

AJOUTER
Afficher: