+ )
+ }
+}
diff --git a/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/ClientApp/src/pages/README.md b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/ClientApp/src/pages/README.md
new file mode 100644
index 0000000000..88791be21c
--- /dev/null
+++ b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/ClientApp/src/pages/README.md
@@ -0,0 +1 @@
+# Pages Folder
\ No newline at end of file
diff --git a/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/ClientApp/src/styles/global.scss b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/ClientApp/src/styles/global.scss
new file mode 100644
index 0000000000..680fc1e038
--- /dev/null
+++ b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/ClientApp/src/styles/global.scss
@@ -0,0 +1,84 @@
+/*
+ Global Styles
+
+ This file should only be used for site wide styles. If the style is specific to a component then it
+ should be in a file next to the component
+*/
+@font-face {
+ font-family: SegoeUI;
+ src: local('Segoe UI'),
+ url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/normal/latest.woff2)
+ format('woff2'),
+ url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/normal/latest.woff)
+ format('woff'),
+ url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/normal/latest.ttf)
+ format('truetype'),
+ url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/normal/latest.svg#web)
+ format('svg');
+ font-weight: 400;
+}
+
+@font-face {
+ font-family: SegoeUILight;
+ src: local('Segoe UI Light'),
+ url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.woff2)
+ format('woff2'),
+ url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.woff)
+ format('woff'),
+ url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.ttf)
+ format('truetype'),
+ url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.svg#web)
+ format('svg');
+ font-weight: 100;
+}
+
+@font-face {
+ font-family: SegoeUISemilight;
+ src: local('Segoe UI Semilight'), local('Segoe UI'),
+ url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/semilight/latest.woff2)
+ format('woff2'),
+ url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/semilight/latest.woff)
+ format('woff'),
+ url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/semilight/latest.ttf)
+ format('truetype'),
+ url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/semilight/latest.svg#web)
+ format('svg');
+ font-weight: 200;
+}
+
+@font-face {
+ font-family: SegoeUISemibold;
+ src: local('Segoe UI Semibold'),
+ url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/semibold/latest.woff2)
+ format('woff2'),
+ url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/semibold/latest.woff)
+ format('woff'),
+ url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/semibold/latest.ttf)
+ format('truetype'),
+ url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/semibold/latest.svg#web)
+ format('svg');
+ font-weight: 600;
+}
+
+@font-face {
+ font-family: SegoeUIBold;
+ src: local('Segoe UI Bold'), local('Segoe UI'),
+ url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/bold/latest.woff2)
+ format('woff2'),
+ url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/bold/latest.woff)
+ format('woff'),
+ url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/bold/latest.ttf)
+ format('truetype'),
+ url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/bold/latest.svg#web)
+ format('svg');
+ font-weight: 700;
+}
+
+@import url('https://fonts.googleapis.com/css2?family=Audiowide&display=swap');
+
+@import url('https://fonts.googleapis.com/css2?family=Cousine&display=swap');
+
+
+body {
+ font-family: SegoeUI;
+}
\ No newline at end of file
diff --git a/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Controllers/DeviceController.cs b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Controllers/DeviceController.cs
new file mode 100644
index 0000000000..f2c121b02d
--- /dev/null
+++ b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Controllers/DeviceController.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using SqlDbEdgeDemo.Web.Models;
+using SqlDbEdgeDemo.Web.Services.Interfaces;
+
+namespace SqlDbEdgeDemo.Web.Controllers
+{
+ [Route("api/[controller]")]
+ public class DeviceController : Controller
+ {
+ private static IIoTHubModuleTwinService _ioTHubModuleTwinService;
+
+ public DeviceController(IIoTHubModuleTwinService ioTHubModuleTwinService)
+ {
+ _ioTHubModuleTwinService = ioTHubModuleTwinService;
+ }
+
+ [HttpGet]
+ public ActionResult GetStatus()
+ {
+ return Ok(_ioTHubModuleTwinService.GetTwinDeviceStatus());
+ }
+ }
+}
diff --git a/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Models/DeviceModel.cs b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Models/DeviceModel.cs
new file mode 100644
index 0000000000..fda35f32de
--- /dev/null
+++ b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Models/DeviceModel.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace SqlDbEdgeDemo.Web.Models
+{
+ public class DeviceModel
+ {
+ public bool Alert { get; set; }
+ }
+}
diff --git a/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Models/IoTHubModuleTwinProperties.cs b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Models/IoTHubModuleTwinProperties.cs
new file mode 100644
index 0000000000..4f0061f3d5
--- /dev/null
+++ b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Models/IoTHubModuleTwinProperties.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace SqlDbEdgeDemo.Web.Models
+{
+ public class IoTHubModuleTwinReportedProperty
+ {
+ public string Alert { get; set; }
+ }
+}
diff --git a/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Options/IoTHubOptions.cs b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Options/IoTHubOptions.cs
new file mode 100644
index 0000000000..ba8cd99e70
--- /dev/null
+++ b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Options/IoTHubOptions.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace SqlDbEdgeDemo.Web.Options
+{
+ public class IoTHubOptions
+ {
+ public string ModuleConnectionString { get; set; }
+ }
+}
diff --git a/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Pages/Error.cshtml b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Pages/Error.cshtml
new file mode 100644
index 0000000000..6f92b95655
--- /dev/null
+++ b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Pages/Error.cshtml
@@ -0,0 +1,26 @@
+@page
+@model ErrorModel
+@{
+ ViewData["Title"] = "Error";
+}
+
+
Error.
+
An error occurred while processing your request.
+
+@if (Model.ShowRequestId)
+{
+
+ Request ID:@Model.RequestId
+
+}
+
+
Development Mode
+
+ Swapping to the Development environment displays detailed information about the error that occurred.
+
+
+ The Development environment shouldn't be enabled for deployed applications.
+ It can result in displaying sensitive information from exceptions to end users.
+ For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development
+ and restarting the app.
+
diff --git a/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Pages/Error.cshtml.cs b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Pages/Error.cshtml.cs
new file mode 100644
index 0000000000..1c0ad38a45
--- /dev/null
+++ b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Pages/Error.cshtml.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.RazorPages;
+
+namespace SqlDbEdgeDemo.Web.Pages
+{
+ [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
+ public class ErrorModel : PageModel
+ {
+ public string RequestId { get; set; }
+
+ public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
+
+ public void OnGet()
+ {
+ RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
+ }
+ }
+}
diff --git a/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Pages/_ViewImports.cshtml b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Pages/_ViewImports.cshtml
new file mode 100644
index 0000000000..dd20a6d14a
--- /dev/null
+++ b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Pages/_ViewImports.cshtml
@@ -0,0 +1,3 @@
+@using SqlDbEdgeDemo.Web
+@namespace SqlDbEdgeDemo.Web.Pages
+@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
diff --git a/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Program.cs b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Program.cs
new file mode 100644
index 0000000000..f53152c3d5
--- /dev/null
+++ b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Program.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.Logging;
+
+namespace SqlDbEdgeDemo.Web
+{
+ public class Program
+ {
+ public static void Main(string[] args)
+ {
+ CreateWebHostBuilder(args).Build().Run();
+ }
+
+ public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
+ WebHost.CreateDefaultBuilder(args)
+ .UseStartup();
+ }
+}
diff --git a/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Services/Interfaces/IIoTHubModuleTwinService.cs b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Services/Interfaces/IIoTHubModuleTwinService.cs
new file mode 100644
index 0000000000..691269732f
--- /dev/null
+++ b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Services/Interfaces/IIoTHubModuleTwinService.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using SqlDbEdgeDemo.Web.Models;
+
+namespace SqlDbEdgeDemo.Web.Services.Interfaces
+{
+ public interface IIoTHubModuleTwinService
+ {
+ DeviceModel GetTwinDeviceStatus();
+ }
+}
diff --git a/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Services/IoTHubModuleTwinService.cs b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Services/IoTHubModuleTwinService.cs
new file mode 100644
index 0000000000..ca87e2e362
--- /dev/null
+++ b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Services/IoTHubModuleTwinService.cs
@@ -0,0 +1,49 @@
+using System;
+using Microsoft.Azure.Devices.Client;
+using Newtonsoft.Json;
+using SqlDbEdgeDemo.Web.Models;
+using SqlDbEdgeDemo.Web.Options;
+using SqlDbEdgeDemo.Web.Services.Interfaces;
+
+namespace SqlDbEdgeDemo.Web.Services
+{
+ public class IoTHubModuleTwinService : IIoTHubModuleTwinService
+ {
+ private static IoTHubOptions _options;
+ private static ModuleClient Client = null;
+
+ public IoTHubModuleTwinService(IoTHubOptions options)
+ {
+ _options = options;
+ }
+
+ public DeviceModel GetTwinDeviceStatus()
+ {
+ Connect();
+ var twinTask = Client.GetTwinAsync();
+ twinTask.Wait();
+ var twin = twinTask.Result;
+ var properties = JsonConvert.DeserializeObject(twin.Properties.Reported.ToJson());
+ return new DeviceModel
+ {
+ Alert = string.Equals(properties.Alert, "start", StringComparison.OrdinalIgnoreCase)
+ };
+ }
+
+ private void Connect()
+ {
+ if (Client == null)
+ {
+ try
+ {
+ Client = ModuleClient.CreateFromConnectionString(_options.ModuleConnectionString, TransportType.Amqp);
+ }
+ catch (Exception e)
+ {
+ Client = null; // Set to null for reconection
+ throw e;
+ }
+ }
+ }
+ }
+}
diff --git a/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/SqlDbEdgeDemo.Web.csproj b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/SqlDbEdgeDemo.Web.csproj
new file mode 100644
index 0000000000..4ea9913b7e
--- /dev/null
+++ b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/SqlDbEdgeDemo.Web.csproj
@@ -0,0 +1,50 @@
+
+
+
+ netcoreapp2.2
+ true
+ Latest
+ false
+ ClientApp\
+ $(DefaultItemExcludes);$(SpaRoot)node_modules\**
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ %(DistFiles.Identity)
+ PreserveNewest
+
+
+
+
+
diff --git a/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Startup.cs b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Startup.cs
new file mode 100644
index 0000000000..97e9c07810
--- /dev/null
+++ b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/Startup.cs
@@ -0,0 +1,75 @@
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.HttpsPolicy;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.SpaServices.ReactDevelopmentServer;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using SqlDbEdgeDemo.Web.Options;
+using SqlDbEdgeDemo.Web.Services;
+using SqlDbEdgeDemo.Web.Services.Interfaces;
+
+namespace SqlDbEdgeDemo.Web
+{
+ public class Startup
+ {
+ public Startup(IConfiguration configuration)
+ {
+ Configuration = configuration;
+ }
+
+ public IConfiguration Configuration { get; }
+
+ // This method gets called by the runtime. Use this method to add services to the container.
+ public void ConfigureServices(IServiceCollection services)
+ {
+ var ioTHubOptions = Configuration.GetSection("IoTHub").Get();
+ services.AddSingleton(sp => ioTHubOptions);
+ services.AddSingleton(sp => new IoTHubModuleTwinService(ioTHubOptions));
+
+ services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
+
+ // In production, the React files will be served from this directory
+ services.AddSpaStaticFiles(configuration =>
+ {
+ configuration.RootPath = "ClientApp/build";
+ });
+ }
+
+ // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
+ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
+ {
+ if (env.IsDevelopment())
+ {
+ app.UseDeveloperExceptionPage();
+ }
+ else
+ {
+ app.UseExceptionHandler("/Error");
+ // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
+ app.UseHsts();
+ }
+
+ app.UseHttpsRedirection();
+ app.UseStaticFiles();
+ app.UseSpaStaticFiles();
+
+ app.UseMvc(routes =>
+ {
+ routes.MapRoute(
+ name: "default",
+ template: "{controller}/{action=Index}/{id?}");
+ });
+
+ app.UseSpa(spa =>
+ {
+ spa.Options.SourcePath = "ClientApp";
+
+ if (env.IsDevelopment())
+ {
+ spa.UseReactDevelopmentServer(npmScript: "start");
+ }
+ });
+ }
+ }
+}
diff --git a/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/appsettings.Development.json b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/appsettings.Development.json
new file mode 100644
index 0000000000..e203e9407e
--- /dev/null
+++ b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/appsettings.Development.json
@@ -0,0 +1,9 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Debug",
+ "System": "Information",
+ "Microsoft": "Information"
+ }
+ }
+}
diff --git a/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/appsettings.json b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/appsettings.json
new file mode 100644
index 0000000000..1c5b6ef904
--- /dev/null
+++ b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/appsettings.json
@@ -0,0 +1,11 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Warning"
+ }
+ },
+ "IoTHub": {
+ "ModuleConnectionString": ""
+ },
+ "AllowedHosts": "*"
+}
diff --git a/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.sln b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.sln
new file mode 100644
index 0000000000..5616178951
--- /dev/null
+++ b/samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.sln
@@ -0,0 +1,34 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26124.0
+MinimumVisualStudioVersion = 15.0.26124.0
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlDbEdgeDemo.Web", "SqlDbEdgeDemo.Web\SqlDbEdgeDemo.Web.csproj", "{CAC06327-8684-4D14-A31F-AF4D995FBB38}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {CAC06327-8684-4D14-A31F-AF4D995FBB38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CAC06327-8684-4D14-A31F-AF4D995FBB38}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CAC06327-8684-4D14-A31F-AF4D995FBB38}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {CAC06327-8684-4D14-A31F-AF4D995FBB38}.Debug|x64.Build.0 = Debug|Any CPU
+ {CAC06327-8684-4D14-A31F-AF4D995FBB38}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {CAC06327-8684-4D14-A31F-AF4D995FBB38}.Debug|x86.Build.0 = Debug|Any CPU
+ {CAC06327-8684-4D14-A31F-AF4D995FBB38}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CAC06327-8684-4D14-A31F-AF4D995FBB38}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CAC06327-8684-4D14-A31F-AF4D995FBB38}.Release|x64.ActiveCfg = Release|Any CPU
+ {CAC06327-8684-4D14-A31F-AF4D995FBB38}.Release|x64.Build.0 = Release|Any CPU
+ {CAC06327-8684-4D14-A31F-AF4D995FBB38}.Release|x86.ActiveCfg = Release|Any CPU
+ {CAC06327-8684-4D14-A31F-AF4D995FBB38}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+EndGlobal
diff --git a/samples/demos/azure-sql-edge-demos/readme.md b/samples/demos/azure-sql-edge-demos/readme.md
new file mode 100644
index 0000000000..c6e6cb06e8
--- /dev/null
+++ b/samples/demos/azure-sql-edge-demos/readme.md
@@ -0,0 +1,2 @@
+# Azure SQL Demos
+
diff --git a/samples/features/azure-arc/deployment/kubeadm/ubuntu-single-node-vm/cleanup-controller-new.sh b/samples/features/azure-arc/deployment/kubeadm/ubuntu-single-node-vm/cleanup-controller-new.sh
new file mode 100644
index 0000000000..3fe6979eb3
--- /dev/null
+++ b/samples/features/azure-arc/deployment/kubeadm/ubuntu-single-node-vm/cleanup-controller-new.sh
@@ -0,0 +1,93 @@
+#!/bin/bash
+
+DIR_PREFIX=$1
+
+sudo kubeadm reset --force
+
+# Clean up azdata-cli package.
+#
+sudo dpkg --remove --force-all azdata-cli
+
+sudo systemctl stop kubelet
+sudo rm -rf /var/lib/cni/
+sudo rm -rf /var/lib/etcd/
+sudo rm -rf /run/flannel/
+sudo rm -rf /var/lib/kubelet/*
+sudo rm -rf /etc/cni/
+sudo rm -rf /etc/kubernetes/
+
+sudo ip link set cni0 down
+#brctl delbr cni0
+sudo ip link set flannel.1 down
+#brctl delbr flannel.1
+sudo iptables -F && sudo iptables -t nat -F && sudo iptables -t mangle -F && sudo iptables -X
+
+sudo rm -rf .azdata/
+
+# Remove mounts.
+#
+SERVICE_STOP_FAILED=0
+
+sudo systemctl | grep "/var/lib/kubelet/pods" | while read -r line; do
+
+ # Retrieve the mount path
+ #
+ MOUNT_PATH=`echo "$line" | grep -v echo | egrep -oh -m 1 "(/var/lib/kubelet/pods).+"`
+
+ if [ -z "$MOUNT_PATH" ]; then
+ continue
+ fi
+
+ if [[ ! -d "$MOUNT_PATH" ]] && [[ ! -f "$MOUNT_PATH" ]]; then
+
+ SERVICE=$(echo $line | cut -f1 -d' ')
+
+ echo "Mount "$MOUNT_PATH" no longer exists."
+ echo "Stopping orphaned mount service: '$SERVICE'"
+
+ sudo systemctl stop $SERVICE
+
+ if [ $? -ne 0 ]; then
+ SERVICE_STOP_FAILED=1
+ fi
+
+ echo ""
+ fi
+done
+
+if [ $SERVICE_STOP_FAILED -ne 0 ]; then
+ echo "Not all services were stopped successfully. Please check the above output for more inforamtion."
+else
+ echo "All orphaned services successfully stopped."
+fi
+
+# Clean the mounted volumes.
+#
+
+for i in $(seq 1 80); do
+
+ vol="vol$i"
+
+ sudo umount /azurearc/local-storage/$vol
+
+ sudo rm -rf /azurearc/local-storage/$vol
+
+done
+
+# Reset kube
+#
+sudo apt-get purge -y kubeadm --allow-change-held-packages
+sudo apt-get purge -y kubectl --allow-change-held-packages
+sudo apt-get purge -y kubelet --allow-change-held-packages
+sudo apt-get purge -y kubernetes-cni --allow-change-held-packages
+sudo apt-get purge -y kube* --allow-change-held-packages
+sudo apt -y autoremove
+sudo rm -rf ~/.kube
+
+# Clean up working folders.
+#
+export AZUREARCDATACONTROLLER_DIR=arc-data
+if [ -d "$AZUREARCDATACONTROLLER_DIR" ]; then
+ echo "Removing working directory $AZUREARCDATACONTROLLER_DIR."
+ rm -f -r $AZUREARCDATACONTROLLER_DIR
+fi
diff --git a/samples/features/azure-arc/deployment/kubeadm/ubuntu-single-node-vm/cleanup-controller.sh b/samples/features/azure-arc/deployment/kubeadm/ubuntu-single-node-vm/cleanup-controller.sh
index 0d3ccd2ee9..9dca7dace9 100644
--- a/samples/features/azure-arc/deployment/kubeadm/ubuntu-single-node-vm/cleanup-controller.sh
+++ b/samples/features/azure-arc/deployment/kubeadm/ubuntu-single-node-vm/cleanup-controller.sh
@@ -6,6 +6,9 @@ sudo kubeadm reset --force
# Clean up azdata-cli package.
#
+azdata extension remove --name azdata-cli-dc --yes
+azdata extension remove --name azdata-cli-postgres --yes
+azdata extension remove --name azdata-cli-sqlinstance --yes
unalias azdata
unalias az
sudo dpkg --remove --force-all azdata-cli
diff --git a/samples/features/azure-arc/deployment/kubeadm/ubuntu-single-node-vm/setup-controller-new.sh b/samples/features/azure-arc/deployment/kubeadm/ubuntu-single-node-vm/setup-controller-new.sh
new file mode 100644
index 0000000000..896e6ddbf7
--- /dev/null
+++ b/samples/features/azure-arc/deployment/kubeadm/ubuntu-single-node-vm/setup-controller-new.sh
@@ -0,0 +1,362 @@
+#!/bin/bash
+
+# Prompt for private preview repository username and password provided by Microsoft
+#
+if [ -z "$DOCKER_USERNAME" ]
+then
+ read -p 'Enter Azure Arc Data Controller repo username provided by Microsoft:' AADC_USERNAME
+ echo
+ export DOCKER_USERNAME=$AADC_USERNAME
+fi
+if [ -z "$DOCKER_PASSWORD" ]
+then
+ read -sp 'Enter Azure Arc Data Controller repo password provided by Microsoft:' AADC_PASSWORD
+ echo
+ export DOCKER_PASSWORD=$AADC_PASSWORD
+fi
+
+
+# Propmpt for Arc Data Controller properties.
+#
+if [ -z "$ARC_DC_NAME" ]
+then
+ read -p "Enter a name for the new Azure Arc Data Controller: " dc_name
+ echo
+ export ARC_DC_NAME=$dc_name
+fi
+
+if [ -z "$ARC_DC_SUBSCRIPTION" ]
+then
+ read -p "Enter a subscription ID for the new Azure Arc Data Controller: " dc_subscription
+ echo
+ export ARC_DC_SUBSCRIPTION=$dc_subscription
+fi
+
+if [ -z "$ARC_DC_RG" ]
+then
+ read -p "Enter a resource group for the new Azure Arc Data Controller: " dc_rg
+ echo
+ export ARC_DC_RG=$dc_rg
+fi
+
+if [ -z "$ARC_DC_REGION" ]
+then
+ read -p "Enter a region for the new Azure Arc Data Controller (eastus, eastus2, centralus, westus2, westeurope, southeastasia, japaneast, australiaeast, koreacentral, northeurope, uksouth, or francecentral): " dc_region
+ echo
+ export ARC_DC_REGION=$dc_region
+fi
+
+# Get controller username and password as input. It is used as default for the controller.
+#
+if [ -z "$AZDATA_USERNAME" ]
+then
+ read -p "Create Username for Azure Arc Data Controller: " username
+ echo
+ export AZDATA_USERNAME=$username
+fi
+if [ -z "$AZDATA_PASSWORD" ]
+then
+ while true; do
+ read -s -p "Create Password for Azure Arc Data Controller: " password
+ echo
+ read -s -p "Confirm your Password: " password2
+ echo
+ [ "$password" = "$password2" ] && break
+ echo "Password mismatch. Please try again."
+ done
+ export AZDATA_PASSWORD=$password
+fi
+
+set -Eeuo pipefail
+
+# This is a script to create single-node Kubernetes cluster and deploy Azure Arc Data Controller on it.
+#
+export AZUREARCDATACONTROLLER_DIR=arc-data
+
+# Name of virtualenv variable used.
+#
+export LOG_FILE="arc-data-controller.log"
+export DEBIAN_FRONTEND=noninteractive
+
+# Requirements file.
+export OSCODENAME=$(lsb_release -cs)
+export AZDATA_PRIVATE_PREVIEW_DEB_PACKAGE="https://aka.ms/aug-2020-arc-azdata-$OSCODENAME"
+
+# Kube version.
+#
+KUBE_DPKG_VERSION=1.16.3-00
+KUBE_VERSION=1.16.3
+
+# Wait for 5 minutes for the cluster to be ready.
+#
+TIMEOUT=600
+RETRY_INTERVAL=5
+
+# Variables used for azdata cluster creation.
+#
+export ACCEPT_EULA=yes
+export CLUSTER_NAME=arc
+export PV_COUNT="100"
+
+# Make a directory for installing the scripts and logs.
+#
+rm -f -r $AZUREARCDATACONTROLLER_DIR
+mkdir -p $AZUREARCDATACONTROLLER_DIR
+cd $AZUREARCDATACONTROLLER_DIR/
+touch $LOG_FILE
+
+{
+# Install all necessary packages: kuberenetes, docker, request, azdata.
+#
+echo ""
+echo "######################################################################################"
+echo "Starting installing packages..."
+
+# Install docker.
+#
+sudo apt-get update -q
+
+sudo apt --yes install \
+ software-properties-common \
+ apt-transport-https \
+ ca-certificates \
+ curl
+
+curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
+
+sudo add-apt-repository \
+ "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
+
+sudo apt update -q
+sudo apt-get install -q --yes docker-ce=18.06.2~ce~3-0~ubuntu --allow-downgrades
+sudo apt-mark hold docker-ce
+
+sudo usermod --append --groups docker $USER
+
+# Create working directory
+#
+rm -f -r setupscript
+mkdir -p setupscript
+cd setupscript/
+
+# Download and install azdata prerequisites
+#
+sudo apt install -y libodbc1 odbcinst odbcinst1debian2 unixodbc apt-transport-https libkrb5-dev
+
+# Download and install azdata package
+#
+echo ""
+
+if [[ -v AZDATA_DEB_PACKAGE_PATH ]]; then
+ sudo dpkg -i $AZDATA_DEB_PACKAGE_PATH
+elif [[ -v AZDATA_DEB_PACKAGE_URL ]]; then
+ echo "Downloading azdata installer from" $AZDATA_DEB_PACKAGE_URL
+ curl --location $AZDATA_DEB_PACKAGE_URL --output azdata_setup.deb
+ sudo dpkg -i azdata_setup.deb
+else
+ echo "Downloading azdata installer from" $AZDATA_PRIVATE_PREVIEW_DEB_PACKAGE
+ curl --location $AZDATA_PRIVATE_PREVIEW_DEB_PACKAGE --output azdata_setup.deb
+ sudo dpkg -i azdata_setup.deb
+fi
+
+cd -
+
+azdata --version
+echo "Azdata has been successfully installed."
+
+# Install Azure CLI
+#
+#curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
+
+# Load all pre-requisites for Kubernetes.
+#
+echo "###########################################################################"
+echo "Starting to setup pre-requisites for kubernetes..."
+
+# Setup the kubernetes preprequisites.
+#
+sudo swapoff -a
+sudo sed -i '/swap/s/^\(.*\)$/#\1/g' /etc/fstab
+
+curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
+
+cat <> sudo tee -a /etc/hosts
-
sudo swapoff -a
sudo sed -i '/swap/s/^\(.*\)$/#\1/g' /etc/fstab
@@ -290,7 +333,9 @@ echo "Starting to deploy azdata cluster..."
# Command to create cluster for single node cluster.
#
-azdata control create -n $CLUSTER_NAME -c azure-arc-kubeadm-private-preview --accept-eula $ACCEPT_EULA
+azdata arc dc config init -s azure-arc-kubeadm-private-preview -t azure-arc-custom --force
+
+azdata arc dc create -n $ARC_DC_NAME -p azure-arc-kubeadm-private-preview --namespace $CLUSTER_NAME --location $ARC_DC_REGION --resource-group $ARC_DC_RG --subscription $ARC_DC_SUBSCRIPTION --connectivity-mode indirect
echo "Azure Arc Data Controller cluster created."
# Setting context to cluster.
diff --git a/samples/features/epm-framework/sample-policies/Asymmetric Key Encryption Algorithm.xml b/samples/features/epm-framework/sample-policies/Asymmetric Key Encryption Algorithm.xml
new file mode 100644
index 0000000000..6d5429f999
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Asymmetric Key Encryption Algorithm.xml
@@ -0,0 +1,352 @@
+
+
+
+
+<_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Asymmetric Key Encryption Algorithm
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/RSA 1024 or RSA 2048 Encrypted
+
+
+
+
+ /PolicyStore/ObjectSet/Asymmetric Key Encryption Algorithm__ObjectSet
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Security
+
+
+ Asymmetric Key Encryption Algorithm
+ Checks whether asymmetric keys were created with 1024-bit or better.
+ RSA 1024 or RSA 2048 Encrypted
+ Asymmetric Key Encryption Algorithm_ObjectSet
+ SQL Server 2005 or a Later Version
+ Microsoft Best Practices: Security
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116370
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Asymmetric Key Encryption Algorithm__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Asymmetric Key Encryption Algorithm__ObjectSet/TargetSet/Server_/Database_/AsymmetricKey
+
+
+
+
+
+ /PolicyStore
+
+
+ Asymmetric Key Encryption Algorithm_ObjectSet
+ AsymmetricKey
+
+
+
+
+
+
+ /PolicyStore/Condition/RSA 1024 or RSA 2048 Encrypted
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>OR</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>KeyEncryptionAlgorithm</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>Enum</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Microsoft.SqlServer.Management.Smo.AsymmetricKeyEncryptionAlgorithm</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Rsa1024</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ </Operator><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>KeyEncryptionAlgorithm</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>Enum</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Microsoft.SqlServer.Management.Smo.AsymmetricKeyEncryptionAlgorithm</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Rsa2048</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ </Operator><?char 13?>
+</Operator>
+ RSA 1024 or RSA 2048 Encrypted
+ Confirms that asymmetric keys were created with 1024-bit encryption or better.
+ AsymmetricKey
+
+
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>GE</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>VersionMajor</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>9</Value><?char 13?>
+ </Constant><?char 13?>
+</Operator>
+ SQL Server 2005 or a Later Version
+ Confirms that the version of SQL Server is 2005 or a later version.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Security
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Security
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Asymmetric Key Encryption Algorithm__ObjectSet/TargetSet/Server_/Database_/AsymmetricKey
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Asymmetric Key Encryption Algorithm__ObjectSet/TargetSet/Server_/Database_/AsymmetricKey/TargetSetLevel/Server_/Database_/AsymmetricKey
+
+
+ /PolicyStore/ObjectSet/Asymmetric Key Encryption Algorithm__ObjectSet/TargetSet/Server_/Database_/AsymmetricKey/TargetSetLevel/Server_/Database
+
+
+
+
+
+ /PolicyStore/ObjectSet/Asymmetric Key Encryption Algorithm__ObjectSet
+
+
+ Server/Database/AsymmetricKey
+ true
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Asymmetric Key Encryption Algorithm__ObjectSet/TargetSet/Server_/Database_/AsymmetricKey/TargetSetLevel/Server_/Database_/AsymmetricKey
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Asymmetric Key Encryption Algorithm__ObjectSet/TargetSet/Server_/Database_/AsymmetricKey
+
+
+ Server/Database/AsymmetricKey
+ AsymmetricKey
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Asymmetric Key Encryption Algorithm__ObjectSet/TargetSet/Server_/Database_/AsymmetricKey/TargetSetLevel/Server_/Database
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Asymmetric Key Encryption Algorithm__ObjectSet/TargetSet/Server_/Database_/AsymmetricKey
+
+
+ Server/Database
+ Database
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/Backup and Data File Location.xml b/samples/features/epm-framework/sample-policies/Backup and Data File Location.xml
new file mode 100644
index 0000000000..5a5257f063
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Backup and Data File Location.xml
@@ -0,0 +1,251 @@
+
+
+
+
+<_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Backup and Data File Location
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Data and Backup on Separate Drive
+
+
+
+
+ /PolicyStore/ObjectSet/Backup and Data File Location__ObjectSet
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Maintenance
+
+
+ Backup and Data File Location
+ Checks if database and the backups are on separate backup devices. If they are on the same backup device, and the device that contains the database fails, your backups will be unavailable. Also, putting the data and backups on separate devices optimizes the I/O performance for both the production use of the database and writing the backups.<?char 13?>
+<?char 13?>
+Note: This policy cannot detect separate physical devices through mount points.
+ Data and Backup on Separate Drive
+ Backup and Data File Location_ObjectSet
+ Microsoft Best Practices: Maintenance
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116373
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Backup and Data File Location__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Backup and Data File Location__ObjectSet/TargetSet/Server_/Database
+
+
+
+
+
+ /PolicyStore
+
+
+ Backup and Data File Location_ObjectSet
+ IDatabaseMaintenanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Data and Backup on Separate Drive
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <Name>DataAndBackupOnSeparateLogicalVolumes</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <FunctionType>True</FunctionType><?char 13?>
+ <ReturnType>Bool</ReturnType><?char 13?>
+ <Count>0</Count><?char 13?>
+ </Function><?char 13?>
+</Operator>
+ Data and Backup on Separate Drive
+ Confirms that the database and the database backups are on separate drives.
+ IDatabaseMaintenanceFacet
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Maintenance
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Maintenance
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Backup and Data File Location__ObjectSet/TargetSet/Server_/Database
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Backup and Data File Location__ObjectSet/TargetSet/Server_/Database/TargetSetLevel/Server_/Database
+
+
+
+
+
+ /PolicyStore/ObjectSet/Backup and Data File Location__ObjectSet
+
+
+ Server/Database
+ true
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Backup and Data File Location__ObjectSet/TargetSet/Server_/Database/TargetSetLevel/Server_/Database
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Backup and Data File Location__ObjectSet/TargetSet/Server_/Database
+
+
+ Server/Database
+ Database
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/Data and Log File Location.xml b/samples/features/epm-framework/sample-policies/Data and Log File Location.xml
new file mode 100644
index 0000000000..8bcc7fbab9
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Data and Log File Location.xml
@@ -0,0 +1,405 @@
+
+
+
+
+<_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Data and Log File Location
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Data and Log Files on Separate Drives
+
+
+
+
+ /PolicyStore/ObjectSet/Data and Log File Location__ObjectSet
+
+
+
+
+ /PolicyStore/Condition/Enterprise or Standard Edition
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+ Data and Log File Location
+ Checks whether data and log files are placed on separate logical drives. Placing both data and log files on the same drive can cause contention for that drive and result in poor performance. Placing the files on separate drives allows the I/O activity to occur at the same time for both the data and log files. The best practice is to specify separate drives for the data and log when you create a new database. To move files after the database is created, the database must be taken offline. Move the files by using one of the following methods:<?char 13?>
+<?char 13?>
+* Restore the database from backup by using the RESTORE DATABASE statement with the WITH MOVE option. <?char 13?>
+* Detach and then re-attach the database specifying separate locations for the data and log devices. <?char 13?>
+* Specify a new location by running the ALTER DATABASE statement with the MODIFY FILE option, and then restarting the instance of SQL Server. <?char 13?>
+<?char 13?>
+Note: This policy cannot detect separate physical devices through mount points.
+ Data and Log Files on Separate Drives
+ Data and Log File Location_ObjectSet
+ Enterprise or Standard Edition
+ Microsoft Best Practices: Performance
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116362
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Data and Log File Location__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Data and Log File Location__ObjectSet/TargetSet/Server_/Database
+
+
+
+
+
+ /PolicyStore
+
+
+ Data and Log File Location_ObjectSet
+ IDatabasePerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Data and Log Files on Separate Drives
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>OR</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>OR</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>OR</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <Name>DataAndLogFilesOnSeparateLogicalVolumes</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <FunctionType>True</FunctionType><?char 13?>
+ <ReturnType>Bool</ReturnType><?char 13?>
+ <Count>0</Count><?char 13?>
+ </Function><?char 13?>
+ </Operator><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>LT</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>Size</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>5120</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator><?char 13?>
+ </Operator><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>NE</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>Status</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>Enum</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Microsoft.SqlServer.Management.Smo.DatabaseStatus</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Normal</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ </Operator><?char 13?>
+ </Operator><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <Name>IsSystemObject</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <FunctionType>True</FunctionType><?char 13?>
+ <ReturnType>Bool</ReturnType><?char 13?>
+ <Count>0</Count><?char 13?>
+ </Function><?char 13?>
+ </Operator><?char 13?>
+</Operator>
+ Data and Log Files on Separate Drives
+ Confirms that data and log files are placed on separate drives.
+ IDatabasePerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Enterprise or Standard Edition
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>OR</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>EngineEdition</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>Enum</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Microsoft.SqlServer.Management.Smo.Edition</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Standard</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ </Operator><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>EngineEdition</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>Enum</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Microsoft.SqlServer.Management.Smo.Edition</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>EnterpriseOrDeveloper</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ </Operator><?char 13?>
+</Operator>
+ Enterprise or Standard Edition
+ Confirms that the instance of SQL Server is either Enterprise or Standard Edition.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Performance
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Data and Log File Location__ObjectSet/TargetSet/Server_/Database
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Data and Log File Location__ObjectSet/TargetSet/Server_/Database/TargetSetLevel/Server_/Database
+
+
+
+
+
+ /PolicyStore/ObjectSet/Data and Log File Location__ObjectSet
+
+
+ Server/Database
+ true
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Data and Log File Location__ObjectSet/TargetSet/Server_/Database/TargetSetLevel/Server_/Database
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Data and Log File Location__ObjectSet/TargetSet/Server_/Database
+
+
+ Server/Database
+ Database
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/Database Auto Close.xml b/samples/features/epm-framework/sample-policies/Database Auto Close.xml
new file mode 100644
index 0000000000..a1999799de
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Database Auto Close.xml
@@ -0,0 +1,330 @@
+
+
+
+
+<_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Database Auto Close
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Auto Close Disabled
+
+
+
+
+ /PolicyStore/ObjectSet/Database Auto Close__ObjectSet
+
+
+
+
+ /PolicyStore/Condition/Enterprise or Standard Edition
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+ Database Auto Close
+ Checks that the AUTO_ CLOSE option is off for SQL Server Standard and Enterprise Editions. When set to on, this option can cause performance degradation on frequently accessed databases because of the increased overhead of opening and closing the database after each connection. AUTO_CLOSE also flushes the procedure cache after each connection.
+ Auto Close Disabled
+ Database Auto Close_ObjectSet
+ Enterprise or Standard Edition
+ Microsoft Best Practices: Performance
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116338
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Auto Close__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Auto Close__ObjectSet/TargetSet/Server_/Database
+
+
+
+
+
+ /PolicyStore
+
+
+ Database Auto Close_ObjectSet
+ IDatabasePerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Auto Close Disabled
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <Name>AutoClose</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <FunctionType>False</FunctionType><?char 13?>
+ <ReturnType>Bool</ReturnType><?char 13?>
+ <Count>0</Count><?char 13?>
+ </Function><?char 13?>
+</Operator>
+ Auto Close Disabled
+ Confirms that the AUTO_CLOSE database option is set to off.
+ IDatabasePerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Enterprise or Standard Edition
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>OR</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>EngineEdition</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>Enum</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Microsoft.SqlServer.Management.Smo.Edition</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Standard</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ </Operator><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>EngineEdition</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>Enum</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Microsoft.SqlServer.Management.Smo.Edition</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>EnterpriseOrDeveloper</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ </Operator><?char 13?>
+</Operator>
+ Enterprise or Standard Edition
+ Confirms that the instance of SQL Server is either Enterprise or Standard Edition.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Performance
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Auto Close__ObjectSet/TargetSet/Server_/Database
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Auto Close__ObjectSet/TargetSet/Server_/Database/TargetSetLevel/Server_/Database
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Auto Close__ObjectSet
+
+
+ Server/Database
+ true
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Auto Close__ObjectSet/TargetSet/Server_/Database/TargetSetLevel/Server_/Database
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Auto Close__ObjectSet/TargetSet/Server_/Database
+
+
+ Server/Database
+ Database
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/Database Auto Shrink.xml b/samples/features/epm-framework/sample-policies/Database Auto Shrink.xml
new file mode 100644
index 0000000000..00272a0646
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Database Auto Shrink.xml
@@ -0,0 +1,400 @@
+
+
+
+
+<_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Database Auto Shrink
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Auto Shrink Disabled
+
+
+
+
+ /PolicyStore/ObjectSet/Database Auto Shrink__ObjectSet
+
+
+
+
+ /PolicyStore/Condition/Enterprise or Standard Edition
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+ Database Auto Shrink
+ Checks that the AUTO_SHRINK option is off for user databases on SQL Server Standard and Enterprise Editions. Frequently shrinking and expanding a database can lead to poor performance because of physical fragmentation. Set the AUTO_SHRINK database option to OFF. If you know that the space that you are reclaiming will not be needed in the future, you can manually shrink the database.
+ Auto Shrink Disabled
+ Database Auto Shrink_ObjectSet
+ Enterprise or Standard Edition
+ Microsoft Best Practices: Performance
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116337
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Auto Shrink__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Auto Shrink__ObjectSet/TargetSet/Server_/Database
+
+
+
+
+
+ /PolicyStore
+
+
+ Database Auto Shrink_ObjectSet
+ IDatabasePerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Auto Shrink Disabled
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <Name>AutoShrink</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <FunctionType>False</FunctionType><?char 13?>
+ <ReturnType>Bool</ReturnType><?char 13?>
+ <Count>0</Count><?char 13?>
+ </Function><?char 13?>
+</Operator>
+ Auto Shrink Disabled
+ Confirms that the AUTO_SHRINK database option is set to off.
+ IDatabasePerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Enterprise or Standard Edition
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>OR</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>EngineEdition</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>Enum</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Microsoft.SqlServer.Management.Smo.Edition</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Standard</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ </Operator><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>EngineEdition</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>Enum</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Microsoft.SqlServer.Management.Smo.Edition</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>EnterpriseOrDeveloper</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ </Operator><?char 13?>
+</Operator>
+ Enterprise or Standard Edition
+ Confirms that the instance of SQL Server is either Enterprise or Standard Edition.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Performance
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Auto Shrink__ObjectSet/TargetSet/Server_/Database
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Auto Shrink__ObjectSet/TargetSet/Server_/Database/TargetSetLevel/Server_/Database
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Auto Shrink__ObjectSet
+
+
+ Server/Database
+ true
+
+
+
+
+
+
+ /PolicyStore/Condition/Online User Database
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>AND</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Unsupported</TypeClass><?char 13?>
+ <Name>IsSystemObject</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <FunctionType>False</FunctionType><?char 13?>
+ <ReturnType>Bool</ReturnType><?char 13?>
+ <Count>0</Count><?char 13?>
+ </Function><?char 13?>
+ </Operator><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Unsupported</TypeClass><?char 13?>
+ <Name>Status</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>Enum</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Microsoft.SqlServer.Management.Smo.DatabaseStatus</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Normal</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ </Operator><?char 13?>
+</Operator>
+ Online User Database
+ Confirms that the database is not a system database and that it is online.
+ Database
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Auto Shrink__ObjectSet/TargetSet/Server_/Database/TargetSetLevel/Server_/Database
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Auto Shrink__ObjectSet/TargetSet/Server_/Database
+
+
+
+
+ /PolicyStore/Condition/Online User Database
+
+
+ Server/Database
+ Database
+ Online User Database
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/Database Collation.xml b/samples/features/epm-framework/sample-policies/Database Collation.xml
new file mode 100644
index 0000000000..0e75cb3d25
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Database Collation.xml
@@ -0,0 +1,252 @@
+
+
+
+
+<_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Database Collation
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Collation Matches master or model
+
+
+
+
+ /PolicyStore/ObjectSet/Database Collation__ObjectSet
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+ Database Collation
+ Looks for user-defined databases that have a collation different from the master or model databases. It is recommended that you not use this configuration because collation conflicts can occur that might prevent code from executing. For example, when a stored procedure joins one table to a temporary table, SQL Server might end the batch and return a collation conflict error if the collations of the user-defined database and the model database are different. This happens because temporary tables are created in tempdb, which obtains its collation based on that of the model database. If you experience collation conflict errors, consider one of the following solutions:<?char 13?>
+ * Export the data from the user database and import it into new tables that have the same collation as the master and model databases.<?char 13?>
+ * Rebuild the system databases to use a collation that matches the user database collation.<?char 13?>
+ * Modify any stored procedures that join user tables to tables in tempdb to create the tables in tempdb by using the collation of the user database. To do this, add the COLLATE database_default clause to the column definitions of the temporary table. For example: CREATE TABLE #temp1 ( c1 int, c2 varchar(30) COLLATE database_default )
+ Collation Matches master or model
+ Database Collation_ObjectSet
+ Microsoft Best Practices: Performance
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116336
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Collation__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Collation__ObjectSet/TargetSet/Server_/Database
+
+
+
+
+
+ /PolicyStore
+
+
+ Database Collation_ObjectSet
+ IDatabasePerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Collation Matches master or model
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <Name>CollationMatchesModelOrMaster</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <FunctionType>True</FunctionType><?char 13?>
+ <ReturnType>Bool</ReturnType><?char 13?>
+ <Count>0</Count><?char 13?>
+ </Function><?char 13?>
+</Operator>
+ Collation Matches master or model
+ Confirms that the collation of the database matches the master or model databases.
+ IDatabasePerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Performance
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Collation__ObjectSet/TargetSet/Server_/Database
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Collation__ObjectSet/TargetSet/Server_/Database/TargetSetLevel/Server_/Database
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Collation__ObjectSet
+
+
+ Server/Database
+ true
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Collation__ObjectSet/TargetSet/Server_/Database/TargetSetLevel/Server_/Database
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Collation__ObjectSet/TargetSet/Server_/Database
+
+
+ Server/Database
+ Database
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/Database Page Status.xml b/samples/features/epm-framework/sample-policies/Database Page Status.xml
new file mode 100644
index 0000000000..0066895522
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Database Page Status.xml
@@ -0,0 +1,306 @@
+
+
+
+
+<_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Database Page Status
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/No Suspect Database Pages
+
+
+
+
+ /PolicyStore/ObjectSet/Database Page Status__ObjectSet
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Maintenance
+
+
+ Database Page Status
+ 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.<?char 13?>
+<?char 13?>
+Best Practices Recommendations:<?char 13?>
+* Review the SQL Server error log for the details of the 824 error for this database.<?char 13?>
+* Complete a full database consistency check (DBCC CHECKDB).<?char 13?>
+* Implement the user actions defined in MSSQLSERVER_824.<?char 13?>
+
+ No Suspect Database Pages
+ Database Page Status_ObjectSet
+ SQL Server 2005 or a Later Version
+ Microsoft Best Practices: Maintenance
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116379
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Page Status__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Page Status__ObjectSet/TargetSet/Server_/Database
+
+
+
+
+
+ /PolicyStore
+
+
+ Database Page Status_ObjectSet
+ IDatabaseMaintenanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/No Suspect Database Pages
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>ExecuteSql</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Numeric</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>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()) </Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+</Operator>
+ No Suspect Database Pages
+ 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.
+ IDatabaseMaintenanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>GE</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>VersionMajor</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>9</Value><?char 13?>
+ </Constant><?char 13?>
+</Operator>
+ SQL Server 2005 or a Later Version
+ Confirms that the version of SQL Server is 2005 or a later version.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Maintenance
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Maintenance
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Page Status__ObjectSet/TargetSet/Server_/Database
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Page Status__ObjectSet/TargetSet/Server_/Database/TargetSetLevel/Server_/Database
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Page Status__ObjectSet
+
+
+ Server/Database
+ true
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Page Status__ObjectSet/TargetSet/Server_/Database/TargetSetLevel/Server_/Database
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Page Status__ObjectSet/TargetSet/Server_/Database
+
+
+ Server/Database
+ Database
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/Database Page Verification.xml b/samples/features/epm-framework/sample-policies/Database Page Verification.xml
new file mode 100644
index 0000000000..c7f0cdae7a
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Database Page Verification.xml
@@ -0,0 +1,250 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Database Page Verification
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Page Verify Checksum
+
+
+
+
+ /PolicyStore/ObjectSet/Database Page Verification__ObjectSet
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Maintenance
+
+
+ Database Page Verification
+ Checks if the PAGE_VERIFY database option is not set to CHECKSUM to provide a high level of data-file integrity. When CHECKSUM is enabled for the PAGE_VERIFY database option, the SQL Server Database Engine calculates a checksum over the contents of the whole page, and stores the value in the page header when a page is written to disk. When the page is read from disk, the checksum is recomputed and compared to the checksum value that is stored in the page header. This helps provide a high level of data-file integrity.
+ Page Verify Checksum
+ Database Page Verification_ObjectSet
+ Microsoft Best Practices: Maintenance
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116333
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Page Verification__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Page Verification__ObjectSet/TargetSet/Server_/Database
+
+
+
+
+
+ /PolicyStore
+
+
+ Database Page Verification_ObjectSet
+ IDatabaseMaintenanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Page Verify Checksum
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>PageVerify</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>Microsoft.SqlServer.Management.Smo.PageVerify</ObjType><?char 13?>
+ <Value>Checksum</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ Page Verify Checksum
+ Confirms that the PAGE_VERIFY database option set to CHECKSUM.
+ IDatabaseMaintenanceFacet
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Maintenance
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Maintenance
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Page Verification__ObjectSet/TargetSet/Server_/Database
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Page Verification__ObjectSet/TargetSet/Server_/Database/TargetSetLevel/Server_/Database
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Page Verification__ObjectSet
+
+
+ Server/Database
+ true
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Page Verification__ObjectSet/TargetSet/Server_/Database/TargetSetLevel/Server_/Database
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Database Page Verification__ObjectSet/TargetSet/Server_/Database
+
+
+ Server/Database
+ Database
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/Guest Permissions.xml b/samples/features/epm-framework/sample-policies/Guest Permissions.xml
new file mode 100644
index 0000000000..b9785f3750
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Guest Permissions.xml
@@ -0,0 +1,404 @@
+
+
+
+
+<_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Guest Permissions
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Has No Database Access
+
+
+
+
+ /PolicyStore/ObjectSet/Guest Permissions__ObjectSet
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Security
+
+
+ Guest Permissions
+ Checks if permission to access the database is enabled for guest user. Remove access to the guest user if it is not required. The guest user cannot be dropped, but a guest user account can be disabled by revoking its CONNECT permission. You do this by executing REVOKE CONNECT FROM GUEST from within any database other than master, msdb, or tempdb.
+ Has No Database Access
+ Guest Permissions_ObjectSet
+ Microsoft Best Practices: Security
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116354
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Guest Permissions__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Guest Permissions__ObjectSet/TargetSet/Server_/Database_/User
+
+
+
+
+
+ /PolicyStore
+
+
+ Guest Permissions_ObjectSet
+ User
+
+
+
+
+
+
+ /PolicyStore/Condition/Has No Database Access
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Unsupported</TypeClass><?char 13?>
+ <Name>HasDBAccess</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <FunctionType>False</FunctionType><?char 13?>
+ <ReturnType>Bool</ReturnType><?char 13?>
+ <Count>0</Count><?char 13?>
+ </Function><?char 13?>
+</Operator>
+ Has No Database Access
+ Confirms that the database user does not have access to the database.
+ User
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Security
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Security
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Guest Permissions__ObjectSet/TargetSet/Server_/Database_/User
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Guest Permissions__ObjectSet/TargetSet/Server_/Database_/User/TargetSetLevel/Server_/Database_/User
+
+
+ /PolicyStore/ObjectSet/Guest Permissions__ObjectSet/TargetSet/Server_/Database_/User/TargetSetLevel/Server_/Database
+
+
+
+
+
+ /PolicyStore/ObjectSet/Guest Permissions__ObjectSet
+
+
+ Server/Database/User
+ true
+
+
+
+
+
+
+ /PolicyStore/Condition/Guest
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Unsupported</TypeClass><?char 13?>
+ <Name>Name</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>guest</Value><?char 13?>
+ </Constant><?char 13?>
+</Operator>
+ Guest
+ The user is the Guest account.
+ User
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Guest Permissions__ObjectSet/TargetSet/Server_/Database_/User/TargetSetLevel/Server_/Database_/User
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Guest Permissions__ObjectSet/TargetSet/Server_/Database_/User
+
+
+
+
+ /PolicyStore/Condition/Guest
+
+
+ Server/Database/User
+ User
+ Guest
+
+
+
+
+
+
+ /PolicyStore/Condition/User or Model
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>AND</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Group><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <Count>1</Count><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>OR</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <Name>IsSystemObject</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <FunctionType>False</FunctionType><?char 13?>
+ <ReturnType>Bool</ReturnType><?char 13?>
+ <Count>0</Count><?char 13?>
+ </Function><?char 13?>
+ </Operator><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <Name>Name</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>model</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator><?char 13?>
+ </Operator><?char 13?>
+ </Group><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Unsupported</TypeClass><?char 13?>
+ <Name>Status</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>Enum</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Microsoft.SqlServer.Management.Smo.DatabaseStatus</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Normal</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ </Operator><?char 13?>
+</Operator>
+ User or Model
+ Confirms that the database is a user database or the Model database and that the database is online.
+ Database
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Guest Permissions__ObjectSet/TargetSet/Server_/Database_/User/TargetSetLevel/Server_/Database
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Guest Permissions__ObjectSet/TargetSet/Server_/Database_/User
+
+
+
+
+ /PolicyStore/Condition/User or Model
+
+
+ Server/Database
+ Database
+ User or Model
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/Last Successful Backup Date.xml b/samples/features/epm-framework/sample-policies/Last Successful Backup Date.xml
new file mode 100644
index 0000000000..6b684c7d44
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Last Successful Backup Date.xml
@@ -0,0 +1,273 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Last Successful Backup Date
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Safe Last Backup Date
+
+
+
+
+ /PolicyStore/ObjectSet/Last Successful Backup Date__ObjectSet
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Maintenance
+
+
+ Last Successful Backup Date
+
+ Checks whether a database has recent backups. Scheduling regular backups is important for protecting your databases against data loss from a variety of failures.<?char 13?>
+ <?char 13?>
+ The appropriate frequency for backing up data depends on the recovery model of the database, on business requirements regarding potential data loss, and on how frequently the database is updated. In a frequently updated database, the amount of work-loss exposure increases relatively quickly between backups.<?char 13?>
+ <?char 13?>
+ The best practice is to perform backups frequently enough to protect databases against data loss. The simple recovery model and full recovery model both require data backups. The full recovery model also requires log backups, which should be taken more often than data backups. For either recovery model, you can supplement your full backups with differential backups to efficiently reduce the risk of data loss. For a database that uses the full recovery model, Microsoft recommends that you take frequent log backups. For a production database that contains critical data, log backups would typically be taken every one to fifteen minutes. Note: The recommended method for scheduling backups is a database maintenance plan. <?char 13?>
+
+ Safe Last Backup Date
+ Last Successful Backup Date_ObjectSet
+ Microsoft Best Practices: Maintenance
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116361
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Last Successful Backup Date__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Last Successful Backup Date__ObjectSet/TargetSet/Server_/Database
+
+
+
+
+
+ /PolicyStore
+
+
+ Last Successful Backup Date_ObjectSet
+ IDatabaseMaintenanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Safe Last Backup Date
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>GE</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>DateTime</TypeClass><?char 13?>
+ <Name>LastBackupDate</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>DateTime</TypeClass><?char 13?>
+ <FunctionType>DateAdd</FunctionType><?char 13?>
+ <ReturnType>DateTime</ReturnType><?char 13?>
+ <Count>3</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>day</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>-1</Value><?char 13?>
+ </Constant><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>DateTime</TypeClass><?char 13?>
+ <FunctionType>GetDate</FunctionType><?char 13?>
+ <ReturnType>DateTime</ReturnType><?char 13?>
+ <Count>0</Count><?char 13?>
+ </Function><?char 13?>
+ </Function><?char 13?>
+ </Operator>
+
+ Safe Last Backup Date
+ Confirms that the database was backed up within the last day.
+ IDatabaseMaintenanceFacet
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Maintenance
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Maintenance
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Last Successful Backup Date__ObjectSet/TargetSet/Server_/Database
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Last Successful Backup Date__ObjectSet/TargetSet/Server_/Database/TargetSetLevel/Server_/Database
+
+
+
+
+
+ /PolicyStore/ObjectSet/Last Successful Backup Date__ObjectSet
+
+
+ Server/Database
+ true
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Last Successful Backup Date__ObjectSet/TargetSet/Server_/Database/TargetSetLevel/Server_/Database
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Last Successful Backup Date__ObjectSet/TargetSet/Server_/Database
+
+
+ Server/Database
+ Database
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/Public Not Granted Server Permissions.xml b/samples/features/epm-framework/sample-policies/Public Not Granted Server Permissions.xml
new file mode 100644
index 0000000000..20de56221e
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Public Not Granted Server Permissions.xml
@@ -0,0 +1,217 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Public Not Granted Server Permissions
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Public Server Role Has No Granted Permissions
+
+
+
+
+ /PolicyStore/ObjectSet/Public Not Granted Server Permissions__ObjectSet
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Security
+
+
+ Public Not Granted Server Permissions
+ Checks that the server permission is not granted to the Public role.
+ Public Server Role Has No Granted Permissions
+ Public Not Granted Server Permissions_ObjectSet
+ Microsoft Best Practices: Security
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116364
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Public Not Granted Server Permissions__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Public Not Granted Server Permissions__ObjectSet/TargetSet/Server
+
+
+
+
+
+ /PolicyStore
+
+
+ Public Not Granted Server Permissions_ObjectSet
+ IServerSecurityFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Public Server Role Has No Granted Permissions
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <Name>PublicServerRoleIsGrantedPermissions</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <FunctionType>False</FunctionType><?char 13?>
+ <ReturnType>Bool</ReturnType><?char 13?>
+ <Count>0</Count><?char 13?>
+ </Function><?char 13?>
+ </Operator>
+
+ Public Server Role Has No Granted Permissions
+ Confirms that the Server permission is not granted to the Public role.
+ IServerSecurityFacet
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Security
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Security
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Public Not Granted Server Permissions__ObjectSet/TargetSet/Server
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Public Not Granted Server Permissions__ObjectSet
+
+
+ Server
+ true
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/README.md b/samples/features/epm-framework/sample-policies/README.md
new file mode 100644
index 0000000000..56ceb8c9c7
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/README.md
@@ -0,0 +1,3 @@
+# Policy-Based Management Sample Policies
+
+A set of sample policies is provided, which can be imported for use as rules to be evaluated against the database engine. For more about the best practice rules behind these samples and how to import a policy-based management policy, please see [Policy-Based Management on Microsoft Docs](https://docs.microsoft.com/sql/relational-databases/policy-based-management/monitor-and-enforce-best-practices-by-using-policy-based-management).
diff --git a/samples/features/epm-framework/sample-policies/Read-only Database Recovery Model.xml b/samples/features/epm-framework/sample-policies/Read-only Database Recovery Model.xml
new file mode 100644
index 0000000000..16162ee127
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Read-only Database Recovery Model.xml
@@ -0,0 +1,436 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Read-only Database Recovery Model
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Recovery Model Simple
+
+
+
+
+ /PolicyStore/ObjectSet/Read-only Database Recovery Model__ObjectSet
+
+
+
+
+ /PolicyStore/Condition/Enterprise or Standard Edition
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Maintenance
+
+
+ Read-only Database Recovery Model
+ Checks whether the recovery model is set to simple for read only databases.
+ Recovery Model Simple
+ Read-only Database Recovery Model_ObjectSet
+ Enterprise or Standard Edition
+ Microsoft Best Practices: Maintenance
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116383
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Read-only Database Recovery Model__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Read-only Database Recovery Model__ObjectSet/TargetSet/Server_/Database
+
+
+
+
+
+ /PolicyStore
+
+
+ Read-only Database Recovery Model_ObjectSet
+ IDatabaseMaintenanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Recovery Model Simple
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>RecoveryModel</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>Enum</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Microsoft.SqlServer.Management.Smo.RecoveryModel</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Simple</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ </Operator>
+
+ Recovery Model Simple
+ Confirms that the database recovery model is set to simple.
+ IDatabaseMaintenanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Enterprise or Standard Edition
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>OR</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>EngineEdition</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>Enum</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Microsoft.SqlServer.Management.Smo.Edition</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Standard</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ </Operator><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>EngineEdition</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>Enum</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Microsoft.SqlServer.Management.Smo.Edition</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>EnterpriseOrDeveloper</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ </Operator><?char 13?>
+ </Operator>
+
+ Enterprise or Standard Edition
+ Confirms that the instance of SQL Server is either Enterprise or Standard Edition.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Maintenance
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Maintenance
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Read-only Database Recovery Model__ObjectSet/TargetSet/Server_/Database
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Read-only Database Recovery Model__ObjectSet/TargetSet/Server_/Database/TargetSetLevel/Server_/Database
+
+
+
+
+
+ /PolicyStore/ObjectSet/Read-only Database Recovery Model__ObjectSet
+
+
+ Server/Database
+ true
+
+
+
+
+
+
+ /PolicyStore/Condition/Read-only
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>AND</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>AND</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <Name>ReadOnly</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <FunctionType>True</FunctionType><?char 13?>
+ <ReturnType>Bool</ReturnType><?char 13?>
+ <Count>0</Count><?char 13?>
+ </Function><?char 13?>
+ </Operator><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>Status</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>Enum</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Microsoft.SqlServer.Management.Smo.DatabaseStatus</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Normal</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ </Operator><?char 13?>
+ </Operator><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <Name>IsSystemObject</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <FunctionType>False</FunctionType><?char 13?>
+ <ReturnType>Bool</ReturnType><?char 13?>
+ <Count>0</Count><?char 13?>
+ </Function><?char 13?>
+ </Operator><?char 13?>
+ </Operator>
+
+ Read-only
+ Confirms that the database ReadOnly property is equal to true.
+ Database
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Read-only Database Recovery Model__ObjectSet/TargetSet/Server_/Database/TargetSetLevel/Server_/Database
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Read-only Database Recovery Model__ObjectSet/TargetSet/Server_/Database
+
+
+
+
+ /PolicyStore/Condition/Read-only
+
+
+ Server/Database
+ Database
+ Read-only
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/SQL Server 32-bit Affinity Mask Overlap.xml b/samples/features/epm-framework/sample-policies/SQL Server 32-bit Affinity Mask Overlap.xml
new file mode 100644
index 0000000000..8093c4f563
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/SQL Server 32-bit Affinity Mask Overlap.xml
@@ -0,0 +1,268 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/SQL Server 32-bit Affinity Mask Overlap
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/32-bit Affinity Mask Overlapped
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server 32-bit Affinity Mask Overlap__ObjectSet
+
+
+
+
+ /PolicyStore/Condition/32-bit Configuration
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+ SQL Server 32-bit Affinity Mask Overlap
+ Checks an instance of SQL Server having processors that are assigned with both the affinity mask and the affinity I/O mask options. On a computer that has more than one processor, the affinity mask and the affinity I/O mask options are used to designate which CPUs are used by SQL Server. Enabling a CPU with both the affinity mask and the affinity I/O mask can slow performance by forcing the processor to be overused.
+ 32-bit Affinity Mask Overlapped
+ SQL Server 32-bit Affinity Mask Overlap_ObjectSet
+ 32-bit Configuration
+ Microsoft Best Practices: Performance
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116381
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server 32-bit Affinity Mask Overlap__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server 32-bit Affinity Mask Overlap__ObjectSet/TargetSet/Server
+
+
+
+
+
+ /PolicyStore
+
+
+ SQL Server 32-bit Affinity Mask Overlap_ObjectSet
+ IServerPerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/32-bit Affinity Mask Overlapped
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>BitwiseAnd</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>AffinityMask</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>AffinityIOMask</Name><?char 13?>
+ </Attribute><?char 13?>
+ </Function><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ 32-bit Affinity Mask Overlapped
+ Confirms that the same CPUs are not enabled with both the affinity mask option and the affinity I/O mask option, which can slow performance.
+ IServerPerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/32-bit Configuration
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <Name>Platform</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>NT INTEL X86</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ 32-bit Configuration
+ Confirms that the version of SQL Server uses 32-bit configuration.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Performance
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server 32-bit Affinity Mask Overlap__ObjectSet/TargetSet/Server
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server 32-bit Affinity Mask Overlap__ObjectSet
+
+
+ Server
+ true
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/SQL Server 64-bit Affinity Mask Overlap.xml b/samples/features/epm-framework/sample-policies/SQL Server 64-bit Affinity Mask Overlap.xml
new file mode 100644
index 0000000000..a277f6c9f1
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/SQL Server 64-bit Affinity Mask Overlap.xml
@@ -0,0 +1,316 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/SQL Server 64-bit Affinity Mask Overlap
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/64-bit Affinity Mask Overlapped
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server 64-bit Affinity Mask Overlap__ObjectSet
+
+
+
+
+ /PolicyStore/Condition/64-bit Configuration
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+ SQL Server 64-bit Affinity Mask Overlap
+ Checks an instance of SQL Server having processors that are assigned with both the affinity64 mask and the affinity64 I/O mask options. On a computer that has more than one processor, the affinity64 mask and the affinity64 I/O mask options are used to designate which CPUs are used by SQL Server. Enabling a CPU with both the affinity64 mask and the affinity64 I/O mask can slow performance by forcing the processor to be overused.
+ 64-bit Affinity Mask Overlapped
+ SQL Server 64-bit Affinity Mask Overlap_ObjectSet
+ 64-bit Configuration
+ Microsoft Best Practices: Performance
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116381
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server 64-bit Affinity Mask Overlap__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server 64-bit Affinity Mask Overlap__ObjectSet/TargetSet/Server
+
+
+
+
+
+ /PolicyStore
+
+
+ SQL Server 64-bit Affinity Mask Overlap_ObjectSet
+ IServerPerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/64-bit Affinity Mask Overlapped
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>AND</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>BitwiseAnd</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>AffinityMask</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>AffinityIOMask</Name><?char 13?>
+ </Attribute><?char 13?>
+ </Function><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>BitwiseAnd</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>Affinity64Mask</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>Affinity64IOMask</Name><?char 13?>
+ </Attribute><?char 13?>
+ </Function><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator><?char 13?>
+ </Operator>
+
+ 64-bit Affinity Mask Overlapped
+ Confirms that the same CPUs are not enabled with both the affinity mask option and the affinity I/O mask option, which can slow performance.
+ IServerPerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/64-bit Configuration
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>OR</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <Name>Platform</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>NT AMD64</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <Name>Platform</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>NT INTEL IA64</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator><?char 13?>
+ </Operator>
+
+ 64-bit Configuration
+ Confirms that the version of SQL Server uses 64-bit configuration.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Performance
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server 64-bit Affinity Mask Overlap__ObjectSet/TargetSet/Server
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server 64-bit Affinity Mask Overlap__ObjectSet
+
+
+ Server
+ true
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/SQL Server Affinity Mask.xml b/samples/features/epm-framework/sample-policies/SQL Server Affinity Mask.xml
new file mode 100644
index 0000000000..7cacba4ee3
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/SQL Server Affinity Mask.xml
@@ -0,0 +1,220 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/SQL Server Affinity Mask
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Affinity Mask Default
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Affinity Mask__ObjectSet
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+ SQL Server Affinity Mask
+
+ Checks an instance of SQL Server for setting, affinity mask to its default value 0, since in most cases, the Microsoft Windows 2000 or Windows Server 2003 default affinity provides the best performance. <?char 13?>
+ <?char 13?>
+ Confirms whether the setting affinity mask of server is set to zero.<?char 13?>
+
+ Affinity Mask Default
+ SQL Server Affinity Mask_ObjectSet
+ Microsoft Best Practices: Performance
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116357
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Affinity Mask__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Affinity Mask__ObjectSet/TargetSet/Server
+
+
+
+
+
+ /PolicyStore
+
+
+ SQL Server Affinity Mask_ObjectSet
+ IServerPerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Affinity Mask Default
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>AffinityMask</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ Affinity Mask Default
+ Confirms whether the setting affinity mask of server is set to zero.
+ IServerPerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Performance
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Affinity Mask__ObjectSet/TargetSet/Server
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Affinity Mask__ObjectSet
+
+
+ Server
+ true
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/SQL Server Blocked Process Threshold.xml b/samples/features/epm-framework/sample-policies/SQL Server Blocked Process Threshold.xml
new file mode 100644
index 0000000000..406b01f64b
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/SQL Server Blocked Process Threshold.xml
@@ -0,0 +1,277 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/SQL Server Blocked Process Threshold
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Blocked Process Threshold Optimized
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Blocked Process Threshold__ObjectSet
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+ SQL Server Blocked Process Threshold
+ Checks whether the blocked process threshold option is set lower than 5 and is not disabled (0). Setting the blocked process threshold option to a value from 1 to 4 can cause the deadlock monitor to run constantly. Values 1 to 4 should only be used for troubleshooting and never long term or in a production environment without the assistance of Microsoft Customer Service and Support.
+ Blocked Process Threshold Optimized
+ SQL Server Blocked Process Threshold_ObjectSet
+ SQL Server 2005 or a Later Version
+ Microsoft Best Practices: Performance
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116356
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Blocked Process Threshold__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Blocked Process Threshold__ObjectSet/TargetSet/Server
+
+
+
+
+
+ /PolicyStore
+
+
+ SQL Server Blocked Process Threshold_ObjectSet
+ IServerPerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Blocked Process Threshold Optimized
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>OR</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>GE</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>BlockedProcessThreshold</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>5</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>BlockedProcessThreshold</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator><?char 13?>
+ </Operator>
+
+ Blocked Process Threshold Optimized
+ Confirms that the blocked process threshold property is set higher than 4, or is disabled (0).
+ IServerPerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>GE</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>VersionMajor</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>9</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ SQL Server 2005 or a Later Version
+ Confirms that the version of SQL Server is 2005 or a later version.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Performance
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Blocked Process Threshold__ObjectSet/TargetSet/Server
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Blocked Process Threshold__ObjectSet
+
+
+ Server
+ true
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/SQL Server Default Trace.xml b/samples/features/epm-framework/sample-policies/SQL Server Default Trace.xml
new file mode 100644
index 0000000000..574f8b832c
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/SQL Server Default Trace.xml
@@ -0,0 +1,259 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/SQL Server Default Trace
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Default Trace Enabled
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Default Trace__ObjectSet
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Audit
+
+
+ SQL Server Default Trace
+ Checks whether default trace is turned on to collect information about configuration and DDL changes to the instance of SQL Server. This information can be helpful for customers and Microsoft Technical Support when troubleshooting issues with the Database Engine.
+ Default Trace Enabled
+ SQL Server Default Trace_ObjectSet
+ SQL Server 2005 or a Later Version
+ Microsoft Best Practices: Audit
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116384
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Default Trace__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Default Trace__ObjectSet/TargetSet/Server
+
+
+
+
+
+ /PolicyStore
+
+
+ SQL Server Default Trace_ObjectSet
+ IServerAuditFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Default Trace Enabled
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <Name>DefaultTraceEnabled</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <FunctionType>True</FunctionType><?char 13?>
+ <ReturnType>Bool</ReturnType><?char 13?>
+ <Count>0</Count><?char 13?>
+ </Function><?char 13?>
+ </Operator>
+
+ Default Trace Enabled
+ Confirms that the default trace enabled options is turned on.
+ IServerAuditFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>GE</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>VersionMajor</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>9</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ SQL Server 2005 or a Later Version
+ Confirms that the version of SQL Server is 2005 or a later version.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Audit
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Audit
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Default Trace__ObjectSet/TargetSet/Server
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Default Trace__ObjectSet
+
+
+ Server
+ true
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/SQL Server Dynamic Locks.xml b/samples/features/epm-framework/sample-policies/SQL Server Dynamic Locks.xml
new file mode 100644
index 0000000000..1f352b3a56
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/SQL Server Dynamic Locks.xml
@@ -0,0 +1,258 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/SQL Server Dynamic Locks
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Auto-configured Dynamic Locks
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Dynamic Locks__ObjectSet
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+ SQL Server Dynamic Locks
+ Checks whether the value of the locks option is the default setting of 0. This enables the Database Engine to allocate and deallocate lock structures dynamically, based on changing system requirements. If locks is nonzero, batch jobs will stop, and an out of locks error message will be generated when the value specified is exceeded.
+ Auto-configured Dynamic Locks
+ SQL Server Dynamic Locks_ObjectSet
+ SQL Server 2005 or a Later Version
+ Microsoft Best Practices: Performance
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116358
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Dynamic Locks__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Dynamic Locks__ObjectSet/TargetSet/Server
+
+
+
+
+
+ /PolicyStore
+
+
+ SQL Server Dynamic Locks_ObjectSet
+ IServerPerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Auto-configured Dynamic Locks
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>DynamicLocks</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ Auto-configured Dynamic Locks
+ Confirms that the locks option is set to zero. This is the recommended default value.
+ IServerPerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>GE</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>VersionMajor</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>9</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ SQL Server 2005 or a Later Version
+ Confirms that the version of SQL Server is 2005 or a later version.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Performance
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Dynamic Locks__ObjectSet/TargetSet/Server
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Dynamic Locks__ObjectSet
+
+
+ Server
+ true
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/SQL Server I_O Affinity Mask For Non-enterprise SQL Servers.xml b/samples/features/epm-framework/sample-policies/SQL Server I_O Affinity Mask For Non-enterprise SQL Servers.xml
new file mode 100644
index 0000000000..22b0c19334
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/SQL Server I_O Affinity Mask For Non-enterprise SQL Servers.xml
@@ -0,0 +1,269 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/SQL Server I_/O Affinity Mask For Non-enterprise SQL Servers
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/I_/O Affinity Mask Disabled
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server I_/O Affinity Mask For Non-enterprise SQL Servers__ObjectSet
+
+
+
+
+ /PolicyStore/Condition/Not Enterprise Edition
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+ SQL Server I/O Affinity Mask For Non-enterprise SQL Servers
+ Checks that the I/O Affinity Mask is disabled for non-enterprise editions.
+ I/O Affinity Mask Disabled
+ SQL Server I/O Affinity Mask For Non-enterprise SQL Servers_ObjectSet
+ Not Enterprise Edition
+ Microsoft Best Practices: Performance
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116381
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server I_/O Affinity Mask For Non-enterprise SQL Servers__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server I_/O Affinity Mask For Non-enterprise SQL Servers__ObjectSet/TargetSet/Server
+
+
+
+
+
+ /PolicyStore
+
+
+ SQL Server I/O Affinity Mask For Non-enterprise SQL Servers_ObjectSet
+ IServerConfigurationFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/I_/O Affinity Mask Disabled
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>AffinityIOMask</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ I/O Affinity Mask Disabled
+ Confirms that the server I/O affinity mask property is disabled.
+ IServerConfigurationFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Not Enterprise Edition
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>NE</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>EngineEdition</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>Enum</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Microsoft.SqlServer.Management.Smo.Edition</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>EnterpriseOrDeveloper</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ </Operator>
+
+ Not Enterprise Edition
+ Confirms that the instance of SQL Server is not Enterprise Edition.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Performance
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server I_/O Affinity Mask For Non-enterprise SQL Servers__ObjectSet/TargetSet/Server
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server I_/O Affinity Mask For Non-enterprise SQL Servers__ObjectSet
+
+
+ Server
+ true
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/SQL Server Lightweight Pooling.xml b/samples/features/epm-framework/sample-policies/SQL Server Lightweight Pooling.xml
new file mode 100644
index 0000000000..02cc47180d
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/SQL Server Lightweight Pooling.xml
@@ -0,0 +1,217 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/SQL Server Lightweight Pooling
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Lightweight Pooling Disabled
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Lightweight Pooling__ObjectSet
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+ SQL Server Lightweight Pooling
+ Checks whether lightweight pooling is disabled on the server. Setting lightweightpooling to 1 causes SQL Server to switch to fiber mode scheduling. Fiber mode is intended for certain situations when the context switching of the UMS workers are the critical bottleneck in performance. Because this situation is unusual, fiber mode rarely enhances performance or scalability on the typical system.
+ Lightweight Pooling Disabled
+ SQL Server Lightweight Pooling_ObjectSet
+ Microsoft Best Practices: Performance
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116350
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Lightweight Pooling__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Lightweight Pooling__ObjectSet/TargetSet/Server
+
+
+
+
+
+ /PolicyStore
+
+
+ SQL Server Lightweight Pooling_ObjectSet
+ IServerPerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Lightweight Pooling Disabled
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <Name>LightweightPoolingEnabled</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <FunctionType>False</FunctionType><?char 13?>
+ <ReturnType>Bool</ReturnType><?char 13?>
+ <Count>0</Count><?char 13?>
+ </Function><?char 13?>
+ </Operator>
+
+ Lightweight Pooling Disabled
+ Confirms that lightweight pooling is disabled on the server.
+ IServerPerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Performance
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Lightweight Pooling__ObjectSet/TargetSet/Server
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Lightweight Pooling__ObjectSet
+
+
+ Server
+ true
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/SQL Server Login Mode.xml b/samples/features/epm-framework/sample-policies/SQL Server Login Mode.xml
new file mode 100644
index 0000000000..a16c61c840
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/SQL Server Login Mode.xml
@@ -0,0 +1,216 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/SQL Server Login Mode
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Windows Authentication Mode
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Login Mode__ObjectSet
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Security
+
+
+ SQL Server Login Mode
+ Checks for Windows Authentication. When possible, Microsoft recommends using Windows Authentication. Windows Authentication uses Kerberos security protocol, provides password policy enforcement in terms of complexity validation for strong passwords (applies only to Windows Server 2003 and later), provides support for account lockout, and supports password expiration.
+ Windows Authentication Mode
+ SQL Server Login Mode_ObjectSet
+ Microsoft Best Practices: Security
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116369
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Login Mode__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Login Mode__ObjectSet/TargetSet/Server
+
+
+
+
+
+ /PolicyStore
+
+
+ SQL Server Login Mode_ObjectSet
+ IServerSecurityFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Windows Authentication Mode
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>LoginMode</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>Microsoft.SqlServer.Management.Smo.ServerLoginMode</ObjType><?char 13?>
+ <Value>Integrated</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ Windows Authentication Mode
+ Confirms that the server LoginMode is Windows integrated authentication.
+ IServerSecurityFacet
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Security
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Security
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Login Mode__ObjectSet/TargetSet/Server
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Login Mode__ObjectSet
+
+
+ Server
+ true
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/SQL Server Max Degree of Parallelism.xml b/samples/features/epm-framework/sample-policies/SQL Server Max Degree of Parallelism.xml
new file mode 100644
index 0000000000..f4a5830849
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/SQL Server Max Degree of Parallelism.xml
@@ -0,0 +1,216 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/SQL Server Max Degree of Parallelism
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Maximum Degree of Parallelism Optimized
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Max Degree of Parallelism__ObjectSet
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+ SQL Server Max Degree of Parallelism
+ Checks the max degree of parallelism option for the optimal value to avoid unwanted resource consumption and performance degradation. The recommended value of this option is 8 or less. Setting this option to a larger value often results in unwanted resource consumption and performance degradation.
+ Maximum Degree of Parallelism Optimized
+ SQL Server Max Degree of Parallelism_ObjectSet
+ Microsoft Best Practices: Performance
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116335
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Max Degree of Parallelism__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Max Degree of Parallelism__ObjectSet/TargetSet/Server
+
+
+
+
+
+ /PolicyStore
+
+
+ SQL Server Max Degree of Parallelism_ObjectSet
+ IServerPerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Maximum Degree of Parallelism Optimized
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>LE</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>MaxDegreeOfParallelism</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>8</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ Maximum Degree of Parallelism Optimized
+ Confirms that the maximum degree of parallelism is less than 8. Eight is optimal.
+ IServerPerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Performance
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Max Degree of Parallelism__ObjectSet/TargetSet/Server
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Max Degree of Parallelism__ObjectSet
+
+
+ Server
+ true
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/SQL Server Max Worker Threads for SQL Server 2005 and above.xml b/samples/features/epm-framework/sample-policies/SQL Server Max Worker Threads for SQL Server 2005 and above.xml
new file mode 100644
index 0000000000..5f699534fc
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/SQL Server Max Worker Threads for SQL Server 2005 and above.xml
@@ -0,0 +1,258 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/SQL Server Max Worker Threads for SQL Server 2005 and above
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Auto-configured Maximum Worker Threads
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Max Worker Threads for SQL Server 2005 and above__ObjectSet
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+ SQL Server Max Worker Threads for SQL Server 2005 and above
+ Checks the max work threads server option for potentially incorrect settings of an instance of SQL Server 2005. Setting the max worker threads option to a nonzero value will prevent SQL Server from automatically determining the proper number of active worker threads based on user requests.
+ Auto-configured Maximum Worker Threads
+ SQL Server Max Worker Threads for SQL Server 2005 and above_ObjectSet
+ SQL Server 2005 or a Later Version
+ Microsoft Best Practices: Performance
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116324
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Max Worker Threads for SQL Server 2005 and above__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Max Worker Threads for SQL Server 2005 and above__ObjectSet/TargetSet/Server
+
+
+
+
+
+ /PolicyStore
+
+
+ SQL Server Max Worker Threads for SQL Server 2005 and above_ObjectSet
+ IServerPerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Auto-configured Maximum Worker Threads
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>MaxWorkerThreads</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ Auto-configured Maximum Worker Threads
+ Confirms that the maximum worker threads server option value is set to the recommended value for instances of SQL Server 2005 and later versions.
+ IServerPerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>GE</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>VersionMajor</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>9</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ SQL Server 2005 or a Later Version
+ Confirms that the version of SQL Server is 2005 or a later version.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Performance
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Max Worker Threads for SQL Server 2005 and above__ObjectSet/TargetSet/Server
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Max Worker Threads for SQL Server 2005 and above__ObjectSet
+
+
+ Server
+ true
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/SQL Server Network Packet Size.xml b/samples/features/epm-framework/sample-policies/SQL Server Network Packet Size.xml
new file mode 100644
index 0000000000..7207aa2df2
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/SQL Server Network Packet Size.xml
@@ -0,0 +1,216 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/SQL Server Network Packet Size
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Network Packet Size Optimized
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Network Packet Size__ObjectSet
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+ SQL Server Network Packet Size
+ Checks whether for the value specified for network packet size server option is set to the optimal value of 8060 bytes. If the network packet size of any logged-in user is more than 8060 bytes, SQL Server performs different memory allocation operations. This can cause an increase in the process virtual address space that is not reserved for the buffer pool.
+ Network Packet Size Optimized
+ SQL Server Network Packet Size_ObjectSet
+ Microsoft Best Practices: Performance
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116360
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Network Packet Size__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Network Packet Size__ObjectSet/TargetSet/Server
+
+
+
+
+
+ /PolicyStore
+
+
+ SQL Server Network Packet Size_ObjectSet
+ IServerPerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Network Packet Size Optimized
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>LE</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>NetworkPacketSize</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>8060</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ Network Packet Size Optimized
+ Confirms that the value specified for network packet size server option does not exceed 8060 bytes.
+ IServerPerformanceFacet
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Performance
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Performance
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Network Packet Size__ObjectSet/TargetSet/Server
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Network Packet Size__ObjectSet
+
+
+ Server
+ true
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/SQL Server Password Expiration.xml b/samples/features/epm-framework/sample-policies/SQL Server Password Expiration.xml
new file mode 100644
index 0000000000..805091d911
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/SQL Server Password Expiration.xml
@@ -0,0 +1,345 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/SQL Server Password Expiration
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Password Expiration Enabled
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Password Expiration__ObjectSet
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Security
+
+
+ SQL Server Password Expiration
+ Checks whether enforce password expiration on SQL Server logins is enabled. Enforce password expiration should be enabled for all SQL Server logins.
+ Password Expiration Enabled
+ SQL Server Password Expiration_ObjectSet
+ SQL Server 2005 or a Later Version
+ Microsoft Best Practices: Security
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116332
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Password Expiration__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Password Expiration__ObjectSet/TargetSet/Server_/Login
+
+
+
+
+
+ /PolicyStore
+
+
+ SQL Server Password Expiration_ObjectSet
+ ILoginOptions
+
+
+
+
+
+
+ /PolicyStore/Condition/Password Expiration Enabled
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <Name>PasswordExpirationEnabled</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <FunctionType>True</FunctionType><?char 13?>
+ <ReturnType>Bool</ReturnType><?char 13?>
+ <Count>0</Count><?char 13?>
+ </Function><?char 13?>
+ </Operator>
+
+ Password Expiration Enabled
+ Confirms that password expiration is enforced for all SQL Server logins.
+ ILoginOptions
+
+
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>GE</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>VersionMajor</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>9</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ SQL Server 2005 or a Later Version
+ Confirms that the version of SQL Server is 2005 or a later version.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Security
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Security
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Password Expiration__ObjectSet/TargetSet/Server_/Login
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Password Expiration__ObjectSet/TargetSet/Server_/Login/TargetSetLevel/Server_/Login
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Password Expiration__ObjectSet
+
+
+ Server/Login
+ true
+
+
+
+
+
+
+ /PolicyStore/Condition/SQL Server Authenticated Logins
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>LoginType</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>Enum</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Microsoft.SqlServer.Management.Smo.LoginType</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>SqlLogin</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ </Operator>
+
+ SQL Server Authenticated Logins
+
+ Login
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Password Expiration__ObjectSet/TargetSet/Server_/Login/TargetSetLevel/Server_/Login
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Password Expiration__ObjectSet/TargetSet/Server_/Login
+
+
+
+
+ /PolicyStore/Condition/SQL Server Authenticated Logins
+
+
+ Server/Login
+ Login
+ SQL Server Authenticated Logins
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/SQL Server Password Policy.xml b/samples/features/epm-framework/sample-policies/SQL Server Password Policy.xml
new file mode 100644
index 0000000000..2972e2cfce
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/SQL Server Password Policy.xml
@@ -0,0 +1,345 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/SQL Server Password Policy
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Password Policy Enforced
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Password Policy__ObjectSet
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Security
+
+
+ SQL Server Password Policy
+ Checks whether password policy enforcement on SQL Server logins is enabled. Password policy should be enforced for all SQL Server logins.
+ Password Policy Enforced
+ SQL Server Password Policy_ObjectSet
+ SQL Server 2005 or a Later Version
+ Microsoft Best Practices: Security
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116331
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Password Policy__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Password Policy__ObjectSet/TargetSet/Server_/Login
+
+
+
+
+
+ /PolicyStore
+
+
+ SQL Server Password Policy_ObjectSet
+ ILoginOptions
+
+
+
+
+
+
+ /PolicyStore/Condition/Password Policy Enforced
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <Name>PasswordPolicyEnforced</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <FunctionType>True</FunctionType><?char 13?>
+ <ReturnType>Bool</ReturnType><?char 13?>
+ <Count>0</Count><?char 13?>
+ </Function><?char 13?>
+ </Operator>
+
+ Password Policy Enforced
+ Confirms that the enforce password option on SQL Server logins is enabled.
+ ILoginOptions
+
+
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>GE</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>VersionMajor</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>9</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ SQL Server 2005 or a Later Version
+ Confirms that the version of SQL Server is 2005 or a later version.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Security
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Security
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Password Policy__ObjectSet/TargetSet/Server_/Login
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Password Policy__ObjectSet/TargetSet/Server_/Login/TargetSetLevel/Server_/Login
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Password Policy__ObjectSet
+
+
+ Server/Login
+ true
+
+
+
+
+
+
+ /PolicyStore/Condition/SQL Server Authenticated Logins
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>LoginType</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>Enum</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Microsoft.SqlServer.Management.Smo.LoginType</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>SqlLogin</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ </Operator>
+
+ SQL Server Authenticated Logins
+
+ Login
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Password Policy__ObjectSet/TargetSet/Server_/Login/TargetSetLevel/Server_/Login
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/SQL Server Password Policy__ObjectSet/TargetSet/Server_/Login
+
+
+
+
+ /PolicyStore/Condition/SQL Server Authenticated Logins
+
+
+ Server/Login
+ Login
+ SQL Server Authenticated Logins
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/Symmetric Key Encryption for User Databases.xml b/samples/features/epm-framework/sample-policies/Symmetric Key Encryption for User Databases.xml
new file mode 100644
index 0000000000..1727871673
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Symmetric Key Encryption for User Databases.xml
@@ -0,0 +1,397 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Symmetric Key Encryption for User Databases
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Strongly Encrypted
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key Encryption for User Databases__ObjectSet
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Security
+
+
+ Symmetric Key Encryption for User Databases
+ Checks that symmetric keys with a length less than 128 bytes do not use the RC2 or RC4 encryption algorithm. The best practice recommendation is to use AES 128 bit and above to create symmetric keys for data encryption. If AES is not supported by the version of your operating system, use 3DES.
+ Strongly Encrypted
+ Symmetric Key Encryption for User Databases_ObjectSet
+ SQL Server 2005 or a Later Version
+ Microsoft Best Practices: Security
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116328
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key Encryption for User Databases__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key Encryption for User Databases__ObjectSet/TargetSet/Server_/Database_/SymmetricKey
+
+
+
+
+
+ /PolicyStore
+
+
+ Symmetric Key Encryption for User Databases_ObjectSet
+ SymmetricKey
+
+
+
+
+
+
+ /PolicyStore/Condition/Strongly Encrypted
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>AND</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>NE</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>EncryptionAlgorithm</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>Enum</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Microsoft.SqlServer.Management.Smo.SymmetricKeyEncryptionAlgorithm</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>RC2</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ </Operator><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>NE</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>EncryptionAlgorithm</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>Enum</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Microsoft.SqlServer.Management.Smo.SymmetricKeyEncryptionAlgorithm</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>RC4</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ </Operator><?char 13?>
+ </Operator>
+
+ Strongly Encrypted
+ Confirms that the symmetric key encryption algorithm is neither RC2 nor RC4.
+ SymmetricKey
+
+
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>GE</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>VersionMajor</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>9</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ SQL Server 2005 or a Later Version
+ Confirms that the version of SQL Server is 2005 or a later version.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Security
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Security
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key Encryption for User Databases__ObjectSet/TargetSet/Server_/Database_/SymmetricKey
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key Encryption for User Databases__ObjectSet/TargetSet/Server_/Database_/SymmetricKey/TargetSetLevel/Server_/Database_/SymmetricKey
+
+
+ /PolicyStore/ObjectSet/Symmetric Key Encryption for User Databases__ObjectSet/TargetSet/Server_/Database_/SymmetricKey/TargetSetLevel/Server_/Database
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key Encryption for User Databases__ObjectSet
+
+
+ Server/Database/SymmetricKey
+ true
+
+
+
+
+
+
+ /PolicyStore/Condition/Key Length Less Than 128 Bytes
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>LE</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>KeyLength</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>128</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ Key Length Less Than 128 Bytes
+ Confirms that the Symmetric Key KeyLength property is less than 128 bytes.
+ SymmetricKey
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key Encryption for User Databases__ObjectSet/TargetSet/Server_/Database_/SymmetricKey/TargetSetLevel/Server_/Database_/SymmetricKey
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key Encryption for User Databases__ObjectSet/TargetSet/Server_/Database_/SymmetricKey
+
+
+
+
+ /PolicyStore/Condition/Key Length Less Than 128 Bytes
+
+
+ Server/Database/SymmetricKey
+ SymmetricKey
+ Key Length Less Than 128 Bytes
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key Encryption for User Databases__ObjectSet/TargetSet/Server_/Database_/SymmetricKey/TargetSetLevel/Server_/Database
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key Encryption for User Databases__ObjectSet/TargetSet/Server_/Database_/SymmetricKey
+
+
+ Server/Database
+ Database
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/Symmetric Key for System Databases.xml b/samples/features/epm-framework/sample-policies/Symmetric Key for System Databases.xml
new file mode 100644
index 0000000000..c84c6577fa
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Symmetric Key for System Databases.xml
@@ -0,0 +1,379 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Symmetric Key for System Databases
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Fail For Any Symmetric Key
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key for System Databases__ObjectSet
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Security
+
+
+ Symmetric Key for System Databases
+ Checks for user-created symmetric keys in the msdb, model, and tempdb databases. This is not recommended. This recommendation does not apply to the master database.
+ Fail For Any Symmetric Key
+ Symmetric Key for System Databases_ObjectSet
+ SQL Server 2005 or a Later Version
+ Microsoft Best Practices: Security
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116329
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key for System Databases__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key for System Databases__ObjectSet/TargetSet/Server_/Database_/SymmetricKey
+
+
+
+
+
+ /PolicyStore
+
+
+ Symmetric Key for System Databases_ObjectSet
+ SymmetricKey
+
+
+
+
+
+
+ /PolicyStore/Condition/Fail For Any Symmetric Key
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <FunctionType>True</FunctionType><?char 13?>
+ <ReturnType>Bool</ReturnType><?char 13?>
+ <Count>0</Count><?char 13?>
+ </Function><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <FunctionType>False</FunctionType><?char 13?>
+ <ReturnType>Bool</ReturnType><?char 13?>
+ <Count>0</Count><?char 13?>
+ </Function><?char 13?>
+ </Operator>
+
+ Fail For Any Symmetric Key
+ Confirms that symmetric keys in the database fail this condition.
+ SymmetricKey
+
+
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>GE</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>VersionMajor</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>9</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ SQL Server 2005 or a Later Version
+ Confirms that the version of SQL Server is 2005 or a later version.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Security
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Security
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key for System Databases__ObjectSet/TargetSet/Server_/Database_/SymmetricKey
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key for System Databases__ObjectSet/TargetSet/Server_/Database_/SymmetricKey/TargetSetLevel/Server_/Database_/SymmetricKey
+
+
+ /PolicyStore/ObjectSet/Symmetric Key for System Databases__ObjectSet/TargetSet/Server_/Database_/SymmetricKey/TargetSetLevel/Server_/Database
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key for System Databases__ObjectSet
+
+
+ Server/Database/SymmetricKey
+ true
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key for System Databases__ObjectSet/TargetSet/Server_/Database_/SymmetricKey/TargetSetLevel/Server_/Database_/SymmetricKey
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key for System Databases__ObjectSet/TargetSet/Server_/Database_/SymmetricKey
+
+
+ Server/Database/SymmetricKey
+ SymmetricKey
+
+
+
+
+
+
+
+ /PolicyStore/Condition/System Databases Not Including Master
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>AND</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>NE</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <Name>Name</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>master</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator><?char 13?>
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <Name>IsSystemObject</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <FunctionType>True</FunctionType><?char 13?>
+ <ReturnType>Bool</ReturnType><?char 13?>
+ <Count>0</Count><?char 13?>
+ </Function><?char 13?>
+ </Operator><?char 13?>
+ </Operator>
+
+ System Databases Not Including Master
+ Confirms that the database is a system database and its name is not master.
+ Database
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key for System Databases__ObjectSet/TargetSet/Server_/Database_/SymmetricKey/TargetSetLevel/Server_/Database
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key for System Databases__ObjectSet/TargetSet/Server_/Database_/SymmetricKey
+
+
+
+
+ /PolicyStore/Condition/System Databases Not Including Master
+
+
+ Server/Database
+ Database
+ System Databases Not Including Master
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/Symmetric Key for master Database.xml b/samples/features/epm-framework/sample-policies/Symmetric Key for master Database.xml
new file mode 100644
index 0000000000..311c2765af
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Symmetric Key for master Database.xml
@@ -0,0 +1,362 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Symmetric Key for master Database
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Microsoft Service Master Key
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key for master Database__ObjectSet
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Security
+
+
+ Symmetric Key for master Database
+ Checks for user-created symmetric keys in the master database, which is not recommended. The master database contains the Master Symmetric key.
+ Microsoft Service Master Key
+ Symmetric Key for master Database_ObjectSet
+ SQL Server 2005 or a Later Version
+ Microsoft Best Practices: Security
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116329
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key for master Database__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key for master Database__ObjectSet/TargetSet/Server_/Database_/SymmetricKey
+
+
+
+
+
+ /PolicyStore
+
+
+ Symmetric Key for master Database_ObjectSet
+ SymmetricKey
+
+
+
+
+
+
+ /PolicyStore/Condition/Microsoft Service Master Key
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Unsupported</TypeClass><?char 13?>
+ <Name>Name</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>##MS_ServiceMasterKey##</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ Microsoft Service Master Key
+
+ Confirms that the symmetric key is the Service Master Key.<?char 13?>
+ <?char 13?>
+ The Service Master Key is the root of the SQL Server encryption hierarchy. It is generated automatically the first time it is needed to encrypt another key. By default, the Service Master Key is encrypted using the Windows data protection API and using the local machine key. The Service Master Key can only be opened by the Windows service account under which it was created or by a principal with access to both the service account name and its password.<?char 13?>
+ <?char 13?>
+ Regenerating or restoring the Service Master Key involves decrypting and re-encrypting the complete encryption hierarchy. Unless the key has been compromised, this resource-intensive operation should be scheduled during a period of low demand.<?char 13?>
+
+ SymmetricKey
+
+
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>GE</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>VersionMajor</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>9</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ SQL Server 2005 or a Later Version
+ Confirms that the version of SQL Server is 2005 or a later version.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Security
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Security
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key for master Database__ObjectSet/TargetSet/Server_/Database_/SymmetricKey
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key for master Database__ObjectSet/TargetSet/Server_/Database_/SymmetricKey/TargetSetLevel/Server_/Database_/SymmetricKey
+
+
+ /PolicyStore/ObjectSet/Symmetric Key for master Database__ObjectSet/TargetSet/Server_/Database_/SymmetricKey/TargetSetLevel/Server_/Database
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key for master Database__ObjectSet
+
+
+ Server/Database/SymmetricKey
+ true
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key for master Database__ObjectSet/TargetSet/Server_/Database_/SymmetricKey/TargetSetLevel/Server_/Database_/SymmetricKey
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key for master Database__ObjectSet/TargetSet/Server_/Database_/SymmetricKey
+
+
+ Server/Database/SymmetricKey
+ SymmetricKey
+
+
+
+
+
+
+
+ /PolicyStore/Condition/Is master
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <Name>Name</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>master</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ Is master
+ Confirms that the database name is master.
+ Database
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key for master Database__ObjectSet/TargetSet/Server_/Database_/SymmetricKey/TargetSetLevel/Server_/Database
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Symmetric Key for master Database__ObjectSet/TargetSet/Server_/Database_/SymmetricKey
+
+
+
+
+ /PolicyStore/Condition/Is master
+
+
+ Server/Database
+ Database
+ Is master
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/Trustworthy Database.xml b/samples/features/epm-framework/sample-policies/Trustworthy Database.xml
new file mode 100644
index 0000000000..cd9b82fe66
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Trustworthy Database.xml
@@ -0,0 +1,335 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Trustworthy Database
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Database Owner Not sysadmin
+
+
+
+
+ /PolicyStore/ObjectSet/Trustworthy Database__ObjectSet
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Security
+
+
+ Trustworthy Database
+ Checks whether the dbo or a db_owner is assigned to a fixed server sysadmin role for databases where the trustworthy bit is set to on. Database users with the appropriate level of permissions can elevate privileges to the sysadmin role. In this role, the user can create and execute unsafe assemblies that compromise the system. The best practice is to turn off the trustworthy bit or change the dbo and db_owner to a fixed server role other than sysadmin.
+ Database Owner Not sysadmin
+ Trustworthy Database_ObjectSet
+ SQL Server 2005 or a Later Version
+ Microsoft Best Practices: Security
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116327
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Trustworthy Database__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Trustworthy Database__ObjectSet/TargetSet/Server_/Database
+
+
+
+
+
+ /PolicyStore
+
+
+ Trustworthy Database_ObjectSet
+ IDatabaseSecurityFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/Database Owner Not sysadmin
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <Name>IsOwnerSysadmin</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <FunctionType>False</FunctionType><?char 13?>
+ <ReturnType>Bool</ReturnType><?char 13?>
+ <Count>0</Count><?char 13?>
+ </Function><?char 13?>
+ </Operator>
+
+ Database Owner Not sysadmin
+ Confirms that no login in the db_owner role has sysadmin privileges.
+ IDatabaseSecurityFacet
+
+
+
+
+
+
+ /PolicyStore/Condition/SQL Server 2005 or a Later Version
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>GE</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <Name>VersionMajor</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>9</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ SQL Server 2005 or a Later Version
+ Confirms that the version of SQL Server is 2005 or a later version.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Security
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Security
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Trustworthy Database__ObjectSet/TargetSet/Server_/Database
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Trustworthy Database__ObjectSet/TargetSet/Server_/Database/TargetSetLevel/Server_/Database
+
+
+
+
+
+ /PolicyStore/ObjectSet/Trustworthy Database__ObjectSet
+
+
+ Server/Database
+ true
+
+
+
+
+
+
+ /PolicyStore/Condition/Trustworthy
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Attribute><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <Name>Trustworthy</Name><?char 13?>
+ </Attribute><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <FunctionType>True</FunctionType><?char 13?>
+ <ReturnType>Bool</ReturnType><?char 13?>
+ <Count>0</Count><?char 13?>
+ </Function><?char 13?>
+ </Operator>
+
+ Trustworthy
+ Confirms that the database Trustworthy property is equal to true.
+ IDatabaseOptions
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Trustworthy Database__ObjectSet/TargetSet/Server_/Database/TargetSetLevel/Server_/Database
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Trustworthy Database__ObjectSet/TargetSet/Server_/Database
+
+
+
+
+ /PolicyStore/Condition/Trustworthy
+
+
+ Server/Database
+ Database
+ Trustworthy
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/Windows Event Log Cluster Disk Resource Corruption Error.xml b/samples/features/epm-framework/sample-policies/Windows Event Log Cluster Disk Resource Corruption Error.xml
new file mode 100644
index 0000000000..c90d1f13d7
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Windows Event Log Cluster Disk Resource Corruption Error.xml
@@ -0,0 +1,247 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Windows Event Log Cluster Disk Resource Corruption Error
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Cluster Disk Resource Corruption Error Check
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Cluster Disk Resource Corruption Error__ObjectSet
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Windows Log File
+
+
+ Windows Event Log Cluster Disk Resource Corruption Error
+
+ Detects SCSI host adapter configuration issues or a malfunctioning device error message in the System Log.<?char 13?>
+ http://support.microsoft.com/kb/311081<?char 13?>
+
+ Cluster Disk Resource Corruption Error Check
+ Windows Event Log Cluster Disk Resource Corruption Error_ObjectSet
+ Microsoft Best Practices: Windows Log File
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116377
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Cluster Disk Resource Corruption Error__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Cluster Disk Resource Corruption Error__ObjectSet/TargetSet/Server
+
+
+
+
+
+ /PolicyStore
+
+
+ Windows Event Log Cluster Disk Resource Corruption Error_ObjectSet
+ Server
+
+
+
+
+
+
+ /PolicyStore/Condition/Cluster Disk Resource Corruption Error Check
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>IsNull</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>ExecuteWql</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>3</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Numeric</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>root\CIMV2</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>select EventCode from Win32_NTLogEvent where EventCode=1066 and Logfile="System"</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ Cluster Disk Resource Corruption Error Check
+ Confirms that an ESCSI host adapter configuration issue or a malfunctioning device error (Event ID –1066) does not exist in the system log.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Windows Log File
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Windows Log File
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Cluster Disk Resource Corruption Error__ObjectSet/TargetSet/Server
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Cluster Disk Resource Corruption Error__ObjectSet
+
+
+ Server
+ true
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/Windows Event Log Device Driver Control Error.xml b/samples/features/epm-framework/sample-policies/Windows Event Log Device Driver Control Error.xml
new file mode 100644
index 0000000000..902bd3a1c4
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Windows Event Log Device Driver Control Error.xml
@@ -0,0 +1,248 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Windows Event Log Device Driver Control Error
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Device Driver Control Error Check
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Device Driver Control Error__ObjectSet
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Windows Log File
+
+
+ Windows Event Log Device Driver Control Error
+
+ Detects Error EventID –11 in the System Log. This error could be because of a corrupted device driver, a hardware problem, a malfunctioning device, poor cabling, or termination issues. <?char 13?>
+ http://support.microsoft.com/kb/259237 <?char 13?>
+ http://support.microsoft.com/kb/154690
+
+ Device Driver Control Error Check
+ Windows Event Log Device Driver Control Error_ObjectSet
+ Microsoft Best Practices: Windows Log File
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116371
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Device Driver Control Error__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Device Driver Control Error__ObjectSet/TargetSet/Server
+
+
+
+
+
+ /PolicyStore
+
+
+ Windows Event Log Device Driver Control Error_ObjectSet
+ Server
+
+
+
+
+
+
+ /PolicyStore/Condition/Device Driver Control Error Check
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>IsNull</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>ExecuteWql</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>3</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Numeric</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>root\CIMV2</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>select EventCode from Win32_NTLogEvent where EventCode=11 and Logfile="System"</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ Device Driver Control Error Check
+ Confirms that an I/O time-out event error (Event ID -11) does not exist in the system log.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Windows Log File
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Windows Log File
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Device Driver Control Error__ObjectSet/TargetSet/Server
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Device Driver Control Error__ObjectSet
+
+
+ Server
+ true
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/Windows Event Log Device Not Ready Error.xml b/samples/features/epm-framework/sample-policies/Windows Event Log Device Not Ready Error.xml
new file mode 100644
index 0000000000..f87d94e5bb
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Windows Event Log Device Not Ready Error.xml
@@ -0,0 +1,248 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Windows Event Log Device Not Ready Error
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Device Not Ready Error Check
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Device Not Ready Error__ObjectSet
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Windows Log File
+
+
+ Windows Event Log Device Not Ready Error
+
+ This policy detects for error messages in Detects error messages in the System Log that can be the result of SCSI host adapter configuration issues or related problems.<?char 13?>
+ http://support.microsoft.com/kb/259237<?char 13?>
+ http://support.microsoft.com/kb/154690<?char 13?>
+
+ Device Not Ready Error Check
+ Windows Event Log Device Not Ready Error_ObjectSet
+ Microsoft Best Practices: Windows Log File
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116349
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Device Not Ready Error__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Device Not Ready Error__ObjectSet/TargetSet/Server
+
+
+
+
+
+ /PolicyStore
+
+
+ Windows Event Log Device Not Ready Error_ObjectSet
+ Server
+
+
+
+
+
+
+ /PolicyStore/Condition/Device Not Ready Error Check
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>IsNull</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>ExecuteWql</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>3</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Numeric</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>root\CIMV2</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>select EventCode from Win32_NTLogEvent where EventCode=15 and Logfile="System"</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ Device Not Ready Error Check
+ Confirms that a Device Not Ready Error (Event ID –15) does not exist in the system log.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Windows Log File
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Windows Log File
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Device Not Ready Error__ObjectSet/TargetSet/Server
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Device Not Ready Error__ObjectSet
+
+
+ Server
+ true
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/Windows Event Log Failed I_O Request Error.xml b/samples/features/epm-framework/sample-policies/Windows Event Log Failed I_O Request Error.xml
new file mode 100644
index 0000000000..0f111e17e2
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Windows Event Log Failed I_O Request Error.xml
@@ -0,0 +1,248 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Windows Event Log Failed I_/O Request Error
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Failed I_/O Request Check
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Failed I_/O Request Error__ObjectSet
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Windows Log File
+
+
+ Windows Event Log Failed I/O Request Error
+
+ This policy detects a failed I/O request error message in the system log. This could be the result of a variety of things, including a firmware bug or faulty SCSI cables.<?char 13?>
+ http://support.microsoft.com/kb/311081<?char 13?>
+ http://support.microsoft.com/kb/885688<?char 13?>
+
+ Failed I/O Request Check
+ Windows Event Log Failed I/O Request Error_ObjectSet
+ Microsoft Best Practices: Windows Log File
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116385
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Failed I_/O Request Error__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Failed I_/O Request Error__ObjectSet/TargetSet/Server
+
+
+
+
+
+ /PolicyStore
+
+
+ Windows Event Log Failed I/O Request Error_ObjectSet
+ Server
+
+
+
+
+
+
+ /PolicyStore/Condition/Failed I_/O Request Check
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>IsNull</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>ExecuteWql</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>3</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Numeric</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>root\CIMV2</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>select EventCode from Win32_NTLogEvent where EventCode=50 and Logfile="System"</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ Failed I/O Request Check
+ Confirms that a failed I/O request (Event ID 50) does not exist in the system log.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Windows Log File
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Windows Log File
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Failed I_/O Request Error__ObjectSet/TargetSet/Server
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Failed I_/O Request Error__ObjectSet
+
+
+ Server
+ true
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/Windows Event Log I_O Delay Warning.xml b/samples/features/epm-framework/sample-policies/Windows Event Log I_O Delay Warning.xml
new file mode 100644
index 0000000000..542ed21556
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Windows Event Log I_O Delay Warning.xml
@@ -0,0 +1,244 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Windows Event Log I_/O Delay Warning
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/I_/O Delay Warning Check
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log I_/O Delay Warning__ObjectSet
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Windows Log File
+
+
+ Windows Event Log I/O Delay Warning
+ Detects Event ID 833 in the system log. This message indicates that SQL Server has issued a read or write request from disk, and that the request has taken longer than 15 seconds to return. This error is reported by SQL Server and indicates a problem with the disk I/O subsystem. Delays this long can severely limit the performance of your instance of SQL Server.
+ I/O Delay Warning Check
+ Windows Event Log I/O Delay Warning_ObjectSet
+ Microsoft Best Practices: Windows Log File
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116375
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log I_/O Delay Warning__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log I_/O Delay Warning__ObjectSet/TargetSet/Server
+
+
+
+
+
+ /PolicyStore
+
+
+ Windows Event Log I/O Delay Warning_ObjectSet
+ Server
+
+
+
+
+
+
+ /PolicyStore/Condition/I_/O Delay Warning Check
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>IsNull</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>ExecuteWql</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>3</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Numeric</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>root\CIMV2</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>select EventCode from Win32_NTLogEvent where EventCode=833 and Logfile="System"</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ I/O Delay Warning Check
+ Confirms that an I/O delay warning (Event ID 833) does not exist in the system log.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Windows Log File
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Windows Log File
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log I_/O Delay Warning__ObjectSet/TargetSet/Server
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log I_/O Delay Warning__ObjectSet
+
+
+ Server
+ true
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/Windows Event Log I_O Error During Hard Page Fault Error.xml b/samples/features/epm-framework/sample-policies/Windows Event Log I_O Error During Hard Page Fault Error.xml
new file mode 100644
index 0000000000..91c80ed1de
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Windows Event Log I_O Error During Hard Page Fault Error.xml
@@ -0,0 +1,248 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Windows Event Log I_/O Error During Hard Page Fault Error
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/I_/O Error During Hard Page Fault Error Check
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log I_/O Error During Hard Page Fault Error__ObjectSet
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Windows Log File
+
+
+ Windows Event Log I/O Error During Hard Page Fault Error
+
+ DetectsI/O Error during hard page fault in System Log.<?char 13?>
+ http://support.microsoft.com/kb/304415 <?char 13?>
+ http://support.microsoft.com/kb/305547<?char 13?>
+
+ I/O Error During Hard Page Fault Error Check
+ Windows Event Log I/O Error During Hard Page Fault Error_ObjectSet
+ Microsoft Best Practices: Windows Log File
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116355
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log I_/O Error During Hard Page Fault Error__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log I_/O Error During Hard Page Fault Error__ObjectSet/TargetSet/Server
+
+
+
+
+
+ /PolicyStore
+
+
+ Windows Event Log I/O Error During Hard Page Fault Error_ObjectSet
+ Server
+
+
+
+
+
+
+ /PolicyStore/Condition/I_/O Error During Hard Page Fault Error Check
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>IsNull</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>ExecuteWql</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>3</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Numeric</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>root\CIMV2</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>select EventCode from Win32_NTLogEvent where EventCode=51 and Logfile="System"</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ I/O Error During Hard Page Fault Error Check
+ Confirms that an I/O Error during hard page fault (Event ID – 51) does not exist in the system log.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Windows Log File
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Windows Log File
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log I_/O Error During Hard Page Fault Error__ObjectSet/TargetSet/Server
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log I_/O Error During Hard Page Fault Error__ObjectSet
+
+
+ Server
+ true
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/Windows Event Log Read Retry Error.xml b/samples/features/epm-framework/sample-policies/Windows Event Log Read Retry Error.xml
new file mode 100644
index 0000000000..6ecf92590a
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Windows Event Log Read Retry Error.xml
@@ -0,0 +1,244 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Windows Event Log Read Retry Error
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Read Retry Error Check
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Read Retry Error__ObjectSet
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Windows Log File
+
+
+ Windows Event Log Read Retry Error
+ Detects Error Event ID 825 in the system log. This error message indicates that SQL Server could not read data from the disk on the first try. This message indicates a major problem with the disk I/O subsystem, not with SQL Server itself. However, the disk problem can cause data loss or database corruption if it is not resolved.
+ Read Retry Error Check
+ Windows Event Log Read Retry Error_ObjectSet
+ Microsoft Best Practices: Windows Log File
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116339
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Read Retry Error__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Read Retry Error__ObjectSet/TargetSet/Server
+
+
+
+
+
+ /PolicyStore
+
+
+ Windows Event Log Read Retry Error_ObjectSet
+ Server
+
+
+
+
+
+
+ /PolicyStore/Condition/Read Retry Error Check
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>IsNull</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>ExecuteWql</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>3</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Numeric</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>root\CIMV2</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>select EventCode from Win32_NTLogEvent where EventCode=825 and Logfile="System"</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ Read Retry Error Check
+ Confirms that read retry issues (Event ID 825) do not exist in the system log.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Windows Log File
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Windows Log File
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Read Retry Error__ObjectSet/TargetSet/Server
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Read Retry Error__ObjectSet
+
+
+ Server
+ true
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/Windows Event Log Storage System I_O Timeout Error.xml b/samples/features/epm-framework/sample-policies/Windows Event Log Storage System I_O Timeout Error.xml
new file mode 100644
index 0000000000..77b46f32b0
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Windows Event Log Storage System I_O Timeout Error.xml
@@ -0,0 +1,248 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Windows Event Log Storage System I_/O Timeout Error
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/Storage System I_/O Timeout Error Check
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Storage System I_/O Timeout Error__ObjectSet
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Windows Log File
+
+
+ Windows Event Log Storage System I/O Timeout Error
+
+ Detects Error EventID –9 in the System Log. This error indicates that I/O time-out has occurred within the storage system, as detected from the driver for the controller. <?char 13?>
+ http://support.microsoft.com/kb/259237 <?char 13?>
+ http://support.microsoft.com/kb/154690
+
+ Storage System I/O Timeout Error Check
+ Windows Event Log Storage System I/O Timeout Error_ObjectSet
+ Microsoft Best Practices: Windows Log File
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116330
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Storage System I_/O Timeout Error__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Storage System I_/O Timeout Error__ObjectSet/TargetSet/Server
+
+
+
+
+
+ /PolicyStore
+
+
+ Windows Event Log Storage System I/O Timeout Error_ObjectSet
+ Server
+
+
+
+
+
+
+ /PolicyStore/Condition/Storage System I_/O Timeout Error Check
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>IsNull</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>ExecuteWql</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>3</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Numeric</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>root\CIMV2</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>select EventCode from Win32_NTLogEvent where EventCode=9 and Logfile="System"</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ Storage System I/O Timeout Error Check
+ Confirms that an I/O time-out event error (Event ID -9) does not exist in the system log.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Windows Log File
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Windows Log File
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Storage System I_/O Timeout Error__ObjectSet/TargetSet/Server
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log Storage System I_/O Timeout Error__ObjectSet
+
+
+ Server
+ true
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/epm-framework/sample-policies/Windows Event Log System Failure Error.xml b/samples/features/epm-framework/sample-policies/Windows Event Log System Failure Error.xml
new file mode 100644
index 0000000000..81b7162dce
--- /dev/null
+++ b/samples/features/epm-framework/sample-policies/Windows Event Log System Failure Error.xml
@@ -0,0 +1,244 @@
+
+
+
+
+ <_locDefinition xmlns="urn:locstudio">
+ <_locDefault _loc="locNone" />
+ <_locTag _loc="locData">DMF:Name
+ <_locTag _loc="locData">DMF:Description
+ <_locTag _loc="locData">DMF:Condition
+ <_locTag _loc="locData">DMF:ObjectSet
+ <_locTag _loc="locData">DMF:RootCondition
+ <_locTag _loc="locData">DMF:PolicyCategory
+ <_locTag _loc="locData">DMF:HelpText
+
+
+ urn:uuid:96fe1236-abf6-4a57-b54d-e9baab394fd1
+ http://documentcollection/
+
+
+
+
+
+
+ /system/schema/DMF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /PolicyStore/Policy/Windows Event Log System Failure Error
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+
+ /PolicyStore/Condition/System Failure Error Check
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log System Failure Error__ObjectSet
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Windows Log File
+
+
+ Windows Event Log System Failure Error
+ Detects Error Event ID 6008 in the System Log. This error indicates an unexpected system shutdown. The system might be unstable and might not provide the stability and integrity that is required to host an instance of SQL Server. If it is known, you should address the root cause of the unexpected server restarts. Otherwise, move the instance of SQL Server to another computer.
+ System Failure Error Check
+ Windows Event Log System Failure Error_ObjectSet
+ Microsoft Best Practices: Windows Log File
+ false
+ None
+
+ http://go.microsoft.com/fwlink/?LinkId=116326
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log System Failure Error__ObjectSet
+
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log System Failure Error__ObjectSet/TargetSet/Server
+
+
+
+
+
+ /PolicyStore
+
+
+ Windows Event Log System Failure Error_ObjectSet
+ Server
+
+
+
+
+
+
+ /PolicyStore/Condition/System Failure Error Check
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+
+ <Operator><?char 13?>
+ <TypeClass>Bool</TypeClass><?char 13?>
+ <OpType>EQ</OpType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>IsNull</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>2</Count><?char 13?>
+ <Function><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <FunctionType>ExecuteWql</FunctionType><?char 13?>
+ <ReturnType>Numeric</ReturnType><?char 13?>
+ <Count>3</Count><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>Numeric</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>root\CIMV2</Value><?char 13?>
+ </Constant><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>String</TypeClass><?char 13?>
+ <ObjType>System.String</ObjType><?char 13?>
+ <Value>select EventCode from Win32_NTLogEvent where EventCode=6008 and Logfile="System"</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Function><?char 13?>
+ <Constant><?char 13?>
+ <TypeClass>Numeric</TypeClass><?char 13?>
+ <ObjType>System.Int32</ObjType><?char 13?>
+ <Value>0</Value><?char 13?>
+ </Constant><?char 13?>
+ </Operator>
+
+ System Failure Error Check
+ Confirms that an unexpected system shutdown error message (Event ID – 6008) does not exist in the system log.
+ Server
+
+
+
+
+
+
+ /PolicyStore/PolicyCategory/Microsoft Best Practices_b Windows Log File
+
+
+
+
+
+
+
+ /PolicyStore
+
+
+ Microsoft Best Practices: Windows Log File
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log System Failure Error__ObjectSet/TargetSet/Server
+
+
+
+
+
+
+
+ /PolicyStore/ObjectSet/Windows Event Log System Failure Error__ObjectSet
+
+
+ Server
+ true
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/features/in-memory-database/memory-optimized-tempdb-metadata/MemoryOptimizedTempDBMetadata-TSQL.ipynb b/samples/features/in-memory-database/memory-optimized-tempdb-metadata/MemoryOptimizedTempDBMetadata-TSQL.ipynb
index 5ba7d05cfa..4ededbf092 100644
--- a/samples/features/in-memory-database/memory-optimized-tempdb-metadata/MemoryOptimizedTempDBMetadata-TSQL.ipynb
+++ b/samples/features/in-memory-database/memory-optimized-tempdb-metadata/MemoryOptimizedTempDBMetadata-TSQL.ipynb
@@ -16,7 +16,7 @@
{
"cell_type": "markdown",
"source": [
- "# Exploring Memory-Optmized TempDB Metadata\r\n",
+ "# Exploring Memory-Optimized TempDB Metadata\r\n",
"\r\n",
"TempDB metadata contention has historically been a bottleneck to scalability for many workloads running on SQL Server. SQL Server 2019 introduces a new feature that is part of the [In-Memory Database](https://docs.microsoft.com/sql/relational-databases/in-memory-database) feature family, memory-optimized tempdb metadata, which effectively removes this bottleneck and unlocks a new level of scalability for tempdb-heavy workloads. In SQL Server 2019, the system tables involved in managing temp table metadata can be moved into latch-free non-durable memory-optimized tables.\r\n",
"\r\n",
@@ -487,4 +487,4 @@
"execution_count": 16
}
]
-}
\ No newline at end of file
+}
diff --git a/samples/features/intelligent-query-processing/IQP Demo - APPROX_COUNT_DISTINCT.sql b/samples/features/intelligent-query-processing/IQP Demo - APPROX_COUNT_DISTINCT.sql
index ea913b8393..f2af97ffc8 100644
--- a/samples/features/intelligent-query-processing/IQP Demo - APPROX_COUNT_DISTINCT.sql
+++ b/samples/features/intelligent-query-processing/IQP Demo - APPROX_COUNT_DISTINCT.sql
@@ -16,9 +16,6 @@ GO
ALTER DATABASE [WideWorldImportersDW] SET COMPATIBILITY_LEVEL = 150;
GO
-ALTER DATABASE SCOPED CONFIGURATION CLEAR PROCEDURE_CACHE;
-GO
-
USE [WideWorldImportersDW];
GO
diff --git a/samples/features/intelligent-query-processing/IQP Demo - Batch Mode Adaptive Join.sql b/samples/features/intelligent-query-processing/IQP Demo - Batch Mode Adaptive Join.sql
index a30ee923f8..7e685f81c0 100644
--- a/samples/features/intelligent-query-processing/IQP Demo - Batch Mode Adaptive Join.sql
+++ b/samples/features/intelligent-query-processing/IQP Demo - Batch Mode Adaptive Join.sql
@@ -16,9 +16,6 @@ GO
ALTER DATABASE [WideWorldImportersDW] SET COMPATIBILITY_LEVEL = 140;
GO
-ALTER DATABASE SCOPED CONFIGURATION CLEAR PROCEDURE_CACHE;
-GO
-
USE [WideWorldImportersDW];
GO
@@ -53,4 +50,4 @@ FROM [Fact].[Order] AS [fo]
INNER JOIN [Dimension].[Stock Item] AS [si]
ON [fo].[Stock Item Key] = [si].[Stock Item Key]
WHERE [fo].[Quantity] = 361;
-GO
\ No newline at end of file
+GO
diff --git a/samples/features/intelligent-query-processing/IQP Demo - Batch Mode MGF.sql b/samples/features/intelligent-query-processing/IQP Demo - Batch Mode MGF.sql
index 1cd6cfc679..69b5b7378f 100644
--- a/samples/features/intelligent-query-processing/IQP Demo - Batch Mode MGF.sql
+++ b/samples/features/intelligent-query-processing/IQP Demo - Batch Mode MGF.sql
@@ -16,9 +16,6 @@ GO
ALTER DATABASE [WideWorldImportersDW] SET COMPATIBILITY_LEVEL = 140;
GO
-ALTER DATABASE SCOPED CONFIGURATION CLEAR PROCEDURE_CACHE;
-GO
-
USE [WideWorldImportersDW];
GO
@@ -43,4 +40,4 @@ GO
-- Execute this query a few times - each time looking at
-- the plan to see impact on spills, memory grant size, and run time
EXEC [FactOrderByLineageKey] 9;
-GO
\ No newline at end of file
+GO
diff --git a/samples/features/intelligent-query-processing/IQP Demo - Batch Mode on Rowstore.sql b/samples/features/intelligent-query-processing/IQP Demo - Batch Mode on Rowstore.sql
index 1d0eb36ee4..0b4f636fd0 100644
--- a/samples/features/intelligent-query-processing/IQP Demo - Batch Mode on Rowstore.sql
+++ b/samples/features/intelligent-query-processing/IQP Demo - Batch Mode on Rowstore.sql
@@ -16,9 +16,6 @@ GO
ALTER DATABASE [WideWorldImportersDW] SET COMPATIBILITY_LEVEL = 150;
GO
-ALTER DATABASE SCOPED CONFIGURATION CLEAR PROCEDURE_CACHE;
-GO
-
USE [WideWorldImportersDW];
GO
@@ -54,4 +51,4 @@ GROUP BY [Tax Rate],
ORDER BY [Tax Rate],
[Lineage Key],
[Salesperson Key]
-OPTION (RECOMPILE);
\ No newline at end of file
+OPTION (RECOMPILE);
diff --git a/samples/features/intelligent-query-processing/IQP Demo - Interleaved Execution.sql b/samples/features/intelligent-query-processing/IQP Demo - Interleaved Execution.sql
index 5f58af7f33..3da3fd82c7 100644
--- a/samples/features/intelligent-query-processing/IQP Demo - Interleaved Execution.sql
+++ b/samples/features/intelligent-query-processing/IQP Demo - Interleaved Execution.sql
@@ -122,9 +122,6 @@ GO
ALTER DATABASE [WideWorldImportersDW] SET COMPATIBILITY_LEVEL = 130;
GO
-ALTER DATABASE SCOPED CONFIGURATION CLEAR PROCEDURE_CACHE;
-GO
-
USE [WideWorldImportersDW];
GO
@@ -153,9 +150,6 @@ GO
ALTER DATABASE [WideWorldImportersDW] SET COMPATIBILITY_LEVEL = 140;
GO
-ALTER DATABASE SCOPED CONFIGURATION CLEAR PROCEDURE_CACHE;
-GO
-
USE [WideWorldImportersDW];
GO
diff --git a/samples/features/intelligent-query-processing/IQP Demo - Row Mode MGF.sql b/samples/features/intelligent-query-processing/IQP Demo - Row Mode MGF.sql
index cb0ea3c252..7855dd1243 100644
--- a/samples/features/intelligent-query-processing/IQP Demo - Row Mode MGF.sql
+++ b/samples/features/intelligent-query-processing/IQP Demo - Row Mode MGF.sql
@@ -16,9 +16,6 @@ GO
ALTER DATABASE [WideWorldImportersDW] SET COMPATIBILITY_LEVEL = 150;
GO
-ALTER DATABASE SCOPED CONFIGURATION CLEAR PROCEDURE_CACHE;
-GO
-
USE [WideWorldImportersDW];
GO
diff --git a/samples/features/intelligent-query-processing/IQP Demo - Scalar UDF Inlining.sql b/samples/features/intelligent-query-processing/IQP Demo - Scalar UDF Inlining.sql
index 439742349e..e67d6522d3 100644
--- a/samples/features/intelligent-query-processing/IQP Demo - Scalar UDF Inlining.sql
+++ b/samples/features/intelligent-query-processing/IQP Demo - Scalar UDF Inlining.sql
@@ -15,9 +15,6 @@ GO
ALTER DATABASE [WideWorldImportersDW] SET COMPATIBILITY_LEVEL = 150;
GO
-ALTER DATABASE SCOPED CONFIGURATION CLEAR PROCEDURE_CACHE;
-GO
-
USE [WideWorldImportersDW];
GO
diff --git a/samples/features/intelligent-query-processing/IQP Demo - TVDC.sql b/samples/features/intelligent-query-processing/IQP Demo - TVDC.sql
index 161f4b2fcd..6a7b422e37 100644
--- a/samples/features/intelligent-query-processing/IQP Demo - TVDC.sql
+++ b/samples/features/intelligent-query-processing/IQP Demo - TVDC.sql
@@ -16,9 +16,6 @@ GO
ALTER DATABASE [WideWorldImportersDW] SET COMPATIBILITY_LEVEL = 140;
GO
-ALTER DATABASE SCOPED CONFIGURATION CLEAR PROCEDURE_CACHE;
-GO
-
USE [WideWorldImportersDW];
GO
diff --git a/samples/features/sql-big-data-cluster/deployment/README.md b/samples/features/sql-big-data-cluster/deployment/README.md
index fe5ec27790..6793158b85 100644
--- a/samples/features/sql-big-data-cluster/deployment/README.md
+++ b/samples/features/sql-big-data-cluster/deployment/README.md
@@ -13,4 +13,12 @@ Using the sample Python script in **aks** folder, you will deploy a Kubernetes c
## __[Push SQL Server big data cluster images to your own private Docker repository](offline/)__
-Using the sample Python script in **offline** folder, you will push the necessary images required for the deployment to your own repository.
\ No newline at end of file
+Using the sample Python script in **offline** folder, you will push the necessary images required for the deployment to your own repository.
+
+## __[Deploy SQL Server big data clusters (BDC) with Azure Kubernetes service (AKS) private cluster](private-aks/)__
+
+Using the sample Python script in **private-aks** folder, you will Deploy SQL Server big data cluster in in your private network with Azure Kubernetes service (AKS) private cluster.
+
+## __[OpenShift manifests and scripts](openshift/)__
+
+Use manifests and scripts in **openshift** folder, to support SQL Server Big Data Clusters on OpenShift.
\ No newline at end of file
diff --git a/samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu-single-node-vm-ad/cleanup-bdc.sh b/samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu-single-node-vm-ad/cleanup-bdc.sh
index 9a53ae8c40..24c5cfbcf7 100644
--- a/samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu-single-node-vm-ad/cleanup-bdc.sh
+++ b/samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu-single-node-vm-ad/cleanup-bdc.sh
@@ -7,7 +7,6 @@ fi
DIR_PREFIX=$1
kubeadm reset --force
-unalias azdata
systemctl stop kubelet
rm -rf /var/lib/cni/
@@ -23,8 +22,12 @@ ip link set flannel.1 down
#brctl delbr flannel.1
iptables -F && iptables -t nat -F && iptables -t mangle -F && iptables -X
-rm -rf .azdata/
-rm -rf bdcdeploy/
+# Remove azdata
+#
+apt-get remove -y azdata-cli
+rm /etc/apt/sources.list.d/azdata-cli.list
+rm /etc/apt/trusted.gpg.d/dpgswdist.v1.asc.gpg
+apt autoremove
# Remove mounts.
#
diff --git a/samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu-single-node-vm-ad/setup-bdc-ad.sh b/samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu-single-node-vm-ad/setup-bdc-ad.sh
index bda58040ca..9d8d4154e9 100644
--- a/samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu-single-node-vm-ad/setup-bdc-ad.sh
+++ b/samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu-single-node-vm-ad/setup-bdc-ad.sh
@@ -47,14 +47,10 @@ export VIRTUALENV_NAME="bdcvenv"
export LOG_FILE="bdcdeploy.log"
export DEBIAN_FRONTEND=noninteractive
-# Requirements file.
-#
-export REQUIREMENTS_LINK="https://aka.ms/azdata"
-
# Kube version.
#
-KUBE_DPKG_VERSION=1.15.0-00
-KUBE_VERSION=1.15.0
+KUBE_DPKG_VERSION=1.16.3-00
+KUBE_VERSION=1.16.3
# Wait for 5 minutes for the cluster to be ready.
#
@@ -65,7 +61,7 @@ RETRY_INTERVAL=5
#
export DOCKER_REGISTRY="mcr.microsoft.com"
export DOCKER_REPOSITORY="mssql/bdc"
-export DOCKER_TAG="2019-CU3-ubuntu-16.04"
+export DOCKER_TAG="2019-CU8-ubuntu-16.04"
# Variables used for azdata cluster creation.
#
@@ -77,7 +73,7 @@ export STORAGE_CLASS=local-storage
export PV_COUNT="30"
IMAGES=(
- mssql-app-service-proxy
+ mssql-app-service-proxy
mssql-control-watchdog
mssql-controller
mssql-dns
@@ -92,14 +88,12 @@ IMAGES=(
mssql-monitor-influxdb
mssql-monitor-kibana
mssql-monitor-telegraf
- mssql-security-domainctl
mssql-security-knox
mssql-security-support
- mssql-server
mssql-server-controller
mssql-server-data
mssql-ha-operator
- mssql-ha-supervisor
+ mssql-ha-supervisor
mssql-service-proxy
mssql-ssis-app-runtime
)
@@ -112,7 +106,7 @@ cd $BDCDEPLOY_DIR/
touch $LOG_FILE
{
-# Install all necessary packages: kuberenetes, docker, python3, python3-pip, request, azdata.
+# Install all necessary packages: kubernetes, docker, python3, python3-pip, request, azdata.
#
echo ""
echo "######################################################################################"
@@ -126,6 +120,9 @@ apt --yes install \
software-properties-common \
apt-transport-https \
ca-certificates \
+ lsb-release \
+ gnupg \
+ wget \
curl
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
@@ -134,31 +131,34 @@ add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt update -q
-apt-get install -q --yes docker-ce=18.06.2~ce~3-0~ubuntu --allow-downgrades
-apt-mark hold docker-ce
+apt-cache policy docker-ce
+apt --yes install docker-ce
usermod --append --groups docker $USER
-# Install python3, python3-pip, requests.
+
+# Install azdata cli.
#
-apt-get install -q -y python3
-apt-get install -q -y python3-pip
-apt-get install -y libkrb5-dev
-apt-get install -y libsqlite3-dev
-apt-get install -y unixodbc-dev
+curl -sL https://packages.microsoft.com/keys/microsoft.asc |
+gpg --dearmor |
+tee /etc/apt/trusted.gpg.d/microsoft.asc.gpg > /dev/null
+
+code=$(lsb_release -cs)
+if [ $code == "focal" ]; then
+ add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/prod.list)"
+elif [ $code == "bionic" ]; then
+ add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/18.04/prod.list)"
+elif [ $code == "xenial" ]; then
+ add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/prod.list)"
+fi
-pip3 install requests --upgrade
+apt-get update
+apt-get install -y azdata-cli
-# Install and create virtualenv.
-#
-pip3 install --upgrade virtualenv
-virtualenv -p python3 $VIRTUALENV_NAME
-source $VIRTUALENV_NAME/bin/activate
+cd -
-# Install azdata cli.
-#
-pip3 install -r $REQUIREMENTS_LINK
-echo "Packages installed."
+azdata --version
+echo "Azdata has been successfully installed."
# Load all pre-requisites for Kubernetes.
#
@@ -353,10 +353,3 @@ kubectl config set-context --current --namespace $CLUSTER_NAME
#
azdata login -n $CLUSTER_NAME
azdata bdc endpoint list --output table
-
-if [ -d "$HOME/.azdata/" ]; then
- sudo chown -R $(id -u $SUDO_USER):$(id -g $SUDO_USER) $HOME/.azdata/
-fi
-
-echo "alias azdata='$BDCDEPLOY_DIR/$VIRTUALENV_NAME/bin/azdata'" >> $HOME/.bashrc
-}| tee $LOG_FILE
diff --git a/samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu-single-node-vm/cleanup-bdc.sh b/samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu-single-node-vm/cleanup-bdc.sh
index 9a53ae8c40..24c5cfbcf7 100644
--- a/samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu-single-node-vm/cleanup-bdc.sh
+++ b/samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu-single-node-vm/cleanup-bdc.sh
@@ -7,7 +7,6 @@ fi
DIR_PREFIX=$1
kubeadm reset --force
-unalias azdata
systemctl stop kubelet
rm -rf /var/lib/cni/
@@ -23,8 +22,12 @@ ip link set flannel.1 down
#brctl delbr flannel.1
iptables -F && iptables -t nat -F && iptables -t mangle -F && iptables -X
-rm -rf .azdata/
-rm -rf bdcdeploy/
+# Remove azdata
+#
+apt-get remove -y azdata-cli
+rm /etc/apt/sources.list.d/azdata-cli.list
+rm /etc/apt/trusted.gpg.d/dpgswdist.v1.asc.gpg
+apt autoremove
# Remove mounts.
#
diff --git a/samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu-single-node-vm/setup-bdc.sh b/samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu-single-node-vm/setup-bdc.sh
index dc188dd687..133cdd6b3e 100644
--- a/samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu-single-node-vm/setup-bdc.sh
+++ b/samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu-single-node-vm/setup-bdc.sh
@@ -30,12 +30,12 @@ export DEBIAN_FRONTEND=noninteractive
# Requirements file.
#
-export REQUIREMENTS_LINK="https://aka.ms/azdata"
+# export REQUIREMENTS_LINK="https://aka.ms/azdata"
# Kube version.
#
-KUBE_DPKG_VERSION=1.15.0-00
-KUBE_VERSION=1.15.0
+KUBE_DPKG_VERSION=1.16.3-00
+KUBE_VERSION=1.16.3
# Wait for 5 minutes for the cluster to be ready.
#
@@ -46,7 +46,7 @@ RETRY_INTERVAL=5
#
export DOCKER_REGISTRY="mcr.microsoft.com"
export DOCKER_REPOSITORY="mssql/bdc"
-export DOCKER_TAG="2019-CU3-ubuntu-16.04"
+export DOCKER_TAG="2019-CU8-ubuntu-16.04"
# Variables used for azdata cluster creation.
#
@@ -58,7 +58,7 @@ export STORAGE_CLASS=local-storage
export PV_COUNT="30"
IMAGES=(
- mssql-app-service-proxy
+ mssql-app-service-proxy
mssql-control-watchdog
mssql-controller
mssql-dns
@@ -73,14 +73,12 @@ IMAGES=(
mssql-monitor-influxdb
mssql-monitor-kibana
mssql-monitor-telegraf
- mssql-security-domainctl
mssql-security-knox
mssql-security-support
- mssql-server
mssql-server-controller
mssql-server-data
mssql-ha-operator
- mssql-ha-supervisor
+ mssql-ha-supervisor
mssql-service-proxy
mssql-ssis-app-runtime
)
@@ -93,7 +91,7 @@ cd $BDCDEPLOY_DIR/
touch $LOG_FILE
{
-# Install all necessary packages: kuberenetes, docker, python3, python3-pip, request, azdata.
+# Install all necessary packages: kubernetes, docker, python3, python3-pip, request, azdata.
#
echo ""
echo "######################################################################################"
@@ -107,39 +105,51 @@ apt --yes install \
software-properties-common \
apt-transport-https \
ca-certificates \
+ lsb-release \
+ gnupg \
+ wget \
curl
+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt update -q
-apt-get install -q --yes docker-ce=18.06.2~ce~3-0~ubuntu --allow-downgrades
-apt-mark hold docker-ce
+apt-cache policy docker-ce
+apt --yes install docker-ce
usermod --append --groups docker $USER
# Install python3, python3-pip, requests.
#
-apt-get install -q -y python3
-apt-get install -q -y python3-pip
-apt-get install -y libkrb5-dev
-apt-get install -y libsqlite3-dev
-apt-get install -y unixodbc-dev
-
-pip3 install requests --upgrade
+apt install -y libodbc1 odbcinst odbcinst1debian2 unixodbc apt-transport-https libkrb5-dev
-# Install and create virtualenv.
+# Download and install azdata package
#
-pip3 install --upgrade virtualenv
-virtualenv -p python3 $VIRTUALENV_NAME
-source $VIRTUALENV_NAME/bin/activate
+echo ""
-# Install azdata cli.
-#
-pip3 install -r $REQUIREMENTS_LINK
-echo "Packages installed."
+curl -sL https://packages.microsoft.com/keys/microsoft.asc |
+gpg --dearmor |
+tee /etc/apt/trusted.gpg.d/microsoft.asc.gpg > /dev/null
+
+code=$(lsb_release -cs)
+if [ $code == "focal" ]; then
+ add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/prod.list)"
+elif [ $code == "bionic" ]; then
+ add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/18.04/prod.list)"
+elif [ $code == "xenial" ]; then
+ add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/prod.list)"
+fi
+
+apt-get update
+apt-get install -y azdata-cli
+
+cd -
+
+azdata --version
+echo "Azdata has been successfully installed."
# Load all pre-requisites for Kubernetes.
#
@@ -333,10 +343,3 @@ kubectl config set-context --current --namespace $CLUSTER_NAME
#
azdata login -n $CLUSTER_NAME
azdata bdc endpoint list --output table
-
-if [ -d "$HOME/.azdata/" ]; then
- sudo chown -R $(id -u $SUDO_USER):$(id -g $SUDO_USER) $HOME/.azdata/
-fi
-
-echo "alias azdata='$BDCDEPLOY_DIR/$VIRTUALENV_NAME/bin/azdata'" >> $HOME/.bashrc
-}| tee $LOG_FILE
diff --git a/samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu/README.md b/samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu/README.md
index 067ac95417..3063bb97a7 100644
--- a/samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu/README.md
+++ b/samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu/README.md
@@ -31,3 +31,40 @@ In this example, we will deploy Kubernetes over multiple Linux machines (physica
Simply type in "local-storage" twice (once for data, once for logs) when facing the following prompt by azdata :
`Kubernetes Storage Class - Config Path: spec.storage.data.className - Description: This indicates the name of the Kubernetes Storage Class to use. You must pre-provision the storage class and the persistent volumes or you can use a built in storage class if the platform you are deploying provides this capability. - Please provide a value:`
+
+### local-storage clean up
+
+If you removed BDC cluster that was previously deployed on Kubernetes cluster that was built using the sample scripts in this guide, you may want to clean the local-storage before using the cluster to deploy new BDC
+
+to clean the storage you need to follow these steps
+
+1) on each worker node make sure ‘/mnt/local-storage’ has only folder structure with no files, you can run ‘tree /mnt/local-storage’ for quick check
+2) if you see any files you need to remove them
+3) remount the volumes
+
+You can use the following script to clean the volumes.
+
+**WARNNING**: running this script will **REMOVE** all files that may exists under /mnt/local-storage folders
+
+run the following command to create the script
+
+```sh
+cat > clean-volumes-agents.sh <",
- "text/html": "
"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/plain": "FloatProgress(value=0.0, bar_style='info', description='Progress:', layout=Layout(height='25px', width='50%'),…",
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "91567484ce714d2ea856ce1ae23d09d7"
+ }
},
"metadata": {},
"output_type": "display_data"
@@ -50,129 +124,430 @@
"text": "SparkSession available as 'spark'.\n",
"output_type": "stream"
},
+ {
+ "data": {
+ "text/plain": "FloatProgress(value=0.0, bar_style='info', description='Progress:', layout=Layout(height='25px', width='50%'),…",
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "aa11297baa07447c980a3ce97657fe75"
+ }
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"name": "stdout",
"text": "Number of rows: 32561, Number of coulumns : 15\nroot\n |-- age: integer (nullable = true)\n |-- workclass: string (nullable = true)\n |-- fnlwgt: integer (nullable = true)\n |-- education: string (nullable = true)\n |-- education-num: integer (nullable = true)\n |-- marital-status: string (nullable = true)\n |-- occupation: string (nullable = true)\n |-- relationship: string (nullable = true)\n |-- race: string (nullable = true)\n |-- sex: string (nullable = true)\n |-- capital-gain: integer (nullable = true)\n |-- capital-loss: integer (nullable = true)\n |-- hours-per-week: integer (nullable = true)\n |-- native-country: string (nullable = true)\n |-- income: string (nullable = true)\n\nroot\n |-- age: integer (nullable = true)\n |-- workclass: string (nullable = true)\n |-- fnlwgt: integer (nullable = true)\n |-- education: string (nullable = true)\n |-- education_num: integer (nullable = true)\n |-- marital_status: string (nullable = true)\n |-- occupation: string (nullable = true)\n |-- relationship: string (nullable = true)\n |-- race: string (nullable = true)\n |-- sex: string (nullable = true)\n |-- capital_gain: integer (nullable = true)\n |-- capital_loss: integer (nullable = true)\n |-- hours_per_week: integer (nullable = true)\n |-- native_country: string (nullable = true)\n |-- income: string (nullable = true)",
"output_type": "stream"
}
],
- "execution_count": 2
+ "execution_count": 3
},
{
"cell_type": "code",
- "source": "#Basic data exploration\r\n\r\n##1. Sub set the data and print some important columns\r\nprint(\"Select few columns to see the data\")\r\ndata_all.select(['income','age','hours_per_week', 'education']).show(10)\r\n\r\n## Find the number of distict values\r\nprint(\"Number of distinct values for income\")\r\nds_sub = data_all.select('income').distinct()\r\nds_sub.show()\r\n\r\n##Add a numberic column(income_code) derived from income column\r\nprint(\"Added numeric column(income_code) derived from income column\")\r\nfrom pyspark.sql.functions import expr\r\n\r\ndf_new = data_all.withColumn(\"income_code\", expr(\"case \\\r\n when income like '%<=50K%' then 0 \\\r\n when income like '%>50K%' then 1 \\\r\n else 2 end \"))\r\n\r\ndf_new.select(['income', 'age', 'hours_per_week', 'education', 'income_code']).show(10)\r\n\r\n##Summary statistical operations on dataframe\r\nprint(\"Print a statistical summary of a few columns\")\r\ndf_new.select(['income','age','hours_per_week', 'education','income_code']).describe().show()\r\n\r\nprint(\"Calculate Co variance between a few columns to understand features to use\")\r\nmycov = df_new.stat.cov('income_code','hours_per_week')\r\nprint(\"Covariance between income and hours_per_week is\", round(mycov,1))\r\n\r\nmycov = df_new.stat.cov('income_code','age')\r\nprint(\"Covariance between income and age is\", round(mycov,1))\r\n\r\n",
- "metadata": {},
+ "source": [
+ "#Basic data exploration\r\n",
+ "\r\n",
+ "##1. Sub set the data and print some important columns\r\n",
+ "print(\"Select few columns to see the data\")\r\n",
+ "data_all.select(['income','age','hours_per_week', 'education']).show(10)\r\n",
+ "\r\n",
+ "## Find the number of distict values\r\n",
+ "print(\"Number of distinct values for income\")\r\n",
+ "ds_sub = data_all.select('income').distinct()\r\n",
+ "ds_sub.show()\r\n",
+ "\r\n",
+ "##Add a numberic column(income_code) derived from income column\r\n",
+ "print(\"Added numeric column(income_code) derived from income column\")\r\n",
+ "from pyspark.sql.functions import expr\r\n",
+ "\r\n",
+ "df_new = data_all.withColumn(\"income_code\", expr(\"case \\\r\n",
+ " when income like '%<=50K%' then 0 \\\r\n",
+ " when income like '%>50K%' then 1 \\\r\n",
+ " else 2 end \"))\r\n",
+ "\r\n",
+ "df_new.select(['income', 'age', 'hours_per_week', 'education', 'income_code']).show(10)\r\n",
+ "\r\n",
+ "##Summary statistical operations on dataframe\r\n",
+ "print(\"Print a statistical summary of a few columns\")\r\n",
+ "df_new.select(['income','age','hours_per_week', 'education','income_code']).describe().show()\r\n",
+ "\r\n",
+ "print(\"Calculate Co variance between a few columns to understand features to use\")\r\n",
+ "mycov = df_new.stat.cov('income_code','hours_per_week')\r\n",
+ "print(\"Covariance between income and hours_per_week is\", round(mycov,1))\r\n",
+ "\r\n",
+ "mycov = df_new.stat.cov('income_code','age')\r\n",
+ "print(\"Covariance between income and age is\", round(mycov,1))\r\n",
+ "\r\n",
+ ""
+ ],
+ "metadata": {
+ "azdata_cell_guid": "bed46457-a3b0-4972-afc0-f73107af7769"
+ },
"outputs": [
+ {
+ "data": {
+ "text/plain": "FloatProgress(value=0.0, bar_style='info', description='Progress:', layout=Layout(height='25px', width='50%'),…",
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "793343b1c2c545da975144505a58cb27"
+ }
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"name": "stdout",
"text": "Select few columns to see the data\n+------+---+--------------+---------+\n|income|age|hours_per_week|education|\n+------+---+--------------+---------+\n| <=50K| 39| 40|Bachelors|\n| <=50K| 50| 13|Bachelors|\n| <=50K| 38| 40| HS-grad|\n| <=50K| 53| 40| 11th|\n| <=50K| 28| 40|Bachelors|\n| <=50K| 37| 40| Masters|\n| <=50K| 49| 16| 9th|\n| >50K| 52| 45| HS-grad|\n| >50K| 31| 50| Masters|\n| >50K| 42| 40|Bachelors|\n+------+---+--------------+---------+\nonly showing top 10 rows\n\nNumber of distinct values for income\n+------+\n|income|\n+------+\n| <=50K|\n| >50K|\n+------+\n\nAdded numeric column(income_code) derived from income column\n+------+---+--------------+---------+-----------+\n|income|age|hours_per_week|education|income_code|\n+------+---+--------------+---------+-----------+\n| <=50K| 39| 40|Bachelors| 0|\n| <=50K| 50| 13|Bachelors| 0|\n| <=50K| 38| 40| HS-grad| 0|\n| <=50K| 53| 40| 11th| 0|\n| <=50K| 28| 40|Bachelors| 0|\n| <=50K| 37| 40| Masters| 0|\n| <=50K| 49| 16| 9th| 0|\n| >50K| 52| 45| HS-grad| 1|\n| >50K| 31| 50| Masters| 1|\n| >50K| 42| 40|Bachelors| 1|\n+------+---+--------------+---------+-----------+\nonly showing top 10 rows\n\nPrint a statistical summary of a few columns\n+-------+------+------------------+------------------+------------+-------------------+\n|summary|income| age| hours_per_week| education| income_code|\n+-------+------+------------------+------------------+------------+-------------------+\n| count| 32561| 32561| 32561| 32561| 32561|\n| mean| null| 38.58164675532078|40.437455852092995| null| 0.2408095574460244|\n| stddev| null|13.640432553581356|12.347428681731838| null|0.42758148856469247|\n| min| <=50K| 17| 1| 10th| 0|\n| max| >50K| 90| 99|Some-college| 1|\n+-------+------+------------------+------------------+------------+-------------------+\n\nCalculate Co variance between a few columns to understand features to use\nCovariance between income and hours_per_week is 1.2\nCovariance between income and age is 1.4",
"output_type": "stream"
}
],
- "execution_count": 3
+ "execution_count": 4
},
{
"cell_type": "code",
- "source": "# Choose feature columns and the label column.\r\nlabel = \"income\"\r\nxvars = [\"age\", \"hours_per_week\", 'education'] #numeric and string\r\n\r\nprint(\"label = {}\".format(label))\r\nprint(\"features = {}\".format(xvars))\r\n\r\n#Check label counts to check data bias\r\nprint(\"Count of rows that are <=50K\", data_all[data_all.income==\"<=50K\"].count())\r\nprint(\"Count of rows that are >50K\", data_all[data_all.income==\">50K\"].count())\r\n\r\n\r\nselect_cols = xvars\r\nselect_cols.append(label)\r\ndata = data_all.select(select_cols)",
- "metadata": {},
+ "source": [
+ "# Choose feature columns and the label column.\r\n",
+ "label = \"income\"\r\n",
+ "xvars = [\"age\", \"hours_per_week\", 'education'] #numeric and string\r\n",
+ "\r\n",
+ "print(\"label = {}\".format(label))\r\n",
+ "print(\"features = {}\".format(xvars))\r\n",
+ "\r\n",
+ "#Check label counts to check data bias\r\n",
+ "print(\"Count of rows that are <=50K\", data_all[data_all.income==\"<=50K\"].count())\r\n",
+ "print(\"Count of rows that are >50K\", data_all[data_all.income==\">50K\"].count())\r\n",
+ "\r\n",
+ "\r\n",
+ "select_cols = xvars\r\n",
+ "select_cols.append(label)\r\n",
+ "data = data_all.select(select_cols)"
+ ],
+ "metadata": {
+ "azdata_cell_guid": "86f0640c-c2f4-4b4c-ae98-6e6806d4e77f"
+ },
"outputs": [
+ {
+ "data": {
+ "text/plain": "FloatProgress(value=0.0, bar_style='info', description='Progress:', layout=Layout(height='25px', width='50%'),…",
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "b0be4b8053684bbaadc38b1acfb4ea00"
+ }
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"name": "stdout",
"text": "label = income\nfeatures = ['age', 'hours_per_week', 'education']\nCount of rows that are <=50K 24720\nCount of rows that are >50K 7841",
"output_type": "stream"
}
],
- "execution_count": 4
+ "execution_count": 5
},
{
"cell_type": "markdown",
- "source": "## Step 2 - Split as training and test set\r\nWe'll use 75% of rows to train the model and rest of the 25% to evaluate the model. Additionally we persist the train and test data sets to HDFS storage. The step is not necessary , but shown to demonstrate saving and loading with ORC format. Other format e.g. Parquet may also be used. Post this step you should see 2 directories created with the name \"AdultCensusIncomeTrain\" and \"AdultCensusIncomeTest\"\r\n",
- "metadata": {}
+ "source": [
+ "## Step 2 - Split as training and test set\r\n",
+ "We'll use 75% of rows to train the model and rest of the 25% to evaluate the model. Additionally we persist the train and test data sets to HDFS storage. The step is not necessary , but shown to demonstrate saving and loading with ORC format. Other format e.g. Parquet may also be used. Post this step you should see 2 directories created with the name \"AdultCensusIncomeTrain\" and \"AdultCensusIncomeTest\"\r\n",
+ ""
+ ],
+ "metadata": {
+ "azdata_cell_guid": "bcaaaac9-6efc-4dfe-87b0-ef375a9a0758"
+ }
},
{
"cell_type": "code",
- "source": "train, test = data.randomSplit([0.75, 0.25], seed=123)\r\n\r\nprint(\"train ({}, {})\".format(train.count(), len(train.columns)))\r\nprint(\"test ({}, {})\".format(test.count(), len(test.columns)))\r\n\r\ntrain_data_path = \"/spark_ml/AdultCensusIncomeTrain\"\r\ntest_data_path = \"/spark_ml/AdultCensusIncomeTest\"\r\n\r\ntrain.write.mode('overwrite').orc(train_data_path)\r\ntest.write.mode('overwrite').orc(test_data_path)\r\nprint(\"train and test datasets saved to {} and {}\".format(train_data_path, test_data_path))",
- "metadata": {},
+ "source": [
+ "train, test = data.randomSplit([0.75, 0.25], seed=123)\r\n",
+ "\r\n",
+ "print(\"train ({}, {})\".format(train.count(), len(train.columns)))\r\n",
+ "print(\"test ({}, {})\".format(test.count(), len(test.columns)))\r\n",
+ "\r\n",
+ "train_data_path = \"/spark_ml/AdultCensusIncomeTrain\"\r\n",
+ "test_data_path = \"/spark_ml/AdultCensusIncomeTest\"\r\n",
+ "\r\n",
+ "train.write.mode('overwrite').orc(train_data_path)\r\n",
+ "test.write.mode('overwrite').orc(test_data_path)\r\n",
+ "print(\"train and test datasets saved to {} and {}\".format(train_data_path, test_data_path))"
+ ],
+ "metadata": {
+ "azdata_cell_guid": "7e487878-958b-4cd8-97fe-0199c29059a8"
+ },
"outputs": [
+ {
+ "data": {
+ "text/plain": "FloatProgress(value=0.0, bar_style='info', description='Progress:', layout=Layout(height='25px', width='50%'),…",
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "e48983c1085b4e1e936352672e8368e4"
+ }
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"name": "stdout",
"text": "train (24469, 4)\ntest (8092, 4)\ntrain and test datasets saved to /spark_ml/AdultCensusIncomeTrain and /spark_ml/AdultCensusIncomeTest",
"output_type": "stream"
}
],
- "execution_count": 5
+ "execution_count": 6
},
{
"cell_type": "markdown",
- "source": "## Step 3 - Train a model\r\n[Spark ML pipelines](https://spark.apache.org/docs/latest/ml-pipeline.html) allow to sequence all steps as a workflow and make it easier to experiment with various algorithms and their parameters. The following code first constructs the stages and then puts these stages together in Ml pipeline. LogisticRegression is used to create the model.",
- "metadata": {}
+ "source": [
+ "## Step 3 - Train a model\r\n",
+ "[Spark ML pipelines](https://spark.apache.org/docs/latest/ml-pipeline.html) allow to sequence all steps as a workflow and make it easier to experiment with various algorithms and their parameters. The following code first constructs the stages and then puts these stages together in Ml pipeline. LogisticRegression is used to create the model."
+ ],
+ "metadata": {
+ "azdata_cell_guid": "eb03e212-5450-47bf-8fb9-e4d412f1ab74"
+ }
},
{
"cell_type": "code",
- "source": "from pyspark.ml import Pipeline, PipelineModel\r\nfrom pyspark.ml.feature import OneHotEncoderEstimator, StringIndexer, VectorAssembler\r\nfrom pyspark.ml.classification import LogisticRegression\r\n\r\nreg = 0.1\r\nprint(\"Using LogisticRegression model with Regularization Rate of {}.\".format(reg))\r\n\r\n# create a new Logistic Regression model.\r\nlr = LogisticRegression(regParam=reg)\r\n\r\ndtypes = dict(train.dtypes)\r\ndtypes.pop(label)\r\n\r\nsi_xvars = []\r\nohe_xvars = []\r\nfeatureCols = []\r\nfor idx,key in enumerate(dtypes):\r\n if dtypes[key] == \"string\":\r\n featureCol = \"-\".join([key, \"encoded\"])\r\n featureCols.append(featureCol)\r\n \r\n tmpCol = \"-\".join([key, \"tmp\"])\r\n si_xvars.append(StringIndexer(inputCol=key, outputCol=tmpCol, handleInvalid=\"skip\")) #, handleInvalid=\"keep\"\r\n ohe_xvars.append(OneHotEncoderEstimator(inputCols=[tmpCol], outputCols=[featureCol]))\r\n else:\r\n featureCols.append(key)\r\n\r\n# string-index the label column into a column named \"label\"\r\nsi_label = StringIndexer(inputCol=label, outputCol='label')\r\n\r\n# assemble the encoded feature columns in to a column named \"features\"\r\nassembler = VectorAssembler(inputCols=featureCols, outputCol=\"features\")\r\n\r\n\r\nstages = []\r\nstages.extend(si_xvars)\r\nstages.extend(ohe_xvars)\r\nstages.append(si_label)\r\nstages.append(assembler)\r\nstages.append(lr)\r\npipe = Pipeline(stages=stages)\r\nprint(\"Pipeline Created\")\r\n\r\nmodel = pipe.fit(train)\r\nprint(\"Model Trained\")\r\nprint(\"Model is \", model)\r\nprint(\"Model Stages\", model.stages)",
- "metadata": {},
+ "source": [
+ "from pyspark.ml import Pipeline, PipelineModel\r\n",
+ "from pyspark.ml.feature import OneHotEncoderEstimator, StringIndexer, VectorAssembler\r\n",
+ "from pyspark.ml.classification import LogisticRegression\r\n",
+ "\r\n",
+ "reg = 0.1\r\n",
+ "print(\"Using LogisticRegression model with Regularization Rate of {}.\".format(reg))\r\n",
+ "\r\n",
+ "# create a new Logistic Regression model.\r\n",
+ "lr = LogisticRegression(regParam=reg)\r\n",
+ "\r\n",
+ "dtypes = dict(train.dtypes)\r\n",
+ "dtypes.pop(label)\r\n",
+ "\r\n",
+ "si_xvars = []\r\n",
+ "ohe_xvars = []\r\n",
+ "featureCols = []\r\n",
+ "for idx,key in enumerate(dtypes):\r\n",
+ " if dtypes[key] == \"string\":\r\n",
+ " featureCol = \"-\".join([key, \"encoded\"])\r\n",
+ " featureCols.append(featureCol)\r\n",
+ " \r\n",
+ " tmpCol = \"-\".join([key, \"tmp\"])\r\n",
+ " si_xvars.append(StringIndexer(inputCol=key, outputCol=tmpCol, handleInvalid=\"skip\")) #, handleInvalid=\"keep\"\r\n",
+ " ohe_xvars.append(OneHotEncoderEstimator(inputCols=[tmpCol], outputCols=[featureCol]))\r\n",
+ " else:\r\n",
+ " featureCols.append(key)\r\n",
+ "\r\n",
+ "# string-index the label column into a column named \"label\"\r\n",
+ "si_label = StringIndexer(inputCol=label, outputCol='label')\r\n",
+ "\r\n",
+ "# assemble the encoded feature columns in to a column named \"features\"\r\n",
+ "assembler = VectorAssembler(inputCols=featureCols, outputCol=\"features\")\r\n",
+ "\r\n",
+ "\r\n",
+ "stages = []\r\n",
+ "stages.extend(si_xvars)\r\n",
+ "stages.extend(ohe_xvars)\r\n",
+ "stages.append(si_label)\r\n",
+ "stages.append(assembler)\r\n",
+ "stages.append(lr)\r\n",
+ "pipe = Pipeline(stages=stages)\r\n",
+ "print(\"Pipeline Created\")\r\n",
+ "\r\n",
+ "model = pipe.fit(train)\r\n",
+ "print(\"Model Trained\")\r\n",
+ "print(\"Model is \", model)\r\n",
+ "print(\"Model Stages\", model.stages)"
+ ],
+ "metadata": {
+ "azdata_cell_guid": "3e3c1258-3073-4ede-b3e4-84776b67ba3e"
+ },
"outputs": [
+ {
+ "data": {
+ "text/plain": "FloatProgress(value=0.0, bar_style='info', description='Progress:', layout=Layout(height='25px', width='50%'),…",
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "3acc417b6c9b47acadcbc71acf0bc3eb"
+ }
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"name": "stdout",
- "text": "Using LogisticRegression model with Regularization Rate of 0.1.\nPipeline Created\nModel Trained\nModel is PipelineModel_1adfacc01e7a\nModel Stages [StringIndexer_ee8506a28443, OneHotEncoderEstimator_cb5dbefb5cce, StringIndexer_38769cda5ab3, VectorAssembler_a3c2d358bd55, LogisticRegressionModel: uid = LogisticRegression_18837c9488f5, numClasses = 2, numFeatures = 17]",
+ "text": "Using LogisticRegression model with Regularization Rate of 0.1.\nPipeline Created\nModel Trained\nModel is PipelineModel_dd10dea16fcc\nModel Stages [StringIndexer_a72809f2344f, OneHotEncoderEstimator_bff5847e2bae, StringIndexer_e62df3c26c82, VectorAssembler_e84f4c37608c, LogisticRegressionModel: uid = LogisticRegression_96385e6ff190, numClasses = 2, numFeatures = 17]",
"output_type": "stream"
}
],
- "execution_count": 6
+ "execution_count": 7
},
{
"cell_type": "markdown",
- "source": "## Step 4 - Model scoring\r\n\r\nPredict using the model and Evaluate the model accuracy\r\n \r\nThe code below use test data set to predict the outcome using the model created in the step above. We measure accuracy of the model with areaUnderROC and areaUnderPR metric.",
- "metadata": {}
+ "source": [
+ "## Step 4 - Model scoring\r\n",
+ "\r\n",
+ "Predict using the model and Evaluate the model accuracy\r\n",
+ " \r\n",
+ "The code below use test data set to predict the outcome using the model created in the step above. We measure accuracy of the model with areaUnderROC and areaUnderPR metric."
+ ],
+ "metadata": {
+ "azdata_cell_guid": "c03ed2fd-6a23-40c3-b71c-608f14cde6af"
+ }
},
{
"cell_type": "code",
- "source": "from pyspark.ml.evaluation import BinaryClassificationEvaluator\r\n\r\n# make prediction\r\npred = model.transform(test)\r\n\r\n# evaluate. note only 2 metrics are supported out of the box by Spark ML.\r\nbce = BinaryClassificationEvaluator(rawPredictionCol='rawPrediction')\r\nau_roc = bce.setMetricName('areaUnderROC').evaluate(pred)\r\nau_prc = bce.setMetricName('areaUnderPR').evaluate(pred)\r\n\r\nprint(\"Area under ROC: {}\".format(au_roc))\r\nprint(\"Area Under PR: {}\".format(au_prc))\r\n\r\npred[pred.prediction==1.0][pred.income,pred.label,pred.prediction].show()",
- "metadata": {},
+ "source": [
+ "from pyspark.ml.evaluation import BinaryClassificationEvaluator\r\n",
+ "\r\n",
+ "# make prediction\r\n",
+ "pred = model.transform(test)\r\n",
+ "\r\n",
+ "# evaluate. note only 2 metrics are supported out of the box by Spark ML.\r\n",
+ "bce = BinaryClassificationEvaluator(rawPredictionCol='rawPrediction')\r\n",
+ "au_roc = bce.setMetricName('areaUnderROC').evaluate(pred)\r\n",
+ "au_prc = bce.setMetricName('areaUnderPR').evaluate(pred)\r\n",
+ "\r\n",
+ "print(\"Area under ROC: {}\".format(au_roc))\r\n",
+ "print(\"Area Under PR: {}\".format(au_prc))\r\n",
+ "\r\n",
+ "pred[pred.prediction==1.0][pred.income,pred.label,pred.prediction].show()"
+ ],
+ "metadata": {
+ "azdata_cell_guid": "b1f5b3e5-a279-4d74-886f-e89789cb3f95"
+ },
"outputs": [
+ {
+ "data": {
+ "text/plain": "FloatProgress(value=0.0, bar_style='info', description='Progress:', layout=Layout(height='25px', width='50%'),…",
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "381712d1e2e8407db531b071056ed753"
+ }
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"name": "stdout",
"text": "Area under ROC: 0.7964496884726682\nArea Under PR: 0.5358180243123482\n+------+-----+----------+\n|income|label|prediction|\n+------+-----+----------+\n| <=50K| 0.0| 1.0|\n| >50K| 1.0| 1.0|\n| <=50K| 0.0| 1.0|\n| <=50K| 0.0| 1.0|\n| >50K| 1.0| 1.0|\n| <=50K| 0.0| 1.0|\n| >50K| 1.0| 1.0|\n| <=50K| 0.0| 1.0|\n| <=50K| 0.0| 1.0|\n| >50K| 1.0| 1.0|\n| <=50K| 0.0| 1.0|\n| >50K| 1.0| 1.0|\n| <=50K| 0.0| 1.0|\n| >50K| 1.0| 1.0|\n| <=50K| 0.0| 1.0|\n| <=50K| 0.0| 1.0|\n| <=50K| 0.0| 1.0|\n| >50K| 1.0| 1.0|\n| <=50K| 0.0| 1.0|\n| >50K| 1.0| 1.0|\n+------+-----+----------+\nonly showing top 20 rows",
"output_type": "stream"
}
],
- "execution_count": 7
+ "execution_count": 8
},
{
"cell_type": "markdown",
- "source": "## Step 5 - Persist the Spark Models\r\nFinally we persist the model in HDFS for later use. Post this step the created model get saved as /spark_ml/AdultCensus.mml\r\n\r\n",
- "metadata": {}
+ "source": [
+ "## Step 5 - Persist the Spark Models\r\n",
+ "Finally we persist the model in HDFS for later use. Post this step the created model get saved as /spark_ml/AdultCensus.mml\r\n",
+ "\r\n",
+ ""
+ ],
+ "metadata": {
+ "azdata_cell_guid": "095b7da6-6af7-4e15-b984-450ae22c3621"
+ }
},
{
"cell_type": "code",
- "source": "model_name = \"AdultCensus.mml\"\r\nmodel_fs = \"/spark_ml/\" + model_name\r\n\r\nmodel.write().overwrite().save(model_fs)\r\nprint(\"saved model to {}\".format(model_fs))\r\n\r\n# load the model file and check its same as the in-memory model\r\nmodel2 = PipelineModel.load(model_fs)\r\nassert str(model2) == str(model)\r\nprint(\"Successfully loaded from {}\".format(model_fs))",
- "metadata": {},
+ "source": [
+ "model_name = \"AdultCensus.mml\"\r\n",
+ "model_fs = \"/spark_ml/\" + model_name\r\n",
+ "\r\n",
+ "model.write().overwrite().save(model_fs)\r\n",
+ "print(\"saved model to {}\".format(model_fs))\r\n",
+ "\r\n",
+ "# load the model file and check its same as the in-memory model\r\n",
+ "model2 = PipelineModel.load(model_fs)\r\n",
+ "assert str(model2) == str(model)\r\n",
+ "print(\"Successfully loaded from {}\".format(model_fs))"
+ ],
+ "metadata": {
+ "azdata_cell_guid": "53dcb180-3b03-451e-b2cc-58ce16a62c13"
+ },
"outputs": [
+ {
+ "data": {
+ "text/plain": "FloatProgress(value=0.0, bar_style='info', description='Progress:', layout=Layout(height='25px', width='50%'),…",
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "fdb264031f4c444aa0f52718d6c7ac86"
+ }
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"name": "stdout",
"text": "saved model to /spark_ml/AdultCensus.mml\nSuccessfully loaded from /spark_ml/AdultCensus.mml",
"output_type": "stream"
}
],
- "execution_count": 8
+ "execution_count": 9
},
{
"cell_type": "markdown",
- "source": "## Step 6 - Persist as Portable Model\r\nHere we persist the Model in as Portable Mleap bundle for use outside Spark.",
- "metadata": {}
+ "source": [
+ "## Step 6 - Persist as Portable Model\r\n",
+ "Here we persist the Model in as Portable Mleap bundle for use outside Spark."
+ ],
+ "metadata": {
+ "azdata_cell_guid": "92161ae4-60b6-4725-b0c4-f7b09c0cedf2"
+ }
},
{
"cell_type": "code",
- "source": "import os\r\nfrom mleap.pyspark.spark_support import SimpleSparkSerializer\r\n# serialize the model to a zip file in JSON format\r\nmodel_name_export = \"adult_census_pipeline.zip\"\r\nmodel_name_path = os.getcwd()\r\nmodel_file = os.path.join(model_name_path, model_name_export)\r\n\r\n# remove an old model file, if needed.\r\ntry:\r\n os.remove(model_file)\r\nexcept OSError:\r\n pass\r\n\r\nmodel_file_path = \"jar:file:{}\".format(model_file)\r\nmodel.serializeToBundle(model_file_path, model.transform(train))\r\n\r\nprint(\"persist the mleap bundle from local to hdfs\")\r\nfrom subprocess import Popen, PIPE\r\nproc = Popen([\"hadoop\", \"fs\", \"-put\", \"-f\", model_file, os.path.join(\"/spark_ml\", model_name_export)], stdout=PIPE, stderr=PIPE)\r\ns_output, s_err = proc.communicate()\r\n",
- "metadata": {},
+ "source": [
+ "import os\r\n",
+ "from mleap.pyspark.spark_support import SimpleSparkSerializer\r\n",
+ "# serialize the model to a zip file in JSON format\r\n",
+ "model_name_export = \"adult_census_pipeline.zip\"\r\n",
+ "model_name_path = os.getcwd()\r\n",
+ "model_file = os.path.join(model_name_path, model_name_export)\r\n",
+ "\r\n",
+ "# remove an old model file, if needed.\r\n",
+ "try:\r\n",
+ " os.remove(model_file)\r\n",
+ "except OSError:\r\n",
+ " pass\r\n",
+ "\r\n",
+ "model_file_path = \"jar:file:{}\".format(model_file)\r\n",
+ "model.serializeToBundle(model_file_path, model.transform(train))\r\n",
+ "\r\n",
+ "print(\"persist the mleap bundle from local to hdfs\")\r\n",
+ "\r\n",
+ "from subprocess import Popen, PIPE\r\n",
+ "proc = Popen([\"/opt/hadoop/bin/hdfs\", \"dfs\", \"-put\", \"-f\", model_file, os.path.join(\"/spark_ml\", model_name_export)], stdout=PIPE, stderr=PIPE)\r\n",
+ "s_output, s_err = proc.communicate()\r\n",
+ ""
+ ],
+ "metadata": {
+ "azdata_cell_guid": "e06fa992-1569-4fc0-95e3-372ae7dbf889"
+ },
"outputs": [
+ {
+ "data": {
+ "text/plain": "FloatProgress(value=0.0, bar_style='info', description='Progress:', layout=Layout(height='25px', width='50%'),…",
+ "application/vnd.jupyter.widget-view+json": {
+ "version_major": 2,
+ "version_minor": 0,
+ "model_id": "a3c85cc2e90c49a4a2cdd303243fd8d2"
+ }
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"name": "stdout",
- "text": "persist the mleap bundle from local to hdfs",
+ "text": "persist the mleap bundle from local to hdfs\n/tmp/nm-local-dir/usercache/root/appcache/application_1582749467073_0001/container_1582749467073_0001_01_000001/adult_census_pipeline.zip\nadult_census_pipeline.zip\n/opt/hadoop/bin/hdfs/spark_ml/adult_census_pipeline.zip",
"output_type": "stream"
}
],
- "execution_count": 9
+ "execution_count": 27
}
]
}
\ No newline at end of file
diff --git a/samples/features/ssms-templates/Sql/External Data Source/Create External Data Source.sql b/samples/features/ssms-templates/Sql/External Data Source/Create External Data Source.sql
index 55c58e8f65..040244a79a 100644
--- a/samples/features/ssms-templates/Sql/External Data Source/Create External Data Source.sql
+++ b/samples/features/ssms-templates/Sql/External Data Source/Create External Data Source.sql
@@ -7,7 +7,7 @@ GO
IF EXISTS (
SELECT *
FROM sys.external_data_sources
- WHERE name = N''
+ WHERE name = N''
)
DROP EXTERNAL DATA SOURCE
GO
diff --git a/samples/features/ssms-templates/Sql/External Data Source/Drop External Data Source.sql b/samples/features/ssms-templates/Sql/External Data Source/Drop External Data Source.sql
index 0b767cae33..2e83e39c2c 100644
--- a/samples/features/ssms-templates/Sql/External Data Source/Drop External Data Source.sql
+++ b/samples/features/ssms-templates/Sql/External Data Source/Drop External Data Source.sql
@@ -6,8 +6,8 @@ GO
IF EXISTS (
SELECT *
- FROM sys.external_data_sources
- WHERE name = N''
+ FROM sys.external_data_sources
+ WHERE name = N''
)
DROP EXTERNAL DATA SOURCE
GO
\ No newline at end of file
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/Database/Create Database.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/Database/Create Database.sql
index 08c1127541..eeb19c1edf 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/Database/Create Database.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/Database/Create Database.sql
@@ -1,5 +1,5 @@
-- ===================================================================================================================================
--- Create database template for Azure SQL Database and Azure SQL Data Warehouse Database
+-- Create database template for Azure SQL Database and Azure Synapse Analytics Database
--
-- This script will only run in the context of the master database. To manage this database in
-- SQL Server Management Studio, either connect to the created database, or connect to master.
@@ -9,27 +9,30 @@
-- continuity, data protection and security, and near-zero administration � all backed by the power
-- and reach of Microsoft Azure.
--
--- SQL Database is available in the following service tiers: Basic, Standard, Premium , DataWarehouse, Web (Retired)
+-- SQL Database is available in the following service tiers: GeneralPurpose, Basic, Standard, Premium , DataWarehouse, Web (Retired)
-- and Business (Retired).
+-- General Purpose service tier is a default service tier in Azure SQL Database that is designed for most of the generic workloads.
+-- If you need a fully managed database engine with 99.99% SLA with storage latency between 5 and 10 ms that match Azure SQL
+-- IaaS in most of the cases, General Purpose tier is the option for you.
-- Standard is the go-to option for getting started with cloud-designed business applications and
-- offers mid-level performance and business continuity features. Performance objectives for Standard
-- deliver predictable per minute transaction rates.
--
--- See http://go.microsoft.com/fwlink/p/?LinkId=306622 for more information about Azure SQL Database.
+-- See https://go.microsoft.com/fwlink/p/?LinkId=306622 for more information about Azure SQL Database.
--
--- See http://go.microsoft.com/fwlink/?LinkId=787140 for more information about Azure SQL Data Warehouse.
+-- See https://go.microsoft.com/fwlink/?LinkId=787140 for more information about Azure Synapse Analytics.
--
--- See http://go.microsoft.com/fwlink/p/?LinkId=402063 for more information about CREATE DATABASE for Azure SQL Database.
+-- See https://go.microsoft.com/fwlink/p/?LinkId=402063 for more information about CREATE DATABASE for Azure SQL Database.
--
--- See http://go.microsoft.com/fwlink/?LinkId=787139 for more information about CREATE DATABASE for Azure SQL Data Warehouse Database.
+-- See https://go.microsoft.com/fwlink/?LinkId=787139 for more information about CREATE DATABASE for Azure Synapse Analytics Database.
-- ===================================================================================================================================
CREATE DATABASE COLLATE
(
- EDITION = '',
- SERVICE_OBJECTIVE='',
- MAXSIZE =
+ EDITION = '',
+ SERVICE_OBJECTIVE='',
+ MAXSIZE =
)
GO
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/Database/Drop Database.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/Database/Drop Database.sql
index 6b1c679034..e782dae8d2 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/Database/Drop Database.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/Database/Drop Database.sql
@@ -1,5 +1,5 @@
--- ===================================================================================
--- Drop database template for Azure SQL Database and Azure SQL Data Warehouse Database
--- ===================================================================================
+-- ===================================================================================================================================
+-- Drop database template for Azure SQL Database, Azure Synapse Analytics Database, and Azure Synapse SQL Analytics on-demand Database
+-- ===================================================================================================================================
DROP DATABASE
GO
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/External Data Source/Alter External Data Source DW.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/External Data Source/Alter External Data Source DW.sql
index 77a403559c..c8923004f8 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/External Data Source/Alter External Data Source DW.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/External Data Source/Alter External Data Source DW.sql
@@ -1,6 +1,6 @@
--- =========================================================================
--- Alter external data source template for Azure SQL Data Warehouse Database
--- =========================================================================
+-- ========================================================================
+-- Alter external data source template for Azure Synapse Analytics Database
+-- ========================================================================
ALTER EXTERNAL DATA SOURCE SET
LOCATION = N'',
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/External Data Source/Create External Data Source DW.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/External Data Source/Create External Data Source DW.sql
index 886d87b664..1f7b36b378 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/External Data Source/Create External Data Source DW.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/External Data Source/Create External Data Source DW.sql
@@ -1,20 +1,20 @@
--- ==========================================================================
--- Create external data source template for Azure SQL Data Warehouse Database
--- ==========================================================================
+-- =========================================================================
+-- Create external data source template for Azure Synapse Analytics Database
+-- =========================================================================
IF EXISTS (
SELECT *
- FROM sys.external_data_sources
- WHERE name = N''
+ FROM sys.external_data_sources
+ WHERE name = N''
)
DROP EXTERNAL DATA SOURCE
GO
CREATE EXTERNAL DATA SOURCE WITH
(
- TYPE = ,
- LOCATION = N'',
- RESOURCE_MANAGER_LOCATION = N'',
- CREDENTIAL =
+ TYPE = ,
+ LOCATION = N'',
+ RESOURCE_MANAGER_LOCATION = N'',
+ CREDENTIAL =
)
GO
\ No newline at end of file
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/External Data Source/Create External Data Source.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/External Data Source/Create External Data Source.sql
index 13b90e80ef..200cbce94f 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/External Data Source/Create External Data Source.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/External Data Source/Create External Data Source.sql
@@ -4,7 +4,7 @@
IF EXISTS (
SELECT *
FROM sys.external_data_sources
- WHERE name = N''
+ WHERE name = N''
)
DROP EXTERNAL DATA SOURCE
GO
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/External Data Source/Drop External Data Source.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/External Data Source/Drop External Data Source.sql
index 69e66fd3c2..1072e9f901 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/External Data Source/Drop External Data Source.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/External Data Source/Drop External Data Source.sql
@@ -1,11 +1,11 @@
--- ===============================================================================================
--- Drop external data source template for Azure SQL Database and Azure SQL Data Warehouse Database
--- ===============================================================================================
+-- ======================================================================================================================================
+-- Drop external data source template for Azure SQL Database, Azure Synapse Analytics Database, and Azure Synapse SQL Analytics on-demand
+-- ======================================================================================================================================
IF EXISTS (
SELECT *
- FROM sys.external_data_sources
- WHERE name = N''
+ FROM sys.external_data_sources
+ WHERE name = N''
)
DROP EXTERNAL DATA SOURCE
GO
\ No newline at end of file
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/External File Format/Create External File Format.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/External File Format/Create External File Format.sql
index 6f0a5fdfa6..1772c506d2 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/External File Format/Create External File Format.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/External File Format/Create External File Format.sql
@@ -1,6 +1,6 @@
--- ==========================================================================
--- Create external file format template for Azure SQL Data Warehouse Database
--- ==========================================================================
+-- =========================================================================
+-- Create external file format template for Azure Synapse Analytics Database
+-- =========================================================================
IF EXISTS (
SELECT *
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/External File Format/Drop External File Format.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/External File Format/Drop External File Format.sql
index e39fec07b3..352a56178a 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/External File Format/Drop External File Format.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/External File Format/Drop External File Format.sql
@@ -1,6 +1,6 @@
--- ========================================================================
--- Drop external file format template for Azure SQL Data Warehouse Database
--- ========================================================================
+-- ==================================================================================================================
+-- Drop external file format template for Azure Synapse Analytics Database, and Azure Synapse SQL Analytics on-demand
+-- ==================================================================================================================
IF EXISTS (
SELECT *
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/Function/Create Scalar Function DW (New Menu).sql b/samples/features/ssms-templates/Sql/SQL Azure Database/Function/Create Scalar Function DW (New Menu).sql
index bc24016a65..1827a58482 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/Function/Create Scalar Function DW (New Menu).sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/Function/Create Scalar Function DW (New Menu).sql
@@ -1,6 +1,6 @@
--- =====================================================================
--- Create Scalar Function Template for Azure SQL Data Warehouse Database
--- =====================================================================
+-- ====================================================================
+-- Create Scalar Function Template for Azure Synapse Analytics Database
+-- ====================================================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/Function/Drop Function.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/Function/Drop Function.sql
index acce825a39..f7b2d7cd27 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/Function/Drop Function.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/Function/Drop Function.sql
@@ -1,6 +1,6 @@
- --===================================================================================
--- Drop function template for Azure SQL Database and Azure SQL Data Warehouse Database
---====================================================================================
+ --==================================================================================
+-- Drop function template for Azure SQL Database and Azure Synapse Analytics Database
+--===================================================================================
IF OBJECT_ID (N'.') IS NOT NULL
DROP FUNCTION .
GO
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/Index/Create Index.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/Index/Create Index.sql
index 861fea58cd..b37b8b6f28 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/Index/Create Index.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/Index/Create Index.sql
@@ -1,6 +1,6 @@
--- ==================================================================================
--- Create index template for Azure SQL Database and Azure SQL Data Warehouse Database
--- ==================================================================================
+-- =================================================================================
+-- Create index template for Azure SQL Database and Azure Synapse Analytics Database
+-- =================================================================================
CREATE INDEX
ON .
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/Index/Drop Index.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/Index/Drop Index.sql
index 7da059546f..4f8f08817f 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/Index/Drop Index.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/Index/Drop Index.sql
@@ -1,6 +1,6 @@
---========================================================================
--- Drop index template for Azure SQL Database and Azure SQL Data Warehouse
---========================================================================
+--=======================================================================
+-- Drop index template for Azure SQL Database and Azure Synapse Analytics
+--=======================================================================
IF EXISTS (
SELECT *
FROM sys.indexes
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/Login/Create Login.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/Login/Create Login.sql
index a060f4921f..519f58f2ea 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/Login/Create Login.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/Login/Create Login.sql
@@ -1,6 +1,6 @@
--- ======================================================================================
--- Create SQL Login template for Azure SQL Database and Azure SQL Data Warehouse Database
--- ======================================================================================
+-- =============================================================================================================================
+-- Create SQL Login template for Azure SQL Database, Azure Synapse Analytics Database, and Azure Synapse SQL Analytics on-demand
+-- =============================================================================================================================
CREATE LOGIN
WITH PASSWORD = ''
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/Login/Drop Login.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/Login/Drop Login.sql
index ce3904559b..ed021dd888 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/Login/Drop Login.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/Login/Drop Login.sql
@@ -1,6 +1,6 @@
--- ====================================================================================
--- Drop SQL Login template for Azure SQL Database and Azure SQL Data Warehouse Database
--- ====================================================================================
+-- ===========================================================================================================================
+-- Drop SQL Login template for Azure SQL Database, Azure Synapse Analytics Database, and Azure Synapse SQL Analytics on-demand
+-- ===========================================================================================================================
DROP LOGIN
Go
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/Role/Create Role.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/Role/Create Role.sql
index 216bc3de0e..174dd2bbda 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/Role/Create Role.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/Role/Create Role.sql
@@ -1,6 +1,6 @@
--- ==========================================================================================
--- Create Database Role template for Azure SQL Database and Azure SQL Data Warehouse Database
--- ==========================================================================================
+-- =========================================================================================
+-- Create Database Role template for Azure SQL Database and Azure Synapse Analytics Database
+-- =========================================================================================
-- Create the database role
CREATE ROLE AUTHORIZATION [dbo]
GO
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/Role/Drop Role.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/Role/Drop Role.sql
index 2f00d1eca4..ae45b76bec 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/Role/Drop Role.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/Role/Drop Role.sql
@@ -1,6 +1,6 @@
--- ========================================================================================
--- Drop Database Role template for Azure SQL Database and Azure SQL Data Warehouse Database
--- ========================================================================================
+-- ===============================================================================================================================
+-- Drop Database Role template for Azure SQL Database, Azure Synapse Analytics Database, and Azure Synapse SQL Analytics on-demand
+-- ===============================================================================================================================
-- Drop the role
DROP ROLE ;
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/Schema/Create Schema.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/Schema/Create Schema.sql
index 5db793fa2e..a1f5fa8406 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/Schema/Create Schema.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/Schema/Create Schema.sql
@@ -1,6 +1,6 @@
--- ===================================================================================
--- Create Schema Template for Azure SQL Database and Azure SQL Data Warehouse Database
--- ===================================================================================
+-- ==========================================================================================================================
+-- Create Schema Template for Azure SQL Database, Azure Synapse Analytics Database, and Azure Synapse SQL Analytics on-demand
+-- ==========================================================================================================================
CREATE SCHEMA
AUTHORIZATION
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/Schema/Drop Schema.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/Schema/Drop Schema.sql
index ca204abab5..608621871a 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/Schema/Drop Schema.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/Schema/Drop Schema.sql
@@ -1,6 +1,6 @@
---==================================================================================
--- Drop Schema template for Azure SQL Database and Azure SQL Data Warehouse Database
---==================================================================================
+--=========================================================================================================================
+-- Drop Schema template for Azure SQL Database, Azure Synapse Analytics Database, and Azure Synapse SQL Analytics on-demand
+--=========================================================================================================================
IF EXISTS(
SELECT *
FROM sys.schemas
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/Statistics/Create Statistics.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/Statistics/Create Statistics.sql
index 8010ace896..61e4940397 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/Statistics/Create Statistics.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/Statistics/Create Statistics.sql
@@ -1,6 +1,6 @@
--- ===============================================================================================
--- Create Sampled Statistics Template for Azure SQL Database and Azure SQL Data Warehouse Database
--- ===============================================================================================
+-- ======================================================================================================================================
+-- Create Sampled Statistics Template for Azure SQL Database, Azure Synapse Analytics Database, and Azure Synapse SQL Analytics on-demand
+-- ======================================================================================================================================
CREATE STATISTICS
ON .
(
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/Statistics/Drop Statistics.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/Statistics/Drop Statistics.sql
index be0d700a00..bbc6cf1c71 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/Statistics/Drop Statistics.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/Statistics/Drop Statistics.sql
@@ -1,6 +1,6 @@
---======================================================================================
--- Drop Statistics template for Azure SQL Database and Azure SQL Data Warehouse Database
---======================================================================================
+--=============================================================================================================================
+-- Drop Statistics template for Azure SQL Database, Azure Synapse Analytics Database, and Azure Synapse SQL Analytics on-demand
+--=============================================================================================================================
IF EXISTS (
SELECT *
FROM sys.stats as st
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/Stored Procedure/Create Stored Procedure DW (New Menu).sql b/samples/features/ssms-templates/Sql/SQL Azure Database/Stored Procedure/Create Stored Procedure DW (New Menu).sql
index a723c18f43..cb91930155 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/Stored Procedure/Create Stored Procedure DW (New Menu).sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/Stored Procedure/Create Stored Procedure DW (New Menu).sql
@@ -1,6 +1,6 @@
--- ======================================================================
--- Create Stored Procedure Template for Azure SQL Data Warehouse Database
--- ======================================================================
+-- =====================================================================
+-- Create Stored Procedure Template for Azure Synapse Analytics Database
+-- =====================================================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/Stored Procedure/Drop Stored Procedure.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/Stored Procedure/Drop Stored Procedure.sql
index 8914ee500e..7af30c9ea9 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/Stored Procedure/Drop Stored Procedure.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/Stored Procedure/Drop Stored Procedure.sql
@@ -1,6 +1,6 @@
--- ===========================================================================================
--- Drop Stored Procedure Template for Azure SQL Database and Azure SQL Data Warehouse Database
--- ===========================================================================================
+-- ==========================================================================================
+-- Drop Stored Procedure Template for Azure SQL Database and Azure Synapse Analytics Database
+-- ==========================================================================================
-- Drop stored procedure if it already exists
IF EXISTS (
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Create External Table DW.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Create External Table DW.sql
index ff56e7883f..753e1079e7 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Create External Table DW.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Create External Table DW.sql
@@ -1,6 +1,6 @@
--- ====================================================================
--- Create External Table Template for Azure SQL Data Warehouse Database
--- ====================================================================
+-- ===================================================================
+-- Create External Table Template for Azure Synapse Analytics Database
+-- ===================================================================
IF OBJECT_ID('.', 'U') IS NOT NULL
DROP EXTERNAL TABLE .
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Create Graph Edge Table.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Create Graph Edge Table.sql
index 9c520ee581..d396703076 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Create Graph Edge Table.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Create Graph Edge Table.sql
@@ -1,24 +1,32 @@
-- =========================================
--- Create Graph Edge Template
+-- Create Graph Edge Table Template
-- =========================================
+USE
+GO
-IF OBJECT_ID('.', 'U') IS NOT NULL
- DROP TABLE .
+DROP TABLE IF EXISTS .
GO
CREATE TABLE .
(
- -- Columns are optional for Edge Tables.
+ -- Columns are optional for Graph Edge Tables.
--
,
,
,
+ -- System generated edge constraint.
+ --
+ CONNECTION (),
+
+ CONSTRAINT EC_ CONNECTION (, TO ),
-- Unique index on $edge_id is required.
- -- If no user-defined index is specified, a default index is created instead.
+ -- If no user-defined index is specified, a default index is created.
+ --
INDEX ix_graphid UNIQUE ($edge_id),
-- indexes on $from_id and $to_id are optional, but support faster lookups.
+ --
INDEX ix_fromid ($from_id, $to_id),
INDEX ix_toid ($to_id, $from_id)
)
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Create SQL DW Partitioned Table.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Create SQL DW Partitioned Table.sql
index 6762010ebe..ad6873dd59 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Create SQL DW Partitioned Table.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Create SQL DW Partitioned Table.sql
@@ -1,6 +1,6 @@
--- =======================================================================
--- Create Partitioned Table Template for Azure SQL Data Warehouse Database
--- =======================================================================
+-- ======================================================================
+-- Create Partitioned Table Template for Azure Synapse Analytics Database
+-- ======================================================================
IF OBJECT_ID('.', 'U') IS NOT NULL
DROP TABLE .
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Create SQL DW Table.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Create SQL DW Table.sql
index ee646172ba..ad8859e69d 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Create SQL DW Table.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Create SQL DW Table.sql
@@ -1,6 +1,6 @@
--- ===========================================================
--- Create Table Template for Azure SQL Data Warehouse Database
--- ===========================================================
+-- ==========================================================
+-- Create Table Template for Azure Synapse Analytics Database
+-- ==========================================================
IF OBJECT_ID('.', 'U') IS NOT NULL
DROP TABLE .
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Create System-Versioned Table.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Create System-Versioned Table.sql
index fff691c835..2496fbf99c 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Create System-Versioned Table.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Create System-Versioned Table.sql
@@ -13,7 +13,7 @@
BEGIN
--If table is system-versioned, SYSTEM_VERSIONING must be set to OFF first
- IF ((SELECT temporal_type FROM SYS.TABLES WHERE object_id = OBJECT_ID('.', 'U')) = 2)
+ IF ((SELECT temporal_type FROM sys.tables WHERE object_id = OBJECT_ID('.', 'U')) = 2)
BEGIN
ALTER TABLE [].[] SET (SYSTEM_VERSIONING = OFF)
END
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Drop External Table.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Drop External Table.sql
index 1bb161fa75..fad276b06f 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Drop External Table.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Drop External Table.sql
@@ -1,6 +1,6 @@
---==========================================================================================
--- Drop External Table template for Azure SQL Database and Azure SQL Data Warehouse Database
---==========================================================================================
+--=================================================================================================================================
+-- Drop External Table template for Azure SQL Database, Azure Synapse Analytics Database, and Azure Synapse SQL Analytics on-demand
+--=================================================================================================================================
IF EXISTS (
SELECT *
FROM sys.tables
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Drop Table.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Drop Table.sql
index 7758c8b979..8bca0fcf36 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Drop Table.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/Table/Drop Table.sql
@@ -1,6 +1,6 @@
---=================================================================================
--- Drop Table template for Azure SQL Database and Azure SQL Data Warehouse Database
---=================================================================================
+--================================================================================
+-- Drop Table template for Azure SQL Database and Azure Synapse Analytics Database
+--================================================================================
IF EXISTS (
SELECT *
FROM sys.tables
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/User/Create User.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/User/Create User.sql
index 61de5bf70b..cb838af2d2 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/User/Create User.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/User/Create User.sql
@@ -1,6 +1,6 @@
--- ========================================================================================
--- Create User as DBO template for Azure SQL Database and Azure SQL Data Warehouse Database
--- ========================================================================================
+-- =======================================================================================
+-- Create User as DBO template for Azure SQL Database and Azure Synapse Analytics Database
+-- =======================================================================================
-- For login , create a user in the database
CREATE USER
FOR LOGIN
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/User/Drop User.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/User/Drop User.sql
index f1a830b465..f21cca8a10 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/User/Drop User.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/User/Drop User.sql
@@ -1,5 +1,5 @@
--- ========================================================================================
--- Create User as DBO template for Azure SQL Database and Azure SQL Data Warehouse Database
--- ========================================================================================
+-- ===============================================================================================================================
+-- Create User as DBO template for Azure SQL Database, Azure Synapse Analytics Database, and Azure Synapse SQL Analytics on-demand
+-- ===============================================================================================================================
DROP USER
GO
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/View/Create View.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/View/Create View.sql
index 93570399db..151b410659 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/View/Create View.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/View/Create View.sql
@@ -1,6 +1,6 @@
--- =================================================================================
--- Create View template for Azure SQL Database and Azure SQL Data Warehouse Database
--- =================================================================================
+-- ================================================================================
+-- Create View template for Azure SQL Database and Azure Synapse Analytics Database
+-- ================================================================================
IF object_id(N'.', 'V') IS NOT NULL
DROP VIEW .
diff --git a/samples/features/ssms-templates/Sql/SQL Azure Database/View/Drop View.sql b/samples/features/ssms-templates/Sql/SQL Azure Database/View/Drop View.sql
index a5aeb66f55..b65c834569 100644
--- a/samples/features/ssms-templates/Sql/SQL Azure Database/View/Drop View.sql
+++ b/samples/features/ssms-templates/Sql/SQL Azure Database/View/Drop View.sql
@@ -1,6 +1,6 @@
---================================================================================
--- Drop View template for Azure SQL Database and Azure SQL Data Warehouse Database
---================================================================================
+--=======================================================================================================================
+-- Drop View template for Azure SQL Database, Azure Synapse Analytics Database, and Azure Synapse SQL Analytics on-demand
+--=======================================================================================================================
IF EXISTS (
SELECT *
FROM sys.views
diff --git a/samples/features/ssms-templates/Sql/Table/Create Graph Edge Table.sql b/samples/features/ssms-templates/Sql/Table/Create Graph Edge Table.sql
index c56b10e4b2..d396703076 100644
--- a/samples/features/ssms-templates/Sql/Table/Create Graph Edge Table.sql
+++ b/samples/features/ssms-templates/Sql/Table/Create Graph Edge Table.sql
@@ -1,26 +1,32 @@
-- =========================================
--- Create Graph Edge Template
+-- Create Graph Edge Table Template
-- =========================================
USE
GO
-IF OBJECT_ID('.', 'U') IS NOT NULL
- DROP TABLE .
+DROP TABLE IF EXISTS .
GO
CREATE TABLE .
(
- -- Columns are optional for Edge Tables.
+ -- Columns are optional for Graph Edge Tables.
--
,
,
,
+ -- System generated edge constraint.
+ --
+ CONNECTION (),
+
+ CONSTRAINT EC_ CONNECTION (, TO ),
-- Unique index on $edge_id is required.
-- If no user-defined index is specified, a default index is created.
+ --
INDEX ix_graphid UNIQUE ($edge_id),
-- indexes on $from_id and $to_id are optional, but support faster lookups.
+ --
INDEX ix_fromid ($from_id, $to_id),
INDEX ix_toid ($to_id, $from_id)
)
diff --git a/samples/features/ssms-templates/Sql/Table/Create Memory Optimized System-Versioned Table.sql b/samples/features/ssms-templates/Sql/Table/Create Memory Optimized System-Versioned Table.sql
index 2061a1cd9f..371dfa33d5 100644
--- a/samples/features/ssms-templates/Sql/Table/Create Memory Optimized System-Versioned Table.sql
+++ b/samples/features/ssms-templates/Sql/Table/Create Memory Optimized System-Versioned Table.sql
@@ -19,7 +19,7 @@ USE
GO
BEGIN
- IF ((SELECT temporal_type FROM SYS.TABLES WHERE object_id = OBJECT_ID('.', 'U')) = 2)
+ IF ((SELECT temporal_type FROM sys.tables WHERE object_id = OBJECT_ID('.', 'U')) = 2)
BEGIN
ALTER TABLE [].[] SET (SYSTEM_VERSIONING = OFF)
END
diff --git a/samples/features/ssms-templates/Sql/Table/Create System-Versioned Table.sql b/samples/features/ssms-templates/Sql/Table/Create System-Versioned Table.sql
index 420f0300ff..58231ac62b 100644
--- a/samples/features/ssms-templates/Sql/Table/Create System-Versioned Table.sql
+++ b/samples/features/ssms-templates/Sql/Table/Create System-Versioned Table.sql
@@ -16,7 +16,7 @@ GO
BEGIN
--If table is system-versioned, SYSTEM_VERSIONING must be set to OFF first
- IF ((SELECT temporal_type FROM SYS.TABLES WHERE object_id = OBJECT_ID('.', 'U')) = 2)
+ IF ((SELECT temporal_type FROM sys.tables WHERE object_id = OBJECT_ID('.', 'U')) = 2)
BEGIN
ALTER TABLE [].[] SET (SYSTEM_VERSIONING = OFF)
END
diff --git a/samples/features/ssms-templates/Sql/Table/drop constraint.sql b/samples/features/ssms-templates/Sql/Table/drop constraint.sql
index 893d85fa43..15c30a7bdd 100644
--- a/samples/features/ssms-templates/Sql/Table/drop constraint.sql
+++ b/samples/features/ssms-templates/Sql/Table/drop constraint.sql
@@ -3,6 +3,11 @@
--
-- This template creates a table with a CHECK CONSTRAINT,
-- then it removes the CHECK CONSTRAINT from the table
+
+-- Note: The DROP syntax can also be used to drop
+-- Edge Constraint object types. To achieve this replace
+-- the constraint_name attribute with the name of the
+-- respective Edge Constraint object
-- ========================================================
USE
GO
diff --git a/samples/features/unicode/DataType_WesternMyth.sql b/samples/features/unicode/DataType_WesternMyth.sql
index 2ef4b9d924..cfd1a3cb84 100644
--- a/samples/features/unicode/DataType_WesternMyth.sql
+++ b/samples/features/unicode/DataType_WesternMyth.sql
@@ -7,7 +7,13 @@
-- Test Latin character strings with Latin collation
-- Set size limit of data types to be the same under Basic Multilingual Plane (BMP)
-- Characters between 1-byte (ASCII) and 3-bytes (East Asian)
+USE master;
+DROP DATABASE IF EXISTS UnicodeDatabase;
+CREATE DATABASE UnicodeDatabase COLLATE LATIN1_GENERAL_100_CI_AS_SC_UTF8
+GO
+USE UnicodeDatabase
+GO
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (c1 varchar(24) COLLATE Latin1_General_100_CI_AI,
c2 nvarchar(8) COLLATE Latin1_General_100_CI_AI);
@@ -46,7 +52,8 @@ GO
-- uh-oh data loss on the varchar example. Why?
--- varchar is bound to code page enconding, and these code points cannot be found in the Latin code page.
+-- varchar is bound to code page enconding,
+-- and these code points cannot be found in the Latin code page.
SELECT ASCII('敏' COLLATE Latin1_General_100_CI_AI), CHAR(63)
SELECT ASCII('捷' COLLATE Latin1_General_100_CI_AI), CHAR(63)
@@ -152,10 +159,10 @@ GO
-- But the majority of my data is set to Latin (ASCII)
DROP TABLE IF EXISTS t4;
-CREATE TABLE t4 (c1 varchar(110) COLLATE Latin1_General_100_CI_AI_SC);
+CREATE TABLE t4 (c1 varchar(110) COLLATE Latin1_General_100_CI_AI_SC_UTF8);
INSERT INTO t4 VALUES (N'MyStringThequickbrownfoxjumpsoverthelazydogIsLatinAscii敏捷的棕色狐狸跳👶👦')
-SELECT LEN(c1) AS [varchar UTF16 LEN],
- DATALENGTH(c1) AS [varchar UTF16 DATALENGTH], c1
+SELECT LEN(c1) AS [varchar UTF8 LEN],
+ DATALENGTH(c1) AS [varchar UTF8 DATALENGTH], c1
FROM t4;
GO
@@ -164,8 +171,8 @@ GO
-- Where are the savings?
SELECT DATALENGTH(N'MyStringThequickbrownfoxjumpsoverthelazydogIsLatinAscii') AS [Latin_UTF16_2bytes],
DATALENGTH(N'敏捷的棕色狐狸跳') AS [Chinese_UTF16_2bytes],
- DATALENGTH(N'👶👦') AS [SC_UTF16_4bytes]
+ DATALENGTH(N'👶') AS [SC_UTF16_4bytes]
SELECT DATALENGTH('MyStringThequickbrownfoxjumpsoverthelazydogIsLatinAscii' COLLATE Latin1_General_100_CI_AI_SC_UTF8) AS [Latin_UTF8_1byte],
DATALENGTH('敏捷的棕色狐狸跳' COLLATE Latin1_General_100_CI_AI_SC_UTF8) AS [Chinese_UTF8_3bytes],
- DATALENGTH('👶👦' COLLATE Latin1_General_100_CI_AI_SC_UTF8) AS [SC_UTF8_4bytes]
+ DATALENGTH('👶' COLLATE Latin1_General_100_CI_AI_SC_UTF8) AS [SC_UTF8_4bytes]
GO
\ No newline at end of file
diff --git a/samples/features/unicode/notebooks/DataType_WesternMyth.ipynb b/samples/features/unicode/notebooks/DataType_WesternMyth.ipynb
index 92a4160f8a..bcd928bc58 100644
--- a/samples/features/unicode/notebooks/DataType_WesternMyth.ipynb
+++ b/samples/features/unicode/notebooks/DataType_WesternMyth.ipynb
@@ -15,45 +15,18 @@
"cells": [
{
"cell_type": "markdown",
- "source": [
- "# Data type sizes - a western myth"
- ],
- "metadata": {
- "azdata_cell_guid": "9e602698-2ef8-4fed-872f-5bad8c440600"
- }
+ "source": "# Data type sizes - a western myth",
+ "metadata": {}
},
{
"cell_type": "markdown",
- "source": [
- "## Test Latin character strings with Latin collation\r\n",
- "\r\n",
- "**Note:** My server default is SQL_Latin1_General_CP1_CI_AS\r\n",
- "\r\n",
- "Set size limit of data types to be the same under Basic Multilingual Plane (BMP)\r\n",
- "Characters between 1-byte (ASCII) and 3-bytes (East Asian)"
- ],
- "metadata": {
- "azdata_cell_guid": "78fc4a30-52e8-407d-8807-04097ad12348"
- }
+ "source": "## Test Latin character strings with Latin collation\r\n\r\n**Note:** My server default is SQL_Latin1_General_CP1_CI_AS\r\n\r\nSet size limit of data types to be the same under Basic Multilingual Plane (BMP)\r\nCharacters: ranging from 1-byte (ASCII) to 3-bytes (East Asian) per character. So a max of 24-bytes for an East Asian 8 character string.",
+ "metadata": {}
},
{
"cell_type": "code",
- "source": [
- "DROP TABLE IF EXISTS t1;\r\n",
- "CREATE TABLE t1 (c1 varchar(24) COLLATE Latin1_General_100_CI_AI, \r\n",
- "\tc2 nvarchar(8) COLLATE Latin1_General_100_CI_AI); \r\n",
- "INSERT INTO t1 VALUES (N'MyString', N'MyString') \r\n",
- "SELECT LEN(c1) AS [varchar LEN], \r\n",
- "\tDATALENGTH(c1) AS [varchar DATALENGTH], c1\r\n",
- "FROM t1; \r\n",
- "SELECT LEN(c2) AS [nvarchar LEN], \r\n",
- "\tDATALENGTH(c2) AS [nvarchar DATALENGTH], c2 \r\n",
- "FROM t1;\r\n",
- "GO"
- ],
- "metadata": {
- "azdata_cell_guid": "4a7b199e-3117-4fcb-b149-776f4da6cf71"
- },
+ "source": "USE UnicodeDatabase\r\nGO\r\nDROP TABLE IF EXISTS t1;\r\nCREATE TABLE t1 (c1 varchar(24) COLLATE Latin1_General_100_CI_AI, \r\n\tc2 nvarchar(8) COLLATE Latin1_General_100_CI_AI); \r\nINSERT INTO t1 VALUES (N'MyString', N'MyString') \r\nSELECT LEN(c1) AS [varchar LEN], \r\n\tDATALENGTH(c1) AS [varchar DATALENGTH], c1\r\nFROM t1; \r\nSELECT LEN(c2) AS [nvarchar LEN], \r\n\tDATALENGTH(c2) AS [nvarchar DATALENGTH], c2 \r\nFROM t1;\r\nGO",
+ "metadata": {},
"outputs": [
{
"output_type": "display_data",
@@ -79,14 +52,13 @@
{
"output_type": "display_data",
"data": {
- "text/html": "Total execution time: 00:00:00.068"
+ "text/html": "Total execution time: 00:00:00.1996267"
},
"metadata": {}
},
{
"output_type": "execute_result",
- "metadata": {},
- "execution_count": 15,
+ "execution_count": 1,
"data": {
"application/vnd.dataresource+json": {
"schema": {
@@ -111,12 +83,12 @@
]
},
"text/html": "
"
+ },
+ "metadata": {}
}
],
- "execution_count": 25
+ "execution_count": 2
}
]
}
\ No newline at end of file
diff --git a/samples/manage/README.md b/samples/manage/README.md
index 9ddaf4fb3c..8b6072e327 100644
--- a/samples/manage/README.md
+++ b/samples/manage/README.md
@@ -8,13 +8,12 @@ This includes samples for setting up Azure Automation and exporting your databas
## Collect and monitor resource usage data across multiple pools in a subscription
This Solution Quick Start provides a solution for collecting and monitoring Azure SQL Database resource usage across multiple pools in a subscription. When you have a large number of databases in a subscription, it is cumbersome to monitor each elastic pool separately. To solve this, you can combine SQL database PowerShell cmdlets and T-SQL queries to collect resource usage data from multiple pools and their databases for monitoring and analysis of resource usage.
-[Manage Mulitiple Elastic Pools in SQL Database Using PowerShell and Power BI](/~https://github.com/Microsoft/sql-server-samples/tree/master/samples/manage/azure-sql-db-elastic-pools) in the GitHub SQL Server samples repository provides a set of powershell scripts and T-SQL queries along with documentation on what it does and how to use it.
+[Manage Multiple Elastic Pools in SQL Database Using PowerShell and Power BI](/~https://github.com/Microsoft/sql-server-samples/tree/master/samples/manage/azure-sql-db-elastic-pools) in the GitHub SQL Server samples repository provides a set of powershell scripts and T-SQL queries along with documentation on what it does and how to use it.
## Get started using Elastic Pools in a SaaS scenario
-This Solution Quick Start provides a solution for a Softwware-as-a-Solution (SaaS) scenario that leverages Elastic Pools to provide a cost-effective, scalable database back-end of a SaaS application. In this solution, you will walk-though the implementation of a web app that lets you visualize the load created on an Elastic Pool by a load generator using a custom dashboard that supplements the Azure Portal.
+This Solution Quick Start provides a solution for a Software-as-a-Solution (SaaS) scenario that leverages Elastic Pools to provide a cost-effective, scalable database back-end of a SaaS application. In this solution, you will walk-though the implementation of a web app that lets you visualize the load created on an Elastic Pool by a load generator using a custom dashboard that supplements the Azure Portal.
[saas-scenario-with-elastic-pools](/~https://github.com/Microsoft/sql-server-samples/tree/master/samples/manage/azure-sql-db-elastic-pools-custom-dashboard) in the GitHub SQL Server samples repository provides a load generator and monitoring web app along with the documentation on what it does and how to use it.
## Windows Containers
-This includes samples for setting up mssql-server in Windows Containers. Currently it includes the following:
-- __[windows-containers] (windows-containers/)__
+This includes samples for setting up mssql-server in Windows Containers. Currently it only includes a link to the separately maintained [mssql-docker](/~https://github.com/Microsoft/mssql-docker/blob/master/windows/README.md) instructions.
diff --git a/samples/manage/azure-arc-enabled-sql-server/README.md b/samples/manage/azure-arc-enabled-sql-server/README.md
new file mode 100644
index 0000000000..b0aa6a5f51
--- /dev/null
+++ b/samples/manage/azure-arc-enabled-sql-server/README.md
@@ -0,0 +1,30 @@
+---
+services: Azure Arc enabled SQL Server
+platforms: Azure
+author: anosov1960
+ms.author: sashan
+ms.date: 12/08/2020
+---
+
+# Running the script using Cloud Shell
+
+Use the following steps to migrate your existing SQL Server - Azure Arc resources from Microsoft.AzureData namespace to Microsoft.AzureArcData namespace.
+
+1. Launch the [Cloud Shell](https://shell.azure.com/). For details, [read more about PowerShell in Cloud Shell](https://aka.ms/pscloudshell/docs).
+
+2. Upload the script to the shell using the following command:
+
+ ```console
+ curl https://raw.githubusercontent.com/microsoft/sql-server-samples/master/samples/manage/azure-arc-enabled-sql-server/migrate-to-azure-arc-data.ps1 -o migrate-to-azure-arc-data.ps1
+ ```
+
+3. Run the script.
+
+ ```console
+ ./migrate-to-azure-arc-data.ps1
+ ```
+
+> [!NOTE]
+> - To paste the commands into the shell, use `Ctrl-Shift-V` on Windows or `Cmd-v` on MacOS.
+> - The script will be uploaded directly to the home folder associated with your Cloud Shell session.
+> - The script will prompt for the resource group name and print a message when migration is completed.
diff --git a/samples/manage/azure-arc-enabled-sql-server/migrate-to-azure-arc-data.ps1 b/samples/manage/azure-arc-enabled-sql-server/migrate-to-azure-arc-data.ps1
new file mode 100644
index 0000000000..a4521a1d4b
--- /dev/null
+++ b/samples/manage/azure-arc-enabled-sql-server/migrate-to-azure-arc-data.ps1
@@ -0,0 +1,50 @@
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------------
+#
+# Sample script for migrating the existing SQL Server - Azure Arc resources from Microsoft.AzureData namespace to Microsoft.AzureArcData namespace
+# within a single Resource Group
+#
+
+$ResourceGroup=read-host -Prompt "Enter Resource Group Name"
+
+$SqlArcResources = Get-AzResource -ExpandProperties -ResourceType Microsoft.AzureData/sqlServerInstances -ResourceGroupName $ResourceGroup
+foreach ($r in $SqlArcResources) {
+ Write-Host ("Migrating resource: {0}" -f $r.Name)
+
+ if ( ! ($r.Properties.containerResourceId -match "Microsoft.HybridCompute/machines") ) {
+ $arcResource = Get-AzResource -ResourceType Microsoft.HybridCompute/machines -Name $r.Properties.containerResourceId
+ if($null -eq $arcResource) {
+ Write-Warning ("Could not locate the Machine - Azure Arc resource associated with this SQL Server Instance. You should manually un-register and re-register this instance.")
+ continue
+ } else {
+ $r.Properties.containerResourceId = $arcResource.ResourceId
+ }
+ }
+
+ if( $null -ne $r.Properties.tcpPorts ){
+ Write-Warning "The property `"tcpPorts`" has been renamed to `"tcpStaticPorts`". The property name will be updated during resource migration."
+ $r.Properties | Add-Member -MemberType NoteProperty -Name "tcpStaticPorts" -Value $r.Properties.tcpPorts
+ $r.Properties.psobject.properties.remove("tcpPorts")
+ }
+
+ if( $null -ne $r.Properties.createTime ){
+ Write-Warning "There is a known bug in the createTime property. This property will be removed during resource migration."
+ $r.Properties.psobject.properties.remove("createTime")
+ }
+
+ New-AzResource -ResourceName $r.Name -Location $r.Location -Properties $r.Properties -ResourceGroupName $r.ResourceGroupName `
+ -ResourceType Microsoft.AzureArcData/sqlServerInstances -Force
+}
+
+Write-Host "Namespace migration completed for SQL Server - Azure Arc resources."
diff --git a/samples/manage/azure-hybrid-benefit/README.md b/samples/manage/azure-hybrid-benefit/README.md
new file mode 100644
index 0000000000..b48286bf38
--- /dev/null
+++ b/samples/manage/azure-hybrid-benefit/README.md
@@ -0,0 +1,61 @@
+---
+services: Azure SQL
+platforms: Azure
+author: anosov1960
+ms.author: sashan
+ms.date: 12/17/2020
+---
+
+# Overview
+
+This script is provided to help you manage the SQL Server licenses that are consumed by the SQL Servers deployed to Azure. The script writes the results to a `sql-license-usage.csv` file. If the file with this name already exists, the new results will be appended to it. The report includes the following information for each scanned subscription as well as the totals for each category.
+| **Category** | **Description** |
+|:--|:--|
+|Date|Date of the scan|
+|Time|Time of the scan|
+|Subscription name|The name of the subscription|
+|Subscription ID|The unique subscription ID|
+|AHB Std vCores|Total vCores used by General Purpose service tier or SQL Server Standard edition billed with AHB discount|
+|AHB Ent vCores|Total vCores used by Business Critical service tier or SQL Server Enterprise edition billed with AHB discount|
+|PAYG Std vCores|Total vCores used by General Purpose service tier or SQL Server Standard edition billed at full price|
+|PAYG Ent vCores|Total vCores used by Business Critical service tier or SQL Server Enterprise edition billed at full price|
+|HADR Std vCores|Total vCores used by HADR replicas running SQL Server Standard edition|
+|HADR Ent vCores|Total vCores used by HADR replicas running SQL Server Enterprise edition|
+|Developer vCores|Total vCores used by SQL Server Developer edition|
+|Express vCores|Total vCores used by SQL Server Express edition|
+
+>[!NOTE]
+> - The usage data is a snapshot at the time of the script execution based on the size of the deployed SQL resources in vCores.
+> - For IaaS workloads, such as SQL Server in Virtual Machines or SSIS integration runtimes, each vCPU is counted as one vCore.
+> - For PaaS workloads, each vCore of Business Critical service tier is counted as one Enterprise vCore and each vCore of General Purpose service tier is counted as one Standard vCore.
+
+# Running the script using Cloud Shell
+
+Use the following steps to calculate the SQL Server license usage:
+
+1. Launch the [Cloud Shell](https://shell.azure.com/). For details, read [PowerShell in Cloud Shell](https://aka.ms/pscloudshell/docs).
+
+2. Upload the script to the shell using the following command:
+
+ ```console
+ curl https://raw.githubusercontent.com/microsoft/sql-server-samples/master/samples/manage/azure-hybrid-benefit/sql-license-usage.ps1 -o sql-license-usage.ps1
+ ```
+
+3. Run the script with a specific subscriptions ID or the file name as the parameter. The file should be used if you need to scan a subset of the subscriptions. If the parameter is not specified, the script will scan all the subscriptions in your account.
+
+ ```console
+ ./sql-license-usage.ps1 or .csv
+ ```
+
+If the a file is specified, it must be a `.csv` file with the list of subscriptions. To create a file containing all subscriptions in your account, use the following command. You can then edit the file to remove the subscriptions you don't want to scan.
+
+ ```console
+ Get-AzSubscription | Export-Csv .\mysubscriptions.csv -NoTypeInformation
+ ```
+> [!NOTE]
+> - To paste the commands into the shell, use `Ctrl-Shift-V` on Windows or `Cmd-v` on MacOS.
+> - The `curl` command will copy the script directly to the home folder associated with your Cloud Shell session.
+
+# Tracking SQL license usage over time
+
+You can track your license utilization over time by periodically running this script. Each new scan will add the results to `sql-license-usage.csv`, which you can use for reporting the license usage over time in Excel or other tools. To run this script on schedule using Azure automation, read [Create a PowerShell runbook tutorial](https://docs.microsoft.com/azure/automation/learn/automation-tutorial-runbook-textual-powershell).
diff --git a/samples/manage/azure-hybrid-benefit/ahb-usage-in-subscription.ps1 b/samples/manage/azure-hybrid-benefit/ahb-usage-in-subscription.ps1
new file mode 100644
index 0000000000..1ddf88650b
--- /dev/null
+++ b/samples/manage/azure-hybrid-benefit/ahb-usage-in-subscription.ps1
@@ -0,0 +1,112 @@
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------------
+#
+# This script calculates the usage of different types of SQL Server licenses by the SQL resources
+# in the specific subscriptions.
+#
+# NOTE:
+# 1. The script requires a .csv file with the list of subscriptions. Use Export-Csv comlet to create the file.
+# 2. SQL Database resources that use the DTU based business model are excluded.
+#
+
+# Set the subscription Id
+$SubcriptionId = read-host -Prompt "Enter Subscription ID"
+Set-AzContext -SubscriptionId $SubcriptionId
+
+# Variables to keep track of SQL VMs and VCPUs count
+$total_std_vcores = 0
+$total_ent_vcores = 0
+
+#Get all SQL databases in the subscription
+$databases = Get-AzSqlServer | Get-AzSqlDatabase
+
+# Get the databases with License Included and add to VCore count
+foreach ($db in $databases){
+ if (($db.SkuName -ne "ElasticPool") -and ($db.LicenseType -eq "LicenseIncluded")) {
+ if ($db.Edition -eq "BusinessCritical") {
+ $total_ent_vcores += $db.Capacity
+ } elseif ($db.Edition -eq "GeneralPurpose") {
+ $total_std_vcores += $db.Capacity
+ }
+ }
+}
+
+#Get all SQL elastic pools in the subscription
+$pools = Get-AzSqlServer | Get-AzSqlElasticPool
+
+# Get the elastic pools with License Included and and add to VCore count
+foreach ($pool in $pools){
+ if ($pool.LicenseType -eq "LicenseIncluded") {
+ if ($pool.Edition -eq "BusinessCritical") {
+ $total_ent_vcores += $pool.Capacity
+ } elseif ($pool.Edition -eq "GeneralPurpose") {
+ $total_std_vcores += $pool.Capacity
+ }
+ }
+}
+
+#Get all SQL managed instances in the subscription
+$instances = Get-AzSqlInstance
+
+# Get the SQL managed instances with License Included and add to VCore count
+foreach ($ins in $instances){
+ if (($ins.InstancePoolName -eq $null) -and ($ins.LicenseType -eq "LicenseIncluded")) {
+ if ($ins.Sku.Tier -eq "BusinessCritical") {
+ $total_ent_vcores += $ins.VCores
+ } elseif ($ins.Sku.Tier -eq "GeneralPurpose") {
+ $total_std_vcores += $ins.VCores
+ }
+ }
+}
+
+#Get all instance pools in the subscription
+$ipools = Get-AzSqlInstancePool
+
+# Get the instance pools with License Included and add to VCore count
+foreach ($ip in $ipools){
+ if ($ip.LicenseType -eq "LicenseIncluded") {
+ if ($ip.Edition -eq "BusinessCritical") {
+ $total_ent_vcores += $ip.VCores
+ } elseif ($ip.Edition -eq "GeneralPurpose") {
+ $total_std_vcores += $ip.VCores
+ }
+ }
+}
+
+#Get All Sql VMs with AHB license configured
+$sql_vms= Get-AzSqlVM | where {$_.LicenseType.Contains("AHUB")}
+
+# Get the VM size, match it with the corresponding VCPU count and add to VCore count
+foreach ($sql_vm in $sql_vms){
+ $vm = Get-AzVm -Name $sql_vm.Name -ResourceGroupName $sql_vm.ResourceGroupName
+ $vm_size = $vm.HardwareProfile.VmSize
+ # Select first size and get the VCPus available
+ $size_info = Get-AzComputeResourceSku | where {$_.ResourceType.Contains('virtualMachines') -and $_.Name -like $vm_size} | Select-Object -First 1
+ # Save the VCPU count
+ $vcpu= $size_info.Capabilities | Where-Object {$_.name -eq "vCPUsAvailable"}
+
+ if ($vcpu){
+ $data = [pscustomobject]@{vm_resource_uri=$vm.Id;sku=$sql_vm.Sku;size=$vm_size;vcpus=$vcpu.value}
+ $array += $data
+
+ if ($data.sku -like "Enterprise"){
+ $total_ent_vcores += $data.vcpus
+ }elseif ($data.sku -like "Standard"){
+ $total_std_vcores += $data.vcpus
+ }
+ }
+}
+
+Write-Host "Total number of VCores for SQL Enterprise: " $total_ent_vcores
+Write-Host "Total number of VCores for SQL Standard: " $total_std_vcores
\ No newline at end of file
diff --git a/samples/manage/azure-hybrid-benefit/sql-license-usage.ps1 b/samples/manage/azure-hybrid-benefit/sql-license-usage.ps1
new file mode 100644
index 0000000000..24452f640b
--- /dev/null
+++ b/samples/manage/azure-hybrid-benefit/sql-license-usage.ps1
@@ -0,0 +1,263 @@
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------------
+#
+# Sample script to calculate the consolidated SQL Server license usage by all of the SQL resources in a specific subscription or the entire the account.
+#
+# This script accepts a .csv file or a subscription ID as a parameter. The file must include a list of subscriptions to be scanned for the license usage. You can create
+# such a file by the following command and then edit to remove the subscriptions you don't want to scan:
+# > Get-AzSubscription | Export-Csv .\mysubscriptions.csv -NoTypeInformation
+#
+# If no parameter is provided, the script will prompt for a file or subscriptiobn ID. If no value is provided, the scipt will scan all the subscriptions you account
+# has access to.
+#
+#
+# NOTE: The script does not calculate usage for Azure SQL resources that use the DTU-based purchasing model
+#
+
+# Subscriptions to scan
+
+if ($args[0] -like "*.csv") {
+ $subscriptions = Import-Csv $args[0]
+}elseif($args[0] -ne $null){
+ $subscriptions = [PSCustomObject]@{SubscriptionId = $args[0]} | Get-AzSubscription
+}else{
+ $subscriptions = Get-AzSubscription
+}
+
+
+#Initialize tables and arrays
+
+[System.Collections.ArrayList]$usage = @()
+if ($includeEC -eq $null){
+ $usage += ,(@("Date", "Time", "Subscription Name", "Subscription ID", "AHB Std vCores", "AHB Ent vCores", "PAYG Std vCores", "PAYG Ent vCores", "HADR Std vCores", "HADR Ent vCores", "Developer vCores", "Express vCores"))
+}else{
+ $usage += ,(@("Date", "Time", "Subscription Name", "Subscription ID", "AHB ECs", "PAYG ECs", "AHB Std vCores", "AHB Ent vCores", "PAYG Std vCores", "PAYG Ent vCores", "HADR Std vCores", "HADR Ent vCores", "Developer vCores", "Express vCores"))
+}
+
+$subtotal = [pscustomobject]@{ahb_std=0; ahb_ent=0; payg_std=0; payg_ent=0; hadr_std=0; hadr_ent=0; developer=0; express=0}
+$total = [pscustomobject]@{}
+$subtotal.psobject.properties.name | %{$total | Add-Member -MemberType NoteProperty -Name $_ -Value 0}
+
+#Save the VM SKU table for future use
+
+$VM_SKUs = Get-AzComputeResourceSku
+
+Write-Host ([Environment]::NewLine + "-- Scanning subscriptions --")
+
+# Calculate usage for each subscription
+
+foreach ($sub in $subscriptions){
+
+ if ($sub.State -ne "Enabled") {continue}
+
+ try {
+ Set-AzContext -SubscriptionId $sub.Id
+ }catch {
+ write-host "Invalid subscription: " $sub.Id
+ {continue}
+ }
+
+ # Reset the subtotals
+ $subtotal.psobject.properties.name | %{$subtotal.$_ = 0}
+
+ #Get all logical servers
+ $servers = Get-AzSqlServer
+
+ #Get all SQL database resources in the subscription
+ $databases = $servers | Get-AzSqlDatabase
+
+ # Process the vCore-based databases
+ foreach ($db in $databases ){
+ if ($db.SkuName -eq "ElasticPool") {continue}
+
+ if ($db.LicenseType -eq "LicenseIncluded") {
+ if ($db.Edition -eq "BusinessCritical") {
+ $subtotal.ahb_ent += $db.Capacity
+ } elseif ($db.Edition -eq "GeneralPurpose") {
+ $subtotal.ahb_std += $db.Capacity
+ }
+ }else{
+ if ($db.Edition -eq "BusinessCritical") {
+ $subtotal.payg_ent += $db.Capacity
+ } elseif ($db.Edition -eq "GeneralPurpose") {
+ $subtotal.payg_std += $db.Capacity
+ }
+ }
+ }
+
+ #Get all SQL elastic pool resources in the subscription
+ $pools = $servers | Get-AzSqlElasticPool
+
+ # Process the vCore-based elastic pools
+ foreach ($pool in $pools){
+ if ($pool.LicenseType -eq "LicenseIncluded") {
+ if ($pool.Edition -eq "BusinessCritical") {
+ $subtotal.ahb_ent += $pool.Capacity
+ } elseif ($pool.Edition -eq "GeneralPurpose") {
+ $subtotal.ahb_std += $pool.Capacity
+ }
+ }else{
+ if ($pool.Edition -eq "BusinessCritical") {
+ $subtotal.payg_ent += $pool.Capacity
+ } elseif ($pool.Edition -eq "GeneralPurpose") {
+ $subtotal.payg_std += $pool.Capacity
+ }
+ }
+ }
+
+ #Get all SQL managed instance resources in the subscription
+ $instances = Get-AzSqlInstance
+
+ # Process the SQL managed instances with License Included and add to VCore count
+ foreach ($ins in $instances){
+ if ($ins.InstancePoolName -eq $null){
+ if ($ins.LicenseType -eq "LicenseIncluded") {
+ if ($ins.Sku.Tier -eq "BusinessCritical") {
+ $subtotal.ahb_ent += $ins.VCores
+ } elseif ($ins.Sku.Tier -eq "GeneralPurpose") {
+ $subtotal.ahb_std += $ins.VCores
+ }
+ }else{
+ if ($ins.Edition -eq "BusinessCritical") {
+ $subtotal.payg_ent += $pool.Capacity
+ } elseif ($ins.Edition -eq "GeneralPurpose") {
+ $subtotal.payg_std += $ins.Capacity
+ }
+ }
+ }
+ }
+
+ #Get all instance pool resources in the subscription
+ $ipools = Get-AzSqlInstancePool
+
+ # Process the instance pools
+ foreach ($ip in $ipools){
+ if ($ip.LicenseType -eq "LicenseIncluded") {
+ if ($ip.Edition -eq "BusinessCritical") {
+ $subtotal.ahb_ent += $ip.VCores
+ } elseif ($ip.Edition -eq "GeneralPurpose") {
+ $subtotal.ahb_std += $ip.VCores
+ }
+ }else{
+ if ($ip.Edition -eq "BusinessCritical") {
+ $subtotal.payg_ent += $ip.Capacity
+ } elseif ($ip.Edition -eq "GeneralPurpose") {
+ $subtotal.payg_std += $ip.Capacity
+ }
+ }
+ }
+
+
+ #Get all SSIS imtegration runtime resources in the subscription
+ $ssis_irs = Get-AzResourceGroup | Get-AzDataFactoryV2 | Get-AzDataFactoryV2IntegrationRuntime
+
+ # Get the VM size, match it with the corresponding VCPU count and add to VCore count
+ foreach ($ssis_ir in $ssis_irs){
+ # Select first size and get the VCPus available
+ $size_info = $VM_SKUs | where { $_.Name -like $ssis_ir.NodeSize} | Select-Object -First 1
+
+ # Save the VCPU count
+ $vcpu= $size_info.Capabilities | Where-Object {$_.name -eq "vCPUsAvailable"}
+
+ if ($ssis_ir.State -eq "Started"){
+ if ($ssis_ir.LicenseType -like "LicenseIncluded"){
+ if ($ssis_ir.Edition -like "Enterprise"){
+ $subtotal.ahb_ent += $vcpu.value
+ }elseif ($ssis_ir.Edition -like "Standard"){
+ $subtotal.ahb_std += $vcpu.value
+ }
+ }elseif ($data.license -like "BasePrice"){
+ if ($ssis_ir.Edition -like "Enterprise"){
+ $subtotal.payg_ent += $vcpu.value
+ }elseif ($ssis_ir.Edition -like "Standard"){
+ $subtotal.payg_std += $vcpu.value
+ }elseif ($ssis_ir.Edition -like "Developer"){
+ $subtotal.developer += $vcpu.value
+ }elseif ($ssis_ir.Edition -like "Express"){
+ $subtotal.express += $vcpu.value
+ }
+ }
+ }
+ }
+
+
+ #Get All SQL VMs resources in the subscription
+ $sql_vms = Get-AzSqlVM
+
+ # Get the VM size, match it with the corresponding VCPU count and add to VCore count
+ foreach ($sql_vm in $sql_vms){
+ $vm = Get-AzVm -Name $sql_vm.Name -ResourceGroupName $sql_vm.ResourceGroupName
+ $vm_size = $vm.HardwareProfile.VmSize
+ # Select first size and get the VCPus available
+ $size_info = $VM_SKUs | where {$_.ResourceType.Contains('virtualMachines') -and $_.Name -like $vm_size} | Select-Object -First 1
+ # Save the VCPU count
+ $vcpu= $size_info.Capabilities | Where-Object {$_.name -eq "vCPUsAvailable"}
+
+ if ($vcpu){
+ $data = [pscustomobject]@{vm_resource_uri=$vm.Id;sku=$sql_vm.Sku;license=$sql_vm.LicenseType;size=$vm_size;vcpus=$vcpu.value}
+
+ if ($data.license -like "DR"){
+ if ($data.sku -like "Enterprise"){
+ $subtotal.hadr_ent += $data.vcpus
+ }elseif ($data.sku -like "Standard"){
+ $subtotal.hadr_std += $data.vcpus
+ }
+ }elseif ($data.license -like "AHUB"){
+ if ($data.sku -like "Enterprise"){
+ $subtotal.ahb_ent += $data.vcpus
+ }elseif ($data.sku -like "Standard"){
+ $subtotal.ahb_std += $data.vcpus
+ }
+ }elseif ($data.license -like "PAYG"){
+ if ($data.sku -like "Enterprise"){
+ $subtotal.payg_ent += $data.vcpus
+ }elseif ($data.sku -like "Standard"){
+ $subtotal.payg_std += $data.vcpus
+ }elseif ($data.sku -like "Developer"){
+ $subtotal.developer += $data.vcpus
+ }elseif ($data.sku -like "Express"){
+ $subtotal.express += $data.vcpus
+ }
+ }
+ }
+ }
+
+ # Increment the totals and add subtotals to the usage array
+
+ $subtotal.psobject.properties.name | %{$total.$_ += $subtotal.$_}
+
+ if ($includeEC -eq $null){
+ $usage += ,(@((Get-Date -Format d), (Get-Date -Format t), $sub.Name, $sub.Id, $subtotal.ahb_std, $subtotal.ahb_ent, $subtotal.payg_std, $subtotal.payg_ent, $subtotal.hadr_std, $subtotal.hadr_ent, $subtotal.developer, $subtotal.express))
+ }else{
+ $usage += ,(@((Get-Date -Format d), (Get-Date -Format t), $sub.Name, $sub.Id, ($subtotal.ahb_std + $subtotal.ahb_ent*4), ($subtotal.payg_std + $subtotal.payg_ent*4), $subtotal.ahb_std, $subtotal.ahb_ent, $subtotal.payg_std, $subtotal.payg_ent, $subtotal.hadr_std, $subtotal.hadr_ent, $subtotal.developer, $subtotal.express))
+ }
+}
+
+# Add the total numbers to the usage array
+
+if ($includeEC -eq $null){
+ $usage += ,(@((Get-Date -Format d), (Get-Date -Format t), "Total", $null, $total.ahb_std, $total.ahb_ent, $total.payg_std, $total.payg_ent, $total.hadr_std, $total.hadr_ent, $total.developer, $total.express))
+}else{
+ $usage += ,(@((Get-Date -Format d), (Get-Date -Format t), "Total", $null, ($total.ahb_std + $total.ahb_ent*4), ($total.payg_std + $total.payg_ent*4), $total.ahb_std, $total.ahb_ent, $total.payg_std, $total.payg_ent, $total.hadr_std, $total.hadr_ent, $total.developer, $total.express))
+}
+
+# Append to '.\sql-license-usage.csv'
+
+$table = ConvertFrom-Csv ($usage | %{ $_ -join ','} )
+$table | Format-table
+#$fileName = '.\sql-license-usage_' + (Get-Date -f yyyy-MM-dd_HH-mm-ss) + '.csv'
+$fileName = '.\sql-license-usage.csv'
+$table | Export-Csv $fileName -NoTypeInformation -Append
+
+Write-Host ([Environment]::NewLine + "-- The usage data is saved to " + $fileName + "--")
diff --git a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1
index 252e9c9b71..c0b481832b 100644
--- a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1
+++ b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1
@@ -2,6 +2,7 @@ $parameters = $args[0]
$scriptUrlBase = $args[1]
$subscriptionId = $parameters['subscriptionId']
+$environmentName = $parameters['environmentName']
$resourceGroupName = $parameters['resourceGroupName']
$virtualMachineName = $parameters['virtualMachineName']
$virtualNetworkName = $parameters['virtualNetworkName']
@@ -9,6 +10,11 @@ $managementSubnetName = $parameters['subnetName']
$administratorLogin = $parameters['administratorLogin']
$administratorLoginPassword = $parameters['administratorLoginPassword']
+if ($environmentName -eq '' -or ($null -eq $environmentName)) {
+ $environmentName = 'AzureCloud'
+ Write-Host "Environment: AzureCloud." -ForegroundColor Green
+}
+
if ($virtualMachineName -eq '' -or ($null -eq $virtualMachineName)) {
$virtualMachineName = 'Jumpbox'
Write-Host "VM Name: 'Jumpbox'." -ForegroundColor Green
@@ -59,11 +65,14 @@ function EnsureAzModule {
}
}
-function EnsureLogin () {
+function EnsureLogin {
+ param (
+ $environmentName
+ )
$context = Get-AzContext
If ($null -eq $context.Subscription) {
Write-Host "Sign-in..."
- If ($null -eq (Connect-AzAccount -ErrorAction SilentlyContinue -ErrorVariable Errors)) {
+ If ($null -eq (Connect-AzAccount -Environment $environmentName -ErrorAction SilentlyContinue -ErrorVariable Errors)) {
Write-Host ("Sign-in failed: {0}" -f $Errors[0].Exception.Message) -ForegroundColor Red
Break
}
@@ -180,7 +189,7 @@ function CalculateVpnClientAddressPoolPrefix {
VerifyPSVersion
EnsureAzModule
-EnsureLogin
+EnsureLogin -environmentName $environmentName
SelectSubscriptionId -subscriptionId $subscriptionId
$virtualNetwork = LoadVirtualNetwork -resourceGroupName $resourceGroupName -virtualNetworkName $virtualNetworkName
diff --git a/samples/manage/azure-sql-db-managed-instance/attach-vpn-gateway/attachVPNGateway.ps1 b/samples/manage/azure-sql-db-managed-instance/attach-vpn-gateway/attachVPNGateway.ps1
index 84ddb7d4ca..e6d77704bc 100644
--- a/samples/manage/azure-sql-db-managed-instance/attach-vpn-gateway/attachVPNGateway.ps1
+++ b/samples/manage/azure-sql-db-managed-instance/attach-vpn-gateway/attachVPNGateway.ps1
@@ -2,11 +2,17 @@ $parameters = $args[0]
$scriptUrlBase = $args[1]
$subscriptionId = $parameters['subscriptionId']
+$environmentName = $parameters['environmentName']
$resourceGroupName = $parameters['resourceGroupName']
$virtualNetworkName = $parameters['virtualNetworkName']
$certificateNamePrefix = $parameters['certificateNamePrefix']
$clientCertificatePassword = $parameters['clientCertificatePassword'] #used only when certificates are created using openssl
+if ($environmentName -eq '' -or ($null -eq $environmentName)) {
+ $environmentName = 'AzureCloud'
+ Write-Host "Environment: AzureCloud." -ForegroundColor Green
+}
+
if ($clientCertificatePassword -eq '' -or ($null -eq $clientCertificatePassword)) {
$clientCertificatePassword = 'S0m3Str0nGP@ssw0rd'
}
@@ -52,11 +58,14 @@ function EnsureAzModule {
}
}
-function EnsureLogin () {
+function EnsureLogin {
+ param (
+ $environmentName
+ )
$context = Get-AzContext
If ($null -eq $context.Subscription) {
Write-Host "Sign-in..."
- If ($null -eq (Connect-AzAccount -ErrorAction SilentlyContinue -ErrorVariable Errors)) {
+ If ($null -eq (Connect-AzAccount -Environment $environmentName -ErrorAction SilentlyContinue -ErrorVariable Errors)) {
Write-Host ("Sign-in failed: {0}" -f $Errors[0].Exception.Message) -ForegroundColor Red
Break
}
@@ -220,9 +229,8 @@ function CreateCertificate() {
VerifyPSVersion
EnsureAzModule
-EnsureLogin
+EnsureLogin -environmentName $environmentName
SelectSubscriptionId -subscriptionId $subscriptionId
-
$virtualNetwork = LoadVirtualNetwork -resourceGroupName $resourceGroupName -virtualNetworkName $virtualNetworkName
$subnets = $virtualNetwork.Subnets.Name
@@ -265,4 +273,4 @@ $templateParameters = @{
New-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateUri ($scriptUrlBase + '/azuredeploy.json?t=' + [DateTime]::Now.Ticks) -TemplateParameterObject $templateParameters
-Write-Host "Deployment completed."
\ No newline at end of file
+Write-Host "Deployment completed."
diff --git a/samples/manage/sql-assessment-api/DefaultRuleset.csv b/samples/manage/sql-assessment-api/DefaultRuleset.csv
index c593badc6f..d4de2f06a6 100644
--- a/samples/manage/sql-assessment-api/DefaultRuleset.csv
+++ b/samples/manage/sql-assessment-api/DefaultRuleset.csv
@@ -1,202 +1,182 @@
-id,level,displayName,message,tags,description,helpLink,probes,target.type,target.platform,target.engineEdition,target.version,target.name.not,level,threshold,RetryCountPct
-AutoCreateStats,Warning,Auto-Create Statistics should be on,Turn Auto-Create Statistics option on to improve query performance.,"['DefaultRuleset', 'Performance', 'Statistics', 'QueryOptimizer']","The Query Optimizer determines whether an index is useful for a specific query by evaluating the stored statistics. If the statistics become out of date and significant changes have occurred against the underlying data, this can result in less than optimal query performance. In most cases, it's best to let SQL Server maintain the statistics. If you turn 'Auto Create Stats' and 'Auto Update Stats' off, then it is up to you to keep the statistics up-to-date somehow. Failure to do so will lead to poor query performance. Most applications should have these options ON. When the Auto Create statistics setting is ON, the Query Optimizer creates statistics on one or more columns of a table or an indexed view, as necessary, to improve query plans and query performance.",https://docs.microsoft.com/sql/relational-databases/statistics/statistics#CreateStatistics,['DatabaseConfiguration'],Database,"['Windows', 'Linux']","OnPremises, ManagedInstance","[11.0,)",,Warning,,
-AutoUpdateStats,Warning,Auto-Update Statistics should be on,Turn Auto-Update Statistics option on to improve query performance.,"['DefaultRuleset', 'Performance', 'Statistics', 'QueryOptimizer']","The Query Optimizer determines whether an index is useful for a specific query by evaluating the stored statistics. If the statistics become out of date and significant changes have occurred against the underlying data, this can result in less than optimal query performance. In most cases, it's best to let SQL Server maintain the statistics. If you turn 'Auto Create Stats' and 'Auto Update Stats' off, then it is up to you to keep the statistics up-to-date somehow. Failure to do so will lead to poor query performance. Most applications should have these options ON. When the Auto Update Statistics setting is ON, the Query Optimizer updates statistics when they are used by a query and when they might be out-of-date. Statistics become out-of-date after insert, update, delete, or merge operations change the data distribution in the table or indexed view. The Query Optimizer determines when statistics might be out-of-date by counting the number of data modifications since the last statistics update and comparing the number of modifications to a threshold. The threshold is based on the number of rows in the table or indexed view. The Query Optimizer checks for out-of-date statistics before compiling a query and before executing a cached query plan. Before compiling a query, the Query Optimizer uses the columns, tables, and indexed views in the query predicate to determine which statistics might be out-of-date. Before executing a cached query plan, the Database Engine verifies that the query plan references up-to-date statistics. The AUTO_UPDATE_STATISTICS option applies to statistics created for indexes, single-columns in query predicates, and statistics that are created by using the CREATE STATISTICS statement. This option also applies to filtered statistics.",https://docs.microsoft.com/sql/relational-databases/statistics/statistics#UpdateStatistics,['DatabaseConfiguration'],Database,"['Windows', 'Linux']","OnPremises, ManagedInstance","[11.0,)",,Warning,,
-QueryStoreOn,Warning,Query Store should be active,Make sure Query Store actual operation mode is 'Read Write' to keep your performance analysis accurate,"['DefaultRuleset', 'Performance', 'QueryStore', 'Statistics']","The Query Store feature provides you with insight on query plan choice and performance. It simplifies performance troubleshooting by helping you quickly find performance differences caused by query plan changes. Query Store automatically captures a history of queries, plans, and runtime statistics, and retains these for your review. It separates data by time windows so you can see database usage patterns and understand when query plan changes happened on the server. While Query Store collects queries, execution plans and statistics, its size in the database grows until this limit is reached. When that happens, Query Store automatically changes the operation mode to read-only and stops collecting new data, which means that your performance analysis is no longer accurate.",https://docs.microsoft.com/sql/relational-databases/performance/monitoring-performance-by-using-the-query-store,['DatabaseConfiguration'],Database,"['Windows', 'Linux']","OnPremises, ManagedInstance","[13.0,)","['master', 'tempdb', 'model']",Warning,,
-TF174,Information,TF 174 increases the plan cache bucket count,Consider enabling trace flag 174 to increase the plan cache bucket count.,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance']","Trace Flag 174 increases the SQL Server plan cache bucket count from 40,009 to 160,001 on 64-bit systems.
- When the SQL Server plan cache reaches its entry limit, plans that have low cost must be evicted in order to insert new plans. This can cause severe contention on the SOS_CACHESTORE spinlock and a high CPU usage occurs in SQL Server.
- On 64-bit systems, the number of buckets for the SQL Server plan cache is 40,009. Therefore, the maximum number of entries that can fit inside the SQL Server plan cache is 160,036. Enabling trace flag 174 on high performance systems increases the size of the cache and can avoid SOS_CACHESTORE spinlock contention.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']",OnPremises,"['[11.0.3368,12.0)', '[12.0.2480,13.0)', '[13.0,)']",,Information,,
-TF634,Information,TF 634 disables background columnstore compression,Trace Flag 634 disables the background columnstore compression task. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance', 'ColumnStore']","Trace Flag 634 disables the background columnstore compression task.
- SQL Server periodically runs the Tuple Mover background task that compresses columnstore index rowgroups with uncompressed data, one such rowgroup at a time.
- Columnstore compression improves query performance but also consumes system resources.
- You can control the timing of columnstore compression manually, by disabling the background compression task with trace flag 634, and then explicitly invoking ALTER INDEX...REORGANIZE or ALTER INDEX...REBUILD at the time of your choice.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']",OnPremises,"[11.0,)",,Information,,
-TF652,Information,TF 652 disables page pre-fetching scans,Trace Flag 652 disables Page Pre-fetching Scans. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Memory', 'Pages']","Trace Flag 652 disables page pre-fetching for scans.
- The read-ahead process reads the full extent of a referenced database page into the buffer pool, before those contiguous database pages are consumed by scans.
- Enabling the trace flag can lead to performance issues on queries that leverage pre-fetching.",http://support.microsoft.com/kb/920093,['EnabledGlobalTraceFlags'],Server,Windows,OnPremises,"[11.0,)",,Information,,
-TF661,Information,TF 661 disables Ghost Cleanup Task,Trace flag 661 disables the background ghost cleanup task. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace Flag 661 disables the ghost record removal process. A ghost record is the result of a delete operation.
- When you delete a record, the deleted record is kept as a ghost record. Later, the deleted record is purged by the ghost record removal process. When you disable this process, the deleted record is not purged.
- Therefore, the space that the deleted record consumes is not freed. This behavior affects space consumption and the performance of scan operations.
- If you turn off this trace Flag, the ghost record removal process works correctly.",https://support.microsoft.com/help/920093,['EnabledGlobalTraceFlags'],Server,Windows,OnPremises,"[11.0,)",,Information,,
-TF834,Information,TF 834 enables large-page allocations,Enable trace flag 834 to use large-page allocations to improve analytical and data warehousing workloads.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Memory', 'ColumnStore']","Trace Flag 834 causes the server to use large-page memory (LPM) model for the buffer pool allocations. Consider enabling TF 834 if you have a server that has a lot of memory, particularly for an analytical or data warehousing workload. Trace flag 834 is NOT recommended on SQL Server instances that use columnstore indexes.",https://support.microsoft.com/help/4465518,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']",OnPremises,"[11.0,)",,Information,,
-TF845,Warning,TF 845 is not needed in SQL Server 2012 and higher versions,Disable trace flag 845 in SQL Server 2012 and higher versions.,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance']","Trace Flag 845 supports locking pages in memory in SQL Server Standard edition, which is needed together with trace flag 834 to use the large-page memory (LPM) model for the buffer pool allocations.
- Consider enabling TF 834 if you have a server that has a lot of memory, particularly for an analytical or data warehousing workload.
- Starting with SQL Server 2012 this behavior is enabled by default for Standard edition, and trace flag 845 must not be used.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,['EnabledGlobalTraceFlags'],Server,Windows,OnPremises,"[11.0,)",,Warning,,
-TF902,Warning,TF 902: Database Upgrade Bypass should be disabled,Disable trace flag 902 which bypasses database upgrade.,"['DefaultRuleset', 'TraceFlag', 'UpdateIssues']","Trace Flag 902 bypasses execution of database upgrade script when installing a Cumulative Update or Service Pack.
- This trace flag is not supported to run it continuously in a production environment.
- If you encounter an error during script upgrade mode, it is recommended to contact Microsoft SQL Customer Service and Support (CSS) for further guidance.",https://support.microsoft.com/help/2163980,['EnabledGlobalTraceFlags'],Server,Windows,OnPremises,"[11.0,)",,Warning,,
-TF1117,Information,TF 1117 Enables Filegroup-level Autogrow,Consider enabling trace flag 1117 to enable filegroup autogrow.,"['DefaultRuleset', 'TraceFlag', 'DBFileConfiguration', 'Performance']","Trace Flag 1117 initiates the growth of every file in the filegroup, when a file in the filegroup meets the autogrow threshold, and together with trace flag 1118, can help reduce allocation contention in the SQL Server TempDB database.
- This trace flag affects all databases and is recommended only if every database is safe to be grow all files in a filegroup by the same amount.",https://support.microsoft.com/help/2154845,['EnabledGlobalTraceFlags'],Server,Windows,OnPremises,"[11.0,)",,Information,,
-TF1118,Information,TF 1118 Disables Single Page Allocations,Consider enabling trace flag 1118 to force page allocations on uniform extents.,"['DefaultRuleset', 'TraceFlag', 'Memory', 'Performance', 'Pages']","Trace Flag 1118 forces page allocations on uniform extents instead of mixed extents, and together with trace flag 1117, can help reduce allocation contention in the SQL Server TempDB database.
- When a new object is created, by default, the first eight pages are allocated from different extents (mixed extents).
- Afterwards, when more pages are needed, those are allocated from that same extent (uniform extent).
- The SGAM page is used to track these mixed extents, so can quickly become a bottleneck when numerous mixed page allocations are occurring.
- This trace flag allocates all eight pages from the same extent when creating new objects, minimizing the need to scan the SGAM page and forces uniform extent allocations instead of mixed page allocations.",https://support.microsoft.com/help/328551,['EnabledGlobalTraceFlags'],Server,Windows,OnPremises,"[11.0,)",,Information,,
-TF1204,Information,TF 1204 returns deadlock information,Trace Flag 1204 returns deadlock information.,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1204 returns the resources and types of locks that are participating in a deadlock, including the affected command.
- The resulting information is recorded in the SQL Server Errorlog.",https://support.microsoft.com/help/832524,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']",OnPremises,"[11.0,)",,Information,,
-TF1211,Warning,TF 1211: Lock Escalation should be enabled,Disable trace flag 1211 to allow lock escalation.,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1211 disables lock escalation based on memory pressure, or based on number of locks. Because SQL Server will not escalate row or page locks to table locks, this can generate an excessive number of locks. If the lock memory grows large enough, attempts to allocate additional locks for any query may fail and cause performance issues.
- This trace flag should not be used in order to avoid inability to allocate lock resources because of insufficient memory. If lock escalation needs to be disabled, use trace flag 1224 instead.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']",OnPremises,"[11.0,)",,Warning,,
-TF1222,Information,TF 1222 returns deadlock information,Trace Flag 1222 returns deadlock information.,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1222 returns the resources and types of locks that are participating in a deadlock, including the affected command.
- The resulting information is recorded in the SQL Server Errorlog, in XML format that does not comply with any XSD schema.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']",OnPremises,"[11.0,)",,Information,,
-TF1224,Warning,TF 1224 should be disabled,Disable trace flag 1224 to allow lock escalation.,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1224 disables lock escalation based on the number of locks, unless SQL Server is under memory pressure. Because SQL Server will not escalate row or page locks to table locks, this can generate an excessive number of locks.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']",OnPremises,"[11.0,)",,Warning,,
-TF1229,Warning,TF 1229: Lock Partitioning should be enabled,Disable trace flag 1229 to allow lock partitioning.,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance', 'CPU']","Trace Flag 1229 disables lock partitioning regardless of the number of CPUs. By default, SQL Server enables lock partitioning when a server has 16 or more CPUs, to improve the scalability characteristics of larger systems.
- Disabling lock partitioning may cause can cause spinlock contention and poor performance, or unexpected behaviors when switching partitions.",https://docs.microsoft.com/sql/relational-databases/sql-server-transaction-locking-and-row-versioning-guide,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']",OnPremises,"[11.0,)",,Warning,,
-TF1236,Warning,TF 1236: Database Lock Partitioning should be enabled,Enable trace Flag 1236 to allow database lock partitioning.,"['DefaultRuleset', 'TraceFlag', 'Locks', 'Performance']","Trace Flag 1236 enables database-level lock partitioning.
- Lock Partitioning is utilized to improve the scalability characteristics on larger systems.",https://support.microsoft.com/help/2926217,['EnabledGlobalTraceFlags'],Server,Windows,OnPremises,"[11.0,)",,Warning,,
-TF1462,Warning,TF 1462 should be disabled to allow Log Stream Compression,Disable trace flag 1462 to allow log stream compression.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'AvailabilityGroups']","Trace Flag 1462 disables log stream compression for asynchronous availability groups.
- This feature is enabled by default on asynchronous replicas to optimize network bandwidth.",https://docs.microsoft.com/sql/database-engine/availability-groups/windows/tune-compression-for-availability-group,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']",OnPremises,"[11.0,)",,Warning,,
-TF2312,Warning,TF 2312 sets the default Cardinality Estimation model,Trace Flag 2312 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace Flag 2312 sets the Query Optimizer cardinality estimation model to the default version of the database compability level of SQL Server 2014 and higher versions. If the database compatibility level is lower than 120, enabling trace flag 2312 uses the cardinality estimation model of SQL Server 2014 (120).",https://support.microsoft.com/help/2801413,['EnabledGlobalTraceFlags'],Server,Windows,OnPremises,"[11.0,)",,Warning,,
-TF2330,Warning,TF 2330 disables recording of index usage stats,Trace Flag 2330 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Indexes']","Trace Flag 2330 disables recording of index usage stats, which could lead to a non-yielding condition in SQL 2005.",https://blogs.msdn.microsoft.com/ialonso/2012/10/08/faq-around-sys-dm_db_index_usage_stats,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']",OnPremises,"[11.0,)",,Warning,,
-TF2340,Information,TF 2340 disables Batch Sorts for optimized nested loops joins,Trace Flag 2340 disables Batch Sorts for optimized nested loops joins.,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace Flag 2340 causes SQL Server not to use a sort operation (batch sort) for optimized nested loops joins when generating a plan.
- Verify need to set a non-default trace flag with the current system build and configuration.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']",OnPremises,"[11.0,)",,Information,,
-TF2371,Information,TF 2371 enables a linear recompilation threshold for statistics,Enable trace Flag 2371 to allow a linear recompilation threshold for statistics.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Statistics']","Trace Flag 2371 causes SQL Server to change the fixed update statistics threshold to a linear update statistics threshold.
- This is especially useful to keep statistics updated on large tables.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,['EnabledGlobalTraceFlags'],Server,Windows,OnPremises,"[11.0,)",,Information,,
-TF2389,Information,TF 2389 enables automatic statistics for Ascending Keys,Trace Flag 2389 enables automatic statistics for ascending keys. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Statistics', 'Performance']","Trace Flag 2389 enables automatically generated quick statistics for ascending keys (histogram amendment).
- This trace flag is recommended to be set in cases where queries access newly inserted ascending key values (such as an IDENTITY column), but the new values are not yet updated in the statistics histogram for the affected columns. In this case the histogram used to estimate cardinality will be adjusted at query compile time.
- Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/2801413,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']","OnPremises, ManagedInstance","[11.0,)",,Information,,
-TF2390,Information,TF 2390 enables automatic statistics for Ascending or Unknown Keys,Trace Flag 2390 enables automatic statistics for ascending or unknown keys. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Statistics', 'Performance', 'Indexes']","Trace Flag 2390 enables automatically generated quick statistics for ascending or unknown keys (histogram amendment).
- This trace flag is recommended to be set in cases where queries access newly inserted ascending key values (such as an IDENTITY column), but the new values are not yet updated in the statistics histogram for the affected columns. In this case the histogram used to estimate cardinality will be adjusted at query compile time.
- Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/2801413,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']","OnPremises, ManagedInstance","[11.0,)",,Information,,
-TF2528,Warning,TF 2528 disables parallel operations for integrity checking,Trace Flag 2528 disables parallel operations for integrity checking.,"['DefaultRuleset', 'TraceFlag', 'DataIntegrity', 'DBCC']","Trace Flag 2528 disables parallel checking of objects by DBCC CHECKDB, DBCC CHECKFILEGROUP, and DBCC CHECKTABLE.
- By default, the degree of parallelism is automatically determined by the query processor. The maximum degree of parallelism is configured just like that of parallel queries.
- When parallel checks are disabled, the DBCC commands will take longer to complete.
- Starting with SQL Server 2014 SP2, a MAXDOP option is available to override the max degree of parallelism configuration option of sp_configure for the DBCC statements.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']",OnPremises,"[11.0,)",,Warning,,
-TF2549,Warning,TF 2549 optimizes PHYSICAL_ONLY option of DBCC CHECKDB,Trace Flag 2549 forces DBCC CHECKDB to treat different physical files as one logical file.,"['DefaultRuleset', 'TraceFlag', 'DBCC']","Trace Flag 2549 forces the DBCC CHECKDB command to assume each database file is on a unique disk drive but treating different physical files as one logical file.
- This trace flag can improve the performance when using the PHYSICAL_ONLY option, but it's not recommended unless it is known that each file is based on a unique physical disk.",https://support.microsoft.com/help/2634571,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']",OnPremises,"[11.0,)",,Warning,,
-TF2562,Warning,TF 2562 forces the DBCC CHECKDB command to execute in a single batch,Trace Flag 2562 forces the DBCC CHECKDB command to execute in a single batch.,"['DefaultRuleset', 'TraceFlag', 'DBCC', 'TempDB']","Trace Flag 2562 forces the DBCC CHECKDB command to execute in a single batch regardless of the number of indexes in the database.
- This trace flag can improve the performance when using the PHYSICAL_ONLY option, but space requirements for TempDB may increase.",https://support.microsoft.com/help/2634571,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']",OnPremises,"[11.0,)",,Warning,,
-TF2566,Warning,TF 2566 disables default data purity check,Trace Flag 2566 disables default data purity check.,"['DefaultRuleset', 'TraceFlag', 'DBCC', 'DataIntegrity']","Trace Flag 2566 forces the DBCC CHECKDB command to execute without data purity check unless the DATA_PURITY option is specified.
- For databases upgraded from earlier versions of SQL Server, it is recommended to run the DBCC CHECKDB WITH DATA_PURITY command at least once, to enable column-value integrity checks to happen by default.",https://support.microsoft.com/help/945770,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']",OnPremises,"[11.0,)",,Warning,,
-TF3023,Information,TF 3023 enables Backup Checksum option by default,Trace Flag 3023 enables CHECKSUM option as default for BACKUP command.,"['DefaultRuleset', 'TraceFlag', 'Backup']","Trace Flag 3023 enables the CHECKSUM option of the BACKUP command by default.
- This trace flag forces the CHECKSUM option for BACKUP command even when not explicitely set.
- Starting with SQL Server 2014, this behavior is controlled by setting the Backup Checksum Default configuration option.",https://support.microsoft.com/help/2656988,['EnabledGlobalTraceFlags'],Server,Windows,OnPremises,"[11.0,)",,Information,,
-TF3042,Information,TF 3042 bypasses the default backup compression pre-allocation algorithm,Trace Flag 3042 enables the bypass of the default backup compression.,"['DefaultRuleset', 'TraceFlag', 'Backup']","Trace Flag 3042 bypasses the default backup compression pre-allocation algorithm to allow the backup file to grow only as needed to reach its final size.
- This trace flag can achieve space savings by allocating only the actual size required for the compressed backup, but might increase the overall backup operation time.",https://docs.microsoft.com/sql/relational-databases/backup-restore/backup-compression-sql-server,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']",OnPremises,"[11.0,)",,Information,,
-TF3226,Information,TF 3226 disables ErrorLog entries for every successful backup operation,Trace Flag 3226 disables ErrorLog entries for every successful backup operation.,"['DefaultRuleset', 'TraceFlag', 'Backup']","Trace Flag 3226 prevents SQL Server from recording an entry to the Errorlog on every successful backup operation.
- Backup operations are registered in the Errorlog by default. Frequent backup operations can contribute to massive Errorlog files that become unwieldy.",https://docs.microsoft.com/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']",OnPremises,"[11.0,)",,Information,,
-TF4136,Warning,TF 4136 disables Parameter Sniffing,Trace Flag 4136 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag']","Trace Flag 4136 disables parameter sniffing unless OPTION(RECOMPILE), WITH RECOMPILE or OPTIMIZE FOR value is used, but does not apply to this SQL Server version. Starting with SQL Server 2016, to accomplish this at the database level use the PARAMETER_SNIFFING option in ALTER DATABASE SCOPED CONFIGURATION. Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/980653,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']",OnPremises,"[11.0,)",,Warning,,
-TF4137,Warning,TF 4137 causes plans to use partial correlation for filters,Trace flag 4137 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace Flag 4137 causes SQL Server to generate a plan using minimum selectivity when estimating AND predicates for filters to account for partial correlation instead of independence, under the query optimizer cardinality estimation model of SQL Server 2012 and earlier versions (CE 70). However it does not apply to this SQL Server version.
- Does not apply to CE version 120 or above. Use trace flag 9471 instead.
- Starting with SQL Server 2016 SP1, to accomplish this at the query level use the USE HINT 'ASSUME_MIN_SELECTIVITY_FOR_FILTER_ESTIMATES' query hint.
- Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/2658214,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']",OnPremises,"[11.0,)",,Warning,,
-TF4138,Warning,TF 4138 causes plans to not use Row Goal adjustments,Trace flag 4138 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer', 'Performance']","Trace Flag 4138 causes SQL Server to generate a plan that does not use row goal adjustments with queries that contain TOP, OPTION (FAST N), IN, or EXISTS keywords.
- Starting with SQL Server 2016 SP1, to accomplish this at the query level use the USE HINT 'DISABLE_OPTIMIZER_ROWGOAL' query hint. However it does not apply to this SQL Server version.
- Verify need to set a Non-default trace flag with current system build and configuration.",https://support.microsoft.com/help/2667211,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']",OnPremises,"[11.0,)",,Warning,,
-TF4139,Warning,TF 4139 enables automatic statistics for any key ordering,Trace flag 4139 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Statistics']","Trace Flag 4139 enables automatically generated quick statistics (histogram amendment) regardless of key column status.
- However, this trace flag does not apply to this SQL Server version.
- Verify need to set a non-default trace flag with the current system build and configuration.",https://support.microsoft.com/help/2952101,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']",OnPremises,"[11.0,)",,Warning,,
-TF4199,Information,TF 4199 enables Query Optimizer fixes,Trace Flag 4199 enables Query Optimizer fixes. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'QueryOptimizer']",Trace Flag 4199 enables Query Optimizer fixes released in SQL Server Cumulative Updates and Service Packs.,http://support.microsoft.com/help/974006,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']",OnPremises,"[11.0, 14.0)",,Information,,
-TF6498,Warning,TF 6498 enables additional concurrent large queries,Trace Flag 6498 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'Memory']","Trace Flag 6498 enables more than one large query compilation to gain access to the big gateway when there is sufficient memory available.
- However, this trace flag does not apply to this SQL Server version.
- This trace flag can be used to keep memory usage for the compilation of incoming queries under control, avoiding compilation waits for concurrent large queries.
- Starting with SQL Server 2014 SP2 and SQL Server 2016, this behavior is controlled by the engine and trace flag 1236 has no effect.",https://support.microsoft.com/help/3024815,['EnabledGlobalTraceFlags'],Server,Windows,OnPremises,"[11.0,)",,Warning,,
-TF6532,Information,TF 6532 enables performance improvements for Spatial data,Enable trace flag 6532 to enable performance improvements for Spatial data.,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace Flag 6532 enables performance improvements of query operations with spatial data types.
- The performance gain will vary, depending on the configuration, the types of queries, and the objects.",https://support.microsoft.com/help/3107399,['EnabledGlobalTraceFlags'],Server,Windows,OnPremises,"['[11.0.6020,11.0.6518)']",,Information,,
-TF6532.6533,Warning,TF 6532 and TF 6533 enable performance improvements for Spatial data,Trace flags 6532 and 6533 do not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace flags 6532 and 6533 enable performance improvements of query operations with spatial data types.
- However, this trace flag does not apply to this SQL Server version.
- Starting with SQL Server 2016, this behavior is controlled by the engine and trace flags 6532 and 6533 have no effect.",https://support.microsoft.com/help/3107399,['EnabledGlobalTraceFlags'],Server,Windows,OnPremises,"[11.0,)",,Warning,,
-TF6534,Warning,TF 6534 enables performance improvements for Spatial data,Trace flag 6534 does not apply to this SQL Server version. Verify need to set a non-default trace flag with the current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance']","Trace Flag 6534 enables performance improvement of query operations with spatial data types.
- However, this trace flag does not apply to this SQL Server version.
- Verify need to set a Non-default trace flag with current system build and configuration.",https://support.microsoft.com/help/3107399,['EnabledGlobalTraceFlags'],Server,Windows,OnPremises,"[11.0,)",,Warning,,
-TF7412,Information,TF 7412 enables the lightweight profiling infrastructure for live query performance troubleshooting,Enable trace flag 7412 to enables the lightweight profiling infrastructure for live query performance troubleshooting.,"['DefaultRuleset', 'TraceFlag', 'Performance']",Trace Flag 7412 enables the lightweight profiling infrastructure for live query performance troubleshooting. Consider enabling TF 7412 to have the ability to access runtime information on query execution plans for any session.,https://docs.microsoft.com/sql/relational-databases/performance/query-profiling-infrastructure,['EnabledGlobalTraceFlags'],Server,"['Windows', 'Linux']",OnPremises,"[13.0.4001,15.0)",,Information,,
-TF9024,Warning,TF 9024 converts a global log pool memory object into NUMA node partitioned memory object,Verify need to set a Non-default TF with current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'NUMA', 'Memory', 'CPU']",TF9024 converts a global log pool memory object into NUMA node partitioned memory object.,https://support.microsoft.com/help/2809338/fix-high-log-write-waits-counter-value-on-a-sql-server-2012-or-sql-ser,['EnabledGlobalTraceFlags'],Server,Windows,OnPremises,,,Warning,,
-TF8048,Warning,TF 8048 converts NUMA partitioned memory objects into CPU partitioned,Verify need to set a Non-default TF with current system build and configuration.,"['DefaultRuleset', 'TraceFlag', 'Performance', 'NUMA', 'CPU', 'Memory']",TF 8048 converts NUMA partitioned memory objects into CPU partitioned.,https://support.microsoft.com/help/2809338/fix-high-log-write-waits-counter-value-on-a-sql-server-2012-or-sql-ser,['EnabledGlobalTraceFlags'],Server,Windows,OnPremises,,,Warning,,
-DeprecatedFeatures,Warning,Deprecated or discontinued features should not be used,Detected deprecated or discontinued feature uses: @{DeprecatedFeature}. We recommend to replace them with features actual for SQL Server version @{ProductVersion}.,"['DefaultRuleset', 'Deprecated', 'Security', 'UpdateIssues', 'Performance']",This check detects deprecated or discontinued features used on target SQL Server instance. Deprecated features may be removed in a future release of SQL Server. Discontinued features have been removed from specific versions of SQL Server.,https://docs.microsoft.com/sql/relational-databases/performance-monitor/sql-server-deprecated-features-object,"['DeprecatedFeaturesStats', 'SQLServerVersion']",Server,"['Windows', 'Linux']","OnPremises, ManagedInstance","[11.0,)","['master', 'tempdb', 'model', 'msdb']",Warning,,
-SystemHealthSession,Warning,system_health XEvent session is not active,Start the session by using the ALTER EVENT SESSION statement or by using the Extended Events node in Object Explorer.,"['DefaultRuleset', 'XEvent', 'SystemHealth']","This session starts automatically when the SQL Server Database Engine starts, and runs without any noticeable performance effects. The session collects system data that you can use to help troubleshoot performance issues in the Database Engine.
- We recommend that you do not stop, alter, or delete the system health session.",https://docs.microsoft.com/sql/relational-databases/extended-events/use-the-system-health-session,['XEvent.SystemHealth'],Server,"['Windows', 'Linux']","OnPremises, ManagedInstance","[11.0,)",,Warning,,
-SPServerDiagnosticsSession,Warning,sp_server_diagnostics xEvent session is not active,Start the session by using the ALTER EVENT SESSION statement or by using the Extended Events node in Object Explorer.,"['DefaultRuleset', 'XEvent', 'SystemHealth']","This session starts automatically when the SQL Server Database Engine starts, and runs without any noticeable performance effects. The session collects system data that you can use to help troubleshoot performance issues in the Database Engine.
- We recommend that you do not stop, alter, or delete the system health session.",https://docs.microsoft.com/sql/relational-databases/system-stored-procedures/sp-server-diagnostics-transact-sql,['XEvent.SPServerDiagnostics'],Server,"['Windows', 'Linux']",OnPremises,"[11.0,)",,Warning,,
-BlackboxTrace,Warning,Blackbox trace is configured and running,Make sure you still need the blackbox trace and stop it otherwise.,"['DefaultRuleset', 'Traces']","This trace is designed to behave similarly to an airplane black box, to help you diagnose intermittent server crashes. It consumes more resources than the default trace and should not be running for extended periods of time.",https://docs.microsoft.com/sql/relational-databases/system-stored-procedures/sp-trace-create-transact-sql,['CountBlackBoxTraces'],Server,"['Windows', 'Linux']",OnPremises,"[11.0,)",,Warning,,
-DefaultTrace,Warning,No default trace was found or is not active,Make sure that there is enough space for SQL Server to write the default trace file. Then have the default trace run by disabling and re-enabling it.,"['DefaultRuleset', 'Traces']",Default trace provides troubleshooting assistance to database administrators by ensuring that they have the log data necessary to diagnose problems the first time they occur.,https://docs.microsoft.com/sql/relational-databases/policy-based-management/default-trace-log-files-disabled,['CountDefaultTraces'],Server,"['Windows', 'Linux']","OnPremises, ManagedInstance","[11.0,)",,Warning,,
-HintsStatistics,Information,Hints are being used,"We recommend that , , and be used only as a last resort by experienced developers and database administrators, because the SQL Server Query Optimizer typically selects the best execution plan for a query.","['DefaultRuleset', 'QueryOptimizer', 'Performance', 'Statistics']","Hints are options or strategies specified for enforcement by the SQL Server query processor on SELECT, INSERT, UPDATE, or DELETE statements. The hints override any execution plan the Query Optimizer might select for a query. Because the SQL Server Query Optimizer typically selects the best execution plan for a query, we recommend that , , and be used only as a last resort by experienced developers and database administrators.",https://docs.microsoft.com/sql/t-sql/queries/hints-transact-sql,['Hints.InstanceStatistics'],Server,"['Windows', 'Linux']","OnPremises, ManagedInstance","[11.0,)",,Information,,
-HintsUsageInModules,Information,Hints usage in modules,@{Hint} was used in @{type_desc} @{Schema_Name}.@{Object_Name}.,"['DefaultRuleset', 'QueryOptimizer', 'Performance', 'Statistics']","Hints are options or strategies specified for enforcement by the SQL Server query processor on SELECT, INSERT, UPDATE, or DELETE statements. The hints override any execution plan the Query Optimizer might select for a query. Because the SQL Server Query Optimizer typically selects the best execution plan for a query, we recommend that , , and