PolicyStore.ImportPolicy Method
Imports a single policy and its associated condition from the given XML reader into the policy store.
Namespace: Microsoft.SqlServer.Management.Dmf
Assembly: Microsoft.SqlServer.Dmf (in microsoft.sqlserver.dmf.dll)
Syntax
'Deklaracja
Public Function ImportPolicy ( _
xmlReader As XmlReader, _
importEnabledState As ImportPolicyEnabledState, _
overwriteExistingPolicy As Boolean, _
overwriteExistingCondition As Boolean _
) As Policy
public Policy ImportPolicy (
XmlReader xmlReader,
ImportPolicyEnabledState importEnabledState,
bool overwriteExistingPolicy,
bool overwriteExistingCondition
)
public:
Policy^ ImportPolicy (
XmlReader^ xmlReader,
ImportPolicyEnabledState importEnabledState,
bool overwriteExistingPolicy,
bool overwriteExistingCondition
)
public Policy ImportPolicy (
XmlReader xmlReader,
ImportPolicyEnabledState importEnabledState,
boolean overwriteExistingPolicy,
boolean overwriteExistingCondition
)
public function ImportPolicy (
xmlReader : XmlReader,
importEnabledState : ImportPolicyEnabledState,
overwriteExistingPolicy : boolean,
overwriteExistingCondition : boolean
) : Policy
Parameters
- xmlReader
An XmlReader object that specifies the XML reader.
- importEnabledState
An ImportPolicyEnabledState value that specifies whether the import policy is enabled.
- overwriteExistingPolicy
A Boolean value that specifies whether the existing policy is overwritten.
- overwriteExistingCondition
A Boolean value that specifies whether the existing condition is overwritten.
Remarks
This method throws an exception if a policy or a condition with the same name already exists.
This namespace, class, or member is supported only in version 2.0 of the Microsoft .NET Framework.
Thread Safety
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server.
Target Platforms
Windows 98, Windows 2000, Windows 2000 Server, Windows CE, Windows Server 2008, Windows 98 Second Edition, Pocket PC, Smart Phone, Windows Server 2003, Windows XP Professional with Service Pack 2 (SP2), Windows 2000 Professional, Windows 2000 Advanced Server, Windows XP Home Edition, For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server., Windows Vista, Windows Mobile 5.0, Windows Mobile 2003 for Pocket PC, Windows CE 5.0
See Also