Files
sql-server-samples/samples/features/epm-framework/sample-policies/Database Page Status.xml
T

306 lines
17 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--Copyright (c) Microsoft Corporation.-->
<!--Licensed under the MIT License-->
<model xmlns="smlif.xsd">
<_locDefinition xmlns="urn:locstudio">
<_locDefault _loc="locNone" />
<_locTag _loc="locData">DMF:Name</_locTag>
<_locTag _loc="locData">DMF:Description</_locTag>
<_locTag _loc="locData">DMF:Condition</_locTag>
<_locTag _loc="locData">DMF:ObjectSet</_locTag>
<_locTag _loc="locData">DMF:RootCondition</_locTag>
<_locTag _loc="locData">DMF:PolicyCategory</_locTag>
<_locTag _loc="locData">DMF:HelpText</_locTag>
</_locDefinition>
<identity>
<name>urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1</name>
<baseURI>http://documentcollection/</baseURI>
</identity>
<xs:bufferSchema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<definitions xmlns:sfc="http://schemas.microsoft.com/sqlserver/sfc/serialization/2007/08">
<document>
<docinfo>
<aliases>
<alias>/system/schema/DMF</alias>
</aliases>
<sfc:version DomainVersion="3" />
</docinfo>
<data>
<xs:schema targetNamespace="http://schemas.microsoft.com/sqlserver/DMF/2007/08" xmlns:sfc="http://schemas.microsoft.com/sqlserver/sfc/serialization/2007/08" xmlns:sml="sml.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="Policy">
<xs:complexType>
<xs:sequence>
<xs:any namespace="http://schemas.microsoft.com/sqlserver/DMF/2007/08" processContents="skip" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ObjectSet">
<xs:complexType>
<xs:sequence>
<xs:any namespace="http://schemas.microsoft.com/sqlserver/DMF/2007/08" processContents="skip" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Condition">
<xs:complexType>
<xs:sequence>
<xs:any namespace="http://schemas.microsoft.com/sqlserver/DMF/2007/08" processContents="skip" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PolicyCategory">
<xs:complexType>
<xs:sequence>
<xs:any namespace="http://schemas.microsoft.com/sqlserver/DMF/2007/08" processContents="skip" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="TargetSet">
<xs:complexType>
<xs:sequence>
<xs:any namespace="http://schemas.microsoft.com/sqlserver/DMF/2007/08" processContents="skip" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="TargetSetLevel">
<xs:complexType>
<xs:sequence>
<xs:any namespace="http://schemas.microsoft.com/sqlserver/DMF/2007/08" processContents="skip" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
<DMF:bufferData xmlns:DMF="http://schemas.microsoft.com/sqlserver/DMF/2007/08">
<instances xmlns:sfc="http://schemas.microsoft.com/sqlserver/sfc/serialization/2007/08">
<document>
<docinfo>
<aliases>
<alias>/PolicyStore/Policy/Database Page Status</alias>
</aliases>
<sfc:version DomainVersion="3" />
</docinfo>
<data>
<DMF:Policy xmlns:DMF="http://schemas.microsoft.com/sqlserver/DMF/2007/08" xmlns:sfc="http://schemas.microsoft.com/sqlserver/sfc/serialization/2007/08" xmlns:sml="sml.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<DMF:Parent>
<sfc:Reference sml:ref="true">
<sml:Uri>/PolicyStore</sml:Uri>
</sfc:Reference>
</DMF:Parent>
<DMF:PolicyCondition>
<sfc:Reference sml:ref="true">
<sml:Uri>/PolicyStore/Condition/No Suspect Database Pages</sml:Uri>
</sfc:Reference>
</DMF:PolicyCondition>
<DMF:PolicyObjectSet>
<sfc:Reference sml:ref="true">
<sml:Uri>/PolicyStore/ObjectSet/Database Page Status__ObjectSet</sml:Uri>
</sfc:Reference>
</DMF:PolicyObjectSet>
<DMF:PolicyRootCondition>
<sfc:Reference sml:ref="true">
<sml:Uri>/PolicyStore/Condition/SQL Server 2005 or a Later Version</sml:Uri>
</sfc:Reference>
</DMF:PolicyRootCondition>
<DMF:PolicyPolicyCategory>
<sfc:Reference sml:ref="true">
<sml:Uri>/PolicyStore/PolicyCategory/Microsoft Best Practices_b Maintenance</sml:Uri>
</sfc:Reference>
</DMF:PolicyPolicyCategory>
<DMF:Name type="string">Database Page Status</DMF:Name>
<DMF:Description type="string">Checks whether the database has suspect database pages. A database page is set suspect by error 824. This error occurs when a logical consistency error is detected during a read operation, which frequently indicates data corruption caused by a faulty I/O subsystem component. When the SQL Server Database Engine detects a suspect page, the page ID is recorded in the msdbo.dbo.suspect_pages table. This is a severe error condition that threatens database integrity and must be corrected immediately.&lt;?char 13?&gt;
&lt;?char 13?&gt;
Best Practices Recommendations:&lt;?char 13?&gt;
* Review the SQL Server error log for the details of the 824 error for this database.&lt;?char 13?&gt;
* Complete a full database consistency check (DBCC CHECKDB).&lt;?char 13?&gt;
* Implement the user actions defined in MSSQLSERVER_824.&lt;?char 13?&gt;
</DMF:Description>
<DMF:Condition type="string">No Suspect Database Pages</DMF:Condition>
<DMF:ObjectSet type="string">Database Page Status_ObjectSet</DMF:ObjectSet>
<DMF:RootCondition type="string">SQL Server 2005 or a Later Version</DMF:RootCondition>
<DMF:PolicyCategory type="string">Microsoft Best Practices: Maintenance</DMF:PolicyCategory>
<DMF:Enabled type="boolean">false</DMF:Enabled>
<DMF:AutomatedPolicyEvaluationMode type="AutomatedPolicyEvaluationMode">None</DMF:AutomatedPolicyEvaluationMode>
<DMF:HelpText type="string" />
<DMF:HelpLink type="string">http://go.microsoft.com/fwlink/?LinkId=116379</DMF:HelpLink>
<DMF:ActiveEndDate type="dateTime">0001-01-01T00:00:00</DMF:ActiveEndDate>
<DMF:ActiveStartDate type="dateTime">0001-01-01T00:00:00</DMF:ActiveStartDate>
</DMF:Policy>
</data>
</document>
<document>
<docinfo>
<aliases>
<alias>/PolicyStore/ObjectSet/Database Page Status__ObjectSet</alias>
</aliases>
<sfc:version DomainVersion="3" />
</docinfo>
<data>
<DMF:ObjectSet xmlns:DMF="http://schemas.microsoft.com/sqlserver/DMF/2007/08" xmlns:sfc="http://schemas.microsoft.com/sqlserver/sfc/serialization/2007/08" xmlns:sml="sml.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<DMF:TargetSets>
<sfc:Collection>
<sfc:Reference sml:ref="true">
<sml:Uri>/PolicyStore/ObjectSet/Database Page Status__ObjectSet/TargetSet/Server_/Database</sml:Uri>
</sfc:Reference>
</sfc:Collection>
</DMF:TargetSets>
<DMF:Parent>
<sfc:Reference sml:ref="true">
<sml:Uri>/PolicyStore</sml:Uri>
</sfc:Reference>
</DMF:Parent>
<DMF:Name type="string">Database Page Status_ObjectSet</DMF:Name>
<DMF:Facet type="string">IDatabaseMaintenanceFacet</DMF:Facet>
</DMF:ObjectSet>
</data>
</document>
<document>
<docinfo>
<aliases>
<alias>/PolicyStore/Condition/No Suspect Database Pages</alias>
</aliases>
<sfc:version DomainVersion="3" />
</docinfo>
<data>
<DMF:Condition xmlns:DMF="http://schemas.microsoft.com/sqlserver/DMF/2007/08" xmlns:sfc="http://schemas.microsoft.com/sqlserver/sfc/serialization/2007/08" xmlns:sml="sml.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<DMF:Parent>
<sfc:Reference sml:ref="true">
<sml:Uri>/PolicyStore</sml:Uri>
</sfc:Reference>
</DMF:Parent>
<DMF:Expression type="string">&lt;Operator&gt;&lt;?char 13?&gt;
&lt;TypeClass&gt;Bool&lt;/TypeClass&gt;&lt;?char 13?&gt;
&lt;OpType&gt;EQ&lt;/OpType&gt;&lt;?char 13?&gt;
&lt;Count&gt;2&lt;/Count&gt;&lt;?char 13?&gt;
&lt;Function&gt;&lt;?char 13?&gt;
&lt;TypeClass&gt;Numeric&lt;/TypeClass&gt;&lt;?char 13?&gt;
&lt;FunctionType&gt;ExecuteSql&lt;/FunctionType&gt;&lt;?char 13?&gt;
&lt;ReturnType&gt;Numeric&lt;/ReturnType&gt;&lt;?char 13?&gt;
&lt;Count&gt;2&lt;/Count&gt;&lt;?char 13?&gt;
&lt;Constant&gt;&lt;?char 13?&gt;
&lt;TypeClass&gt;String&lt;/TypeClass&gt;&lt;?char 13?&gt;
&lt;ObjType&gt;System.String&lt;/ObjType&gt;&lt;?char 13?&gt;
&lt;Value&gt;Numeric&lt;/Value&gt;&lt;?char 13?&gt;
&lt;/Constant&gt;&lt;?char 13?&gt;
&lt;Constant&gt;&lt;?char 13?&gt;
&lt;TypeClass&gt;String&lt;/TypeClass&gt;&lt;?char 13?&gt;
&lt;ObjType&gt;System.String&lt;/ObjType&gt;&lt;?char 13?&gt;
&lt;Value&gt;SELECT COUNT(*) AS [Total_Suspect_Pages] FROM msdb.dbo.suspect_pages WHERE event_type IN (1,2,3) AND database_id = DB_ID(DB_NAME()) &lt;/Value&gt;&lt;?char 13?&gt;
&lt;/Constant&gt;&lt;?char 13?&gt;
&lt;/Function&gt;&lt;?char 13?&gt;
&lt;Constant&gt;&lt;?char 13?&gt;
&lt;TypeClass&gt;Numeric&lt;/TypeClass&gt;&lt;?char 13?&gt;
&lt;ObjType&gt;System.Int32&lt;/ObjType&gt;&lt;?char 13?&gt;
&lt;Value&gt;0&lt;/Value&gt;&lt;?char 13?&gt;
&lt;/Constant&gt;&lt;?char 13?&gt;
&lt;/Operator&gt;</DMF:Expression>
<DMF:Name type="string">No Suspect Database Pages</DMF:Name>
<DMF:Description type="string">Confirms that the current database has no suspect database pages. A database page is set as suspect by error 824, which indicates that a logical consistency error was detected during a read operation.</DMF:Description>
<DMF:Facet type="string">IDatabaseMaintenanceFacet</DMF:Facet>
</DMF:Condition>
</data>
</document>
<document>
<docinfo>
<aliases>
<alias>/PolicyStore/Condition/SQL Server 2005 or a Later Version</alias>
</aliases>
<sfc:version DomainVersion="3" />
</docinfo>
<data>
<DMF:Condition xmlns:DMF="http://schemas.microsoft.com/sqlserver/DMF/2007/08" xmlns:sfc="http://schemas.microsoft.com/sqlserver/sfc/serialization/2007/08" xmlns:sml="sml.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<DMF:Parent>
<sfc:Reference sml:ref="true">
<sml:Uri>/PolicyStore</sml:Uri>
</sfc:Reference>
</DMF:Parent>
<DMF:Expression type="string">&lt;Operator&gt;&lt;?char 13?&gt;
&lt;TypeClass&gt;Bool&lt;/TypeClass&gt;&lt;?char 13?&gt;
&lt;OpType&gt;GE&lt;/OpType&gt;&lt;?char 13?&gt;
&lt;Count&gt;2&lt;/Count&gt;&lt;?char 13?&gt;
&lt;Attribute&gt;&lt;?char 13?&gt;
&lt;TypeClass&gt;Numeric&lt;/TypeClass&gt;&lt;?char 13?&gt;
&lt;Name&gt;VersionMajor&lt;/Name&gt;&lt;?char 13?&gt;
&lt;/Attribute&gt;&lt;?char 13?&gt;
&lt;Constant&gt;&lt;?char 13?&gt;
&lt;TypeClass&gt;Numeric&lt;/TypeClass&gt;&lt;?char 13?&gt;
&lt;ObjType&gt;System.Int32&lt;/ObjType&gt;&lt;?char 13?&gt;
&lt;Value&gt;9&lt;/Value&gt;&lt;?char 13?&gt;
&lt;/Constant&gt;&lt;?char 13?&gt;
&lt;/Operator&gt;</DMF:Expression>
<DMF:Name type="string">SQL Server 2005 or a Later Version</DMF:Name>
<DMF:Description type="string">Confirms that the version of SQL Server is 2005 or a later version.</DMF:Description>
<DMF:Facet type="string">Server</DMF:Facet>
</DMF:Condition>
</data>
</document>
<document>
<docinfo>
<aliases>
<alias>/PolicyStore/PolicyCategory/Microsoft Best Practices_b Maintenance</alias>
</aliases>
<sfc:version DomainVersion="3" />
</docinfo>
<data>
<DMF:PolicyCategory xmlns:DMF="http://schemas.microsoft.com/sqlserver/DMF/2007/08" xmlns:sfc="http://schemas.microsoft.com/sqlserver/sfc/serialization/2007/08" xmlns:sml="sml.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<DMF:Parent>
<sfc:Reference sml:ref="true">
<sml:Uri>/PolicyStore</sml:Uri>
</sfc:Reference>
</DMF:Parent>
<DMF:Name type="string">Microsoft Best Practices: Maintenance</DMF:Name>
</DMF:PolicyCategory>
</data>
</document>
<document>
<docinfo>
<aliases>
<alias>/PolicyStore/ObjectSet/Database Page Status__ObjectSet/TargetSet/Server_/Database</alias>
</aliases>
<sfc:version DomainVersion="3" />
</docinfo>
<data>
<DMF:TargetSet xmlns:DMF="http://schemas.microsoft.com/sqlserver/DMF/2007/08" xmlns:sfc="http://schemas.microsoft.com/sqlserver/sfc/serialization/2007/08" xmlns:sml="sml.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<DMF:Levels>
<sfc:Collection>
<sfc:Reference sml:ref="true">
<sml:Uri>/PolicyStore/ObjectSet/Database Page Status__ObjectSet/TargetSet/Server_/Database/TargetSetLevel/Server_/Database</sml:Uri>
</sfc:Reference>
</sfc:Collection>
</DMF:Levels>
<DMF:Parent>
<sfc:Reference sml:ref="true">
<sml:Uri>/PolicyStore/ObjectSet/Database Page Status__ObjectSet</sml:Uri>
</sfc:Reference>
</DMF:Parent>
<DMF:TargetTypeSkeleton type="string">Server/Database</DMF:TargetTypeSkeleton>
<DMF:Enabled type="boolean">true</DMF:Enabled>
</DMF:TargetSet>
</data>
</document>
<document>
<docinfo>
<aliases>
<alias>/PolicyStore/ObjectSet/Database Page Status__ObjectSet/TargetSet/Server_/Database/TargetSetLevel/Server_/Database</alias>
</aliases>
<sfc:version DomainVersion="3" />
</docinfo>
<data>
<DMF:TargetSetLevel xmlns:DMF="http://schemas.microsoft.com/sqlserver/DMF/2007/08" xmlns:sfc="http://schemas.microsoft.com/sqlserver/sfc/serialization/2007/08" xmlns:sml="sml.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<DMF:Parent>
<sfc:Reference sml:ref="true">
<sml:Uri>/PolicyStore/ObjectSet/Database Page Status__ObjectSet/TargetSet/Server_/Database</sml:Uri>
</sfc:Reference>
</DMF:Parent>
<DMF:TargetTypeSkeleton type="string">Server/Database</DMF:TargetTypeSkeleton>
<DMF:LevelName type="string">Database</DMF:LevelName>
<DMF:Condition type="string" />
</DMF:TargetSetLevel>
</data>
</document>
</instances>
</DMF:bufferData>
</xs:schema>
</data>
</document>
</definitions>
</xs:bufferSchema>
</model>