externalLibs/SQLPSX/PBM/Policies/EPM - NonProd Databases not in SIMPLE Recovery Mode.xml

<?xml version="1.0" encoding="utf-8"?><model xmlns="http://schemas.serviceml.org/smlif/2007/02"><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="http://schemas.serviceml.org/sml/2007/02" 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/EPM - NonProd Databases not in SIMPLE Recovery Mode</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="http://schemas.serviceml.org/sml/2007/02" 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/EPM - NonProd DBS &lt;&gt; SIMPLE Recovery</sml:Uri></sfc:Reference></DMF:PolicyCondition><DMF:PolicyObjectSet><sfc:Reference sml:ref="true"><sml:Uri>/PolicyStore/ObjectSet/EPM - NonProd Databases not in SIMPLE Recovery Mode__ObjectSet</sml:Uri></sfc:Reference></DMF:PolicyObjectSet><DMF:PolicyPolicyCategory><sfc:Reference sml:ref="true"><sml:Uri>/PolicyStore/PolicyCategory/EPM_b Configuration Non-Prod</sml:Uri></sfc:Reference></DMF:PolicyPolicyCategory><DMF:Name type="string">EPM - NonProd Databases not in SIMPLE Recovery Mode</DMF:Name><DMF:Description type="string" /><DMF:Condition type="string">EPM - NonProd DBS &lt;&gt; SIMPLE Recovery</DMF:Condition><DMF:ObjectSet type="string">EPM - NonProd Databases not in SIMPLE Recovery Mode_ObjectSet</DMF:ObjectSet><DMF:RootCondition type="string" /><DMF:PolicyCategory type="string">EPM: Configuration Non-Prod</DMF:PolicyCategory><DMF:Enabled type="boolean">false</DMF:Enabled><DMF:AutomatedPolicyEvaluationMode type="AutomatedPolicyEvaluationMode">None</DMF:AutomatedPolicyEvaluationMode><DMF:ScheduleUid type="guid">00000000-0000-0000-0000-000000000000</DMF:ScheduleUid><DMF:HelpText type="string" /><DMF:HelpLink type="string" /><DMF:ActiveEndDate type="dateTime">0001-01-01T00:00:00</DMF:ActiveEndDate><DMF:ActiveEndTimeOfDay type="long">0</DMF:ActiveEndTimeOfDay><DMF:ActiveStartDate type="dateTime">0001-01-01T00:00:00</DMF:ActiveStartDate><DMF:ActiveStartTimeOfDay type="long">0</DMF:ActiveStartTimeOfDay><DMF:FrequencyInterval type="int">0</DMF:FrequencyInterval><DMF:FrequencyRecurrenceFactor type="int">0</DMF:FrequencyRecurrenceFactor><DMF:FrequencyRelativeIntervals type="FrequencyRelativeIntervals" /><DMF:FrequencySubDayInterval type="int">0</DMF:FrequencySubDayInterval><DMF:FrequencySubDayTypes type="FrequencySubDayTypes">Unknown</DMF:FrequencySubDayTypes><DMF:FrequencyTypes type="FrequencyTypes">Unknown</DMF:FrequencyTypes><DMF:Schedule type="string" /></DMF:Policy></data></document><document><docinfo><aliases><alias>/PolicyStore/ObjectSet/EPM - NonProd Databases not in SIMPLE Recovery Mode__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="http://schemas.serviceml.org/sml/2007/02" xmlns:xs="http://www.w3.org/2001/XMLSchema"><DMF:TargetSets><sfc:Collection><sfc:Reference sml:ref="true"><sml:Uri>/PolicyStore/ObjectSet/EPM - NonProd Databases not in SIMPLE Recovery Mode__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">EPM - NonProd Databases not in SIMPLE Recovery Mode_ObjectSet</DMF:Name><DMF:Facet type="string">Database</DMF:Facet></DMF:ObjectSet></data></document><document><docinfo><aliases><alias>/PolicyStore/Condition/EPM - NonProd DBS &lt;&gt; SIMPLE Recovery</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="http://schemas.serviceml.org/sml/2007/02" 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;String&lt;/TypeClass&gt;&lt;?char 13?&gt;
    &lt;FunctionType&gt;ExecuteSql&lt;/FunctionType&gt;&lt;?char 13?&gt;
    &lt;ReturnType&gt;String&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;String&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;&amp;lt;?char 13?&amp;gt;&lt;?char 13?&gt;
