Files
sql-server-samples/samples/databases
Jovan Popovic 828dd93d1e Adding Application.Logs WWI sample
Added a table required to demo LOB support in CLUSTERE COLUMNSOTRE INDEXes.
Scenario is application logging. Applicaiton pushes log events that have large descriptions into the LOB column in CCI table. Table is compliant wiht Serilog logger for .Net and can be direclty used as a target for MSSQL Serilog sink:

In applicaition should be added the following changes to integrate serilog:
1. Download Serilog and Serilog.MSSQL.sink NuGet packages
2. Add the following packages:
using Serilog;
using Serilog.Sinks.MSSqlServer;

3. Configure logger:
var columnOptions = new Serilog.Sinks.MSSqlServer.ColumnOptions();
// Don't include the Properties XML column.
columnOptions.Store.Remove(StandardColumn.Properties);
columnOptions.Store.Remove(StandardColumn.MessageTemplate);
columnOptions.Store.Remove(StandardColumn.Exception);
// Do include the log event data as JSON.
columnOptions.Store.Add(StandardColumn.LogEvent);

var logger = new LoggerConfiguration()
                .WriteTo
                .MSSqlServer(   ConnString, "Logs", schemaName: "Application",
                                autoCreateSqlTable: false,
                                columnOptions: columnOptions
                                )
                .CreateLogger());

4. Log events:
var position = new { Latitude = 25, Longitude = 134 };
var elapsedMs = 34;

log.Information("Processed {@Position} in {Elapsed:000} ms.", position, elapsedMs);
log.Error(new IndexOutOfRangeException("Test"), "Error while processing {@Position} in {Elapsed:000} ms.", position, elapsedMs);
2018-09-07 16:10:10 +02:00
..
2017-11-07 12:22:25 -07:00
2017-10-19 14:30:30 -07:00

Sample databases

Contains samples databases for Microsoft's SQL databases include SQL Server, Azure SQL Database, and Azure SQL Data Warehouse.

wide-world-importers

The new sample database for SQL Server 2016 and Azure SQL Database. It illustrates the core capabilities of SQL Server 2016 and Azure SQL Database, for transaction processing (OLTP), data warehousing and analytics (OLAP) workloads, as well as hybrid transaction and analytics processing (HTAP) workloads.

contoso-data-warehouse

Sample data warehouse that illustrates loading data into Azure SQL Data Warehouse.

AdventureWorks

Sample databases and Analysis Services models for use with SQL Server.