Skip to content

Commit 4b4b1ab

Browse files
committed
{Initial Commit} Adding Windows Containers Sample folder
1 parent 53f134e commit 4b4b1ab

File tree

4 files changed

+105
-5
lines changed

4 files changed

+105
-5
lines changed

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 SQL_SERVER_SA_PASSWORD "Password1"
15+
16+
# set working directory
17+
WORKDIR /
18+
19+
# download and install Microsoft SQL 2014 Express Edition in one step
20+
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 /SECURITYMODE=SQL /SAPWD=%SQL_SERVER_SA_PASSWORD% /SQLSVCACCOUNT="NT AUTHORITY\System" /SQLSYSADMINACCOUNTS="BUILTIN\ADMINISTRATORS" /TCPENABLED=1 /NPENABLED=0 /IACCEPTSQLSERVERLICENSETERMS && del /F /Q sqlexpress.exe && rd /q /s setup
21+
22+
RUN powershell -Command \
23+
set-strictmode -version latest ; \
24+
stop-service MSSQL`$SQLEXPRESS ; \
25+
set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql12.SQLEXPRESS\mssqlserver\supersocketnetlib\tcp\ipall' -name tcpdynamicports -value '' ; \
26+
set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql12.SQLEXPRESS\mssqlserver\supersocketnetlib\tcp\ipall' -name tcpport -value 1433 ; \
27+
start-service MSSQL`$SQLEXPRESS
28+
29+
CMD powershell -Command while ($true) { Start-Sleep -Seconds 3600 }
30+
EXPOSE 1433
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# IoT Smart Grid
2+
The goal of this Dockerfile is to help developers get started using SQL Server 2014 Express in Windows Containers. The Dockerfile downloads and installs SQL Server 2014 Express with the default setup parameters that could be changed (if needed) after the image is installed.
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+
1. System running Windows Server Technical Preview 4 or later.
31+
2. 10GB available storage for container host image, OS Base Image and setup scripts.
32+
3. Administrator permissions on the system.
33+
34+
<a name=run-this-sample></a>
35+
36+
## Run this sample
37+
Use the Dockerfile and execute the following two commands to build and run sqlexpress:
38+
1. docker build -t sqlexpress .
39+
2. docker run -it -p 1433:1433 sqlexpress cmd
40+
41+
<a name=sample-details></a>
42+
43+
## Sample details
44+
45+
**High Level Description**
46+
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.
47+
- sa password: Password1
48+
- Collation: SQL_Latin1_General_CP1_CI_AS
49+
- SQL Instance Name: SQLEXPRESS
50+
- Root Directory: C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL
51+
- Language: English (United Stated)
52+
53+
<a name=disclaimers></a>
54+
55+
## Disclaimers
56+
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.
57+
58+
<a name=related-links></a>
59+
60+
## Related Links
61+
<!-- Links to more articles. Remember to delete "en-us" from the link path. -->
62+
63+
For more information, see these articles:
64+
- [Windows Containers] (https://msdn.microsoft.com/en-us/virtualization/windowscontainers/about/about_overview)
65+
- [Windows-based containers: Modern app development with enterprise-grade control] (https://www.youtube.com/watch?v=Ryx3o0rD5lY&feature=youtu.be)
66+
- [Windows Containers: What, Why and How] (https://channel9.msdn.com/Events/Build/2015/2-704)
67+
- [SQL Server in Windows Containers] (https://blogs.msdn.microsoft.com/sqlserverstorageengine/2016/03/21/sql-server-in-windows-containers/#comments)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Windows Containers
2+
This includes samples for setting up mssql-server in Windows Containers. Currently it includes the following:
3+
- __[mssql-server-2014-express-windows] (mssql-server-2014-express-windows /)__

0 commit comments

Comments
 (0)