SET NOCOUNT ON&amp;lt;?char 13?&amp;gt;&lt;?char 13?&gt;
&amp;lt;?char 13?&amp;gt;&lt;?char 13?&gt;
DECLARE @strng VARCHAR(2048)&amp;lt;?char 13?&amp;gt;&lt;?char 13?&gt;
&amp;lt;?char 13?&amp;gt;&lt;?char 13?&gt;
SELECT @strng = ISNULL(@strng, '''') + name + '' is in SIMPLE Recovery Mode and not in the exception table.'' + CHAR(10) &amp;lt;?char 13?&amp;gt;&lt;?char 13?&gt;
FROM master.dbo.sysdatabases&amp;lt;?char 13?&amp;gt;&lt;?char 13?&gt;
WHERE DATABASEPROPERTYEX(name, ''Recovery'') != ''SIMPLE''&amp;lt;?char 13?&amp;gt;&lt;?char 13?&gt;
  AND name = db_name()&amp;lt;?char 13?&amp;gt;&lt;?char 13?&gt;
ORDER BY name&amp;lt;?char 13?&amp;gt;&lt;?char 13?&gt;
&amp;lt;?char 13?&amp;gt;&lt;?char 13?&gt;
SELECT ISNULL(LEFT(RTRIM(@strng), (LEN(@strng) - 1)),'''') AS [policy_violation_message]&amp;lt;?char 13?&amp;gt;&lt;?char 13?&gt;
SET NOCOUNT OFF&amp;lt;?char 13?&amp;gt;&lt;?char 13?&gt;
&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;String&lt;/TypeClass&gt;&lt;?char 13?&gt;
    &lt;ObjType&gt;System.String&lt;/ObjType&gt;&lt;?char 13?&gt;
    &lt;Value /&gt;&lt;?char 13?&gt;
  &lt;/Constant&gt;&lt;?char 13?&gt;
&lt;/Operator&gt;</DMF:Expression><DMF:Name type="string">EPM - NonProd DBS &lt;&gt; SIMPLE Recovery</DMF:Name><DMF:Description type="string" /><DMF:Facet type="string">Database</DMF:Facet></DMF:Condition></data></document><document><docinfo><aliases><alias>/PolicyStore/PolicyCategory/EPM_b Configuration Non-Prod</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="http://schemas.serviceml.org/sml/2007/02" 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">EPM: Configuration Non-Prod</DMF:Name></DMF:PolicyCategory></data></document><document><docinfo><aliases><alias>/PolicyStore/ObjectSet/EPM - NonProd Databases not in SIMPLE Recovery Mode__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="http://schemas.serviceml.org/sml/2007/02" xmlns:xs="http://www.w3.org/2001/XMLSchema"><DMF:Levels><sfc:Collection><sfc:Reference sml:ref="true"><sml:Uri>/PolicyStore/ObjectSet/EPM - NonProd Databases not in SIMPLE Recovery Mode__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/EPM - NonProd Databases not in SIMPLE Recovery Mode__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/Condition/EPM - Online Database (including System DBs)</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="http://schemas.serviceml.org/sml/2007/02" 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;AND&lt;/OpType&gt;&lt;?char 13?&gt;
  &lt;Count&gt;2&lt;/Count&gt;&lt;?char 13?&gt;
  &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;Attribute&gt;&lt;?char 13?&gt;
      &lt;TypeClass&gt;Numeric&lt;/TypeClass&gt;&lt;?char 13?&gt;
      &lt;Name&gt;Status&lt;/Name&gt;&lt;?char 13?&gt;
    &lt;/Attribute&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;Enum&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;Microsoft.SqlServer.Management.Smo.DatabaseStatus&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;Normal&lt;/Value&gt;&lt;?char 13?&gt;
      &lt;/Constant&gt;&lt;?char 13?&gt;
    &lt;/Function&gt;&lt;?char 13?&gt;
  &lt;/Operator&gt;&lt;?char 13?&gt;
  &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;Attribute&gt;&lt;?char 13?&gt;
      &lt;TypeClass&gt;Bool&lt;/TypeClass&gt;&lt;?char 13?&gt;
      &lt;Name&gt;ReadOnly&lt;/Name&gt;&lt;?char 13?&gt;
    &lt;/Attribute&gt;&lt;?char 13?&gt;
    &lt;Function&gt;&lt;?char 13?&gt;
      &lt;TypeClass&gt;Bool&lt;/TypeClass&gt;&lt;?char 13?&gt;
      &lt;FunctionType&gt;False&lt;/FunctionType&gt;&lt;?char 13?&gt;
      &lt;ReturnType&gt;Bool&lt;/ReturnType&gt;&lt;?char 13?&gt;
      &lt;Count&gt;0&lt;/Count&gt;&lt;?char 13?&gt;
    &lt;/Function&gt;&lt;?char 13?&gt;
  &lt;/Operator&gt;&lt;?char 13?&gt;
&lt;/Operator&gt;</DMF:Expression><DMF:Name type="string">EPM - Online Database (including System DBs)</DMF:Name><DMF:Description type="string">Confirms that the database is online.</DMF:Description><DMF:Facet type="string">Database</DMF:Facet></DMF:Condition></data></document><document><docinfo><aliases><alias>/PolicyStore/ObjectSet/EPM - NonProd Databases not in SIMPLE Recovery Mode__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="http://schemas.serviceml.org/sml/2007/02" xmlns:xs="http://www.w3.org/2001/XMLSchema"><DMF:Parent><sfc:Reference sml:ref="true"><sml:Uri>/PolicyStore/ObjectSet/EPM - NonProd Databases not in SIMPLE Recovery Mode__ObjectSet/TargetSet/Server_/Database</sml:Uri></sfc:Reference></DMF:Parent><DMF:TargetSetLevelCondition><sfc:Reference sml:ref="true"><sml:Uri>/PolicyStore/Condition/EPM - Online Database (including System DBs)</sml:Uri></sfc:Reference></DMF:TargetSetLevelCondition><DMF:TargetTypeSkeleton type="string">Server/Database</DMF:TargetTypeSkeleton><DMF:LevelName type="string">Database</DMF:LevelName><DMF:Condition type="string">EPM - Online Database (including System DBs)</DMF:Condition></DMF:TargetSetLevel></data></document></instances></DMF:bufferData></xs:schema></data></document></definitions></xs:bufferSchema></model>