Skip to content

Commit 1412322

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/master' into jodebrui
2 parents 6f66636 + 55076e6 commit 1412322

File tree

11 files changed

+125
-11
lines changed

11 files changed

+125
-11
lines changed

samples/applications/iot-smart-grid/App.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
55
</startup>
66
<connectionStrings>
7-
<!--<add name="Db" connectionString="Server=tcp:peskount-hktest1.database.windows.net,1433;Database=PowerConsumption;User ID=demovm001@peskount-hktest1;Password=LetAzureIn0_;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"/>-->
7+
<!--<add name="Db" connectionString="Server=tcp:<server>.database.windows.net,1433;Database=PowerConsumption;User ID=<user>;Password=<password>;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"/>-->
88
<add name="Db" connectionString="Server=.;Database=PowerConsumption;Integrated Security=True"/>
99
</connectionStrings>
1010
<appSettings>

samples/databases/wide-world-importers/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The sample includes the databases that can be explored, as well as sample applic
88

99
**Latest release**: [wide-world-importers-release](http://go.microsoft.com/fwlink/?LinkID=800630)
1010

11-
**Documentation**: [root.md](http://go.microsoft.com/fwlink/?LinkID=800631)
11+
**Documentation**: [Wide World Importers Documentation](http://go.microsoft.com/fwlink/?LinkID=800631)
1212

1313
**Feedback on the sample**: send to [[email protected]](mailto:[email protected])
1414

@@ -43,7 +43,7 @@ To run this sample, you need the following prerequisites.
4343

4444
<!-- Examples -->
4545
1. SQL Server 2016 (or higher) or an Azure SQL Database.
46-
2. SQL Server Management Studio, preferably 2016 April Preview or later (version >= 13.0.14000.36).
46+
2. SQL Server Management Studio, preferably June 2016 release or later (version >= 13.0.15000.23).
4747
3. (to build sample apps) Visual Studio 2015.
4848
4. (to run ETL jobs) SQL Server 2016 Integration Services
4949

samples/databases/wide-world-importers/wwi-database-scripts/9-wwi-restore.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
USE [master]
44
ALTER DATABASE [WideWorldImporters] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
55
RESTORE DATABASE [WideWorldImporters]
6-
FROM DISK = N'C:\YourPath\WideWorldImporters_AtShipDate.bak'
6+
FROM DISK = N'C:\YourPath\WideWorldImporters.bak'
77
WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 5
88
ALTER DATABASE [WideWorldImporters] SET MULTI_USER
99
GO

samples/databases/wide-world-importers/wwi-database-scripts/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Note that each time the databases are reconstructed from empty, they will contai
5959
5. Execute the script **5-wwi-load-seed-data.sql**. This script populates the seed data required for the database. It will typically take a few minutes to execute.
6060

6161
6. Execute the script **6-wwi-data-simulation.sql**. This script runs data simulation to populate the transaction tables. It can take 20-30 minutes to execute.
62-
<br/><br/>The statements in this script remove the temporal nature of the tables, and implements a series of triggers. They then emulate typical activities that would occur during each day. Finally, they remove the triggers and re-establishes the temporal tables. You can see the progress of the simulation in the Messages tab in SSMS as the query executes. (IsSilentMode = 1 produces just date output if AreDatesPrinted = 1. When 0, it produces much more detailed output about each task being undertaken).
62+
<br/><br/>The statements in this script remove the temporal nature of the tables, and implements a series of triggers. They then emulate typical activities that would occur during each day. Finally, they remove the triggers and re-establishes the temporal tables. You can see the progress of the simulation in the Messages tab in SSMS as the query executes. (AreDatesPrinted controls whether dates are printed to the messages window as data is generated. IsSilentMode controls whether detailed output is printed. IsSilentMode = 1 produces just date output if AreDatesPrinted = 1.).
6363
Note that a different outcome is produced each time it is run as it uses many random values.
6464
StartDate and EndDate cover the period for generation. Other code populates the 2012 period when expanding the columnstore tables so do not populate back into 2012 or earlier with this procedure. The EndDate must also be at or before the current date as temporal tables do not allow future dates.
6565
You can configure the amount of data produced by modifying the number of orders per day. The default is 60 orders and produces a reasonable OLTP database size of around 93MB compressed. You are also able to configure how busy Saturday and Sunday are compared to normal Monday to Friday working days, as a percentage. The suggested values are 50% for Saturday and 0% for Sunday.

samples/databases/wide-world-importers/wwi-dw-database-scripts/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ To run this sample, you need the following prerequisites.
3535

3636
<!-- Examples -->
3737
1. SQL Server 2016 (or higher) or an Azure SQL Database.
38-
2. SQL Server Management Studio, preferably 2016 April Preview or later (version >= 13.0.14000.36)
38+
2. SQL Server Management Studio, preferably June 2016 release or later (version >= 13.0.15000.23)
3939

4040

4141
<a name=run-this-sample></a>
-6.22 MB
Binary file not shown.

samples/manage/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
Contains samples for managing Microsoft's SQL databases including SQL Server, Azure SQL Database, and Azure SQL Data Warehouse.
44

5-
Samples are coming soon!
6-
7-
85
## Collect and monitor resource usage data across multiple pools in a subscription
9-
This Solution Quick Start provides a solution for collecting and monitoring Azure SQL Database resource usage accross 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.
6+
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.
107

118
[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.
129

1310
## Get started using Elastic Pools in a SaaS scenario
14-
1511
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.
1612

1713
[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.
14+
15+
## Windows Containers
16+
This includes samples for setting up mssql-server in Windows Containers. Currently it includes the following:
17+
- __[windows-containers] (windows-containers/)__
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# mssql server 2014 express image listening on static port 1433
2+
#
3+
# Note: This dockerfile is based on Buc Rogers' work here:
4+
# https://github.com/brogersyh/Dockerfiles-for-windows/tree/master/sqlexpress
5+
#
6+
# .NET 3.5 required for SQL Server
7+
FROM microsoft/dotnet35
8+
9+
# maintainer for image metadata
10+
MAINTAINER Perry Skountrianos
11+
12+
# set environment variables
13+
ENV sql_express_download_url "https://download.microsoft.com/download/1/5/6/156992E6-F7C7-4E55-833D-249BD2348138/ENU/x64/SQLEXPR_x64_ENU.exe"
14+
ENV sa_password _
15+
16+
# make install files accessible
17+
COPY . /
18+
WORKDIR /
19+
20+
# download and install Microsoft SQL 2014 Express Edition in one step
21+
RUN powershell -Command (New-Object System.Net.WebClient).DownloadFile('%sql_express_download_url%', 'sqlexpress.exe') && /sqlexpress.exe /qs /x:setup && /setup/setup.exe /q /ACTION=Install /INSTANCENAME=SQLEXPRESS /FEATURES=SQLEngine /UPDATEENABLED=0 /SQLSVCACCOUNT="NT AUTHORITY\System" /SQLSYSADMINACCOUNTS="BUILTIN\ADMINISTRATORS" /TCPENABLED=1 /NPENABLED=0 /IACCEPTSQLSERVERLICENSETERMS && del /F /Q sqlexpress.exe && rd /q /s setup
22+
23+
RUN powershell -Command \
24+
set-strictmode -version latest ; \
25+
stop-service MSSQL`$%sqlinstance% ; \
26+
set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql12.SQLEXPRESS\mssqlserver\supersocketnetlib\tcp\ipall' -name tcpdynamicports -value '' ; \
27+
set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql12.SQLEXPRESS\mssqlserver\supersocketnetlib\tcp\ipall' -name tcpport -value 1433 ; \
28+
set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql12.SQLEXPRESS\mssqlserver\' -name LoginMode -value 2 ;
29+
30+
CMD powershell ./start %sa_password%
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# mssql-server-2014-express-windows
2+
This Dockerfile helps developers to get started using SQL Server 2014 Express in Windows Server Core Containers. The file downloads and installs SQL Server 2014 Express with the default setup parameters.
3+
4+
Note: This dockerfile is based on Buc Rogers' work that can be found [here] (https://github.com/brogersyh/Dockerfiles-for-windows/tree/master/sqlexpress)
5+
6+
### Contents
7+
8+
[About this sample](#about-this-sample)<br/>
9+
[Before you begin](#before-you-begin)<br/>
10+
[Run this sample](#run-this-sample)<br/>
11+
[Sample details](#sample-details)<br/>
12+
[Disclaimers](#disclaimers)<br/>
13+
[Related links](#related-links)<br/>
14+
15+
<a name=about-this-sample></a>
16+
17+
## About this sample
18+
19+
1. **Applies to:** SQL Server 2014 Express, Windows Server Technical Preview 4 or later
20+
5. **Authors:** Perry Skountrianos [perrysk-msft]
21+
22+
<a name=before-you-begin></a>
23+
24+
## Before you begin
25+
26+
To run this sample, you need the following prerequisites.
27+
28+
**Software prerequisites:**
29+
30+
You can run the container with the following command. Note the you'll need Windows Server Core TP5 v10.0.14300.1000.
31+
docker run -p 1433:1433 --env sa_password=<YOUR SA PASSWORD> microsoft/mssql-server-2014-express-windows
32+
33+
<a name=run-this-sample></a>
34+
35+
## Run this sample
36+
37+
The image provides one environment variable to set the sa password: </br>
38+
- sa_password: Sets the sa password and enables the sa login
39+
40+
<a name=sample-details></a>
41+
42+
## Sample details
43+
44+
The Dockerfile downloads and installs SQL Server 2014 Express with the following default setup parameters that could be changed (if needed) after the image is installed.
45+
- Collation: SQL_Latin1_General_CP1_CI_AS
46+
- SQL Instance Name: SQLEXPRESS
47+
- Root Directory: C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL
48+
- Language: English (United Stated)
49+
50+
<a name=disclaimers></a>
51+
52+
## Disclaimers
53+
The code included in this sample is not intended to be a set of best practices on how to build scalable enterprise grade applications. This is beyond the scope of this quick start sample.
54+
55+
<a name=related-links></a>
56+
57+
## Related Links
58+
<!-- Links to more articles. Remember to delete "en-us" from the link path. -->
59+
60+
For more information, see these articles:
61+
- [Windows Containers] (https://msdn.microsoft.com/en-us/virtualization/windowscontainers/about/about_overview)
62+
- [Windows-based containers: Modern app development with enterprise-grade control] (https://www.youtube.com/watch?v=Ryx3o0rD5lY&feature=youtu.be)
63+
- [Windows Containers: What, Why and How] (https://channel9.msdn.com/Events/Build/2015/2-704)
64+
- [SQL Server in Windows Containers] (https://blogs.msdn.microsoft.com/sqlserverstorageengine/2016/03/21/sql-server-in-windows-containers/#comments)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# The script sets the sa password and start the SQl Service
2+
3+
param(
4+
[Parameter(Mandatory=$false)]
5+
[string]$sa_password
6+
)
7+
8+
# start the service
9+
start-service MSSQL`$SQLEXPRESS
10+
11+
12+
if($sa_password -ne "_"){
13+
$sqlcmd = "ALTER LOGIN sa with password=" +"'" + $sa_password + "'" + ";ALTER LOGIN sa ENABLE;"
14+
Invoke-Sqlcmd -Query $sqlcmd -ServerInstance ".\SQLEXPRESS"
15+
}
16+
17+
while ($true) { Start-Sleep -Seconds 3600 }

0 commit comments

Comments
 (0)