mirror of
https://github.com/Microsoft/sql-server-samples.git
synced 2025-12-08 14:58:54 +00:00
Merge remote-tracking branch 'refs/remotes/Microsoft/master'
This commit is contained in:
@@ -45,3 +45,6 @@ samples/databases/wide-world-importers/workload-drivers/vehicle-location-insert/
|
||||
samples/features/in-memory/ticket-reservations/DemoWorkload/bin/Debug/DemoWorkload.vshost.exe.config
|
||||
samples/features/in-memory/ticket-reservations/DemoWorkload/obj/Release/DemoWorkload.Properties.Resources.resources
|
||||
samples/databases/wide-world-importers/wwi-integration-etl/Daily ETL/obj/Development/Project.params
|
||||
samples/features/in-memory/ticket-reservations/DemoWorkload/obj/Debug/DemoWorkload.csproj.FileListAbsolute.txt
|
||||
samples/features/in-memory/iot-smart-grid/Db/obj/Release/Model.xml
|
||||
samples/applications/iot-smart-grid/DataGenerator/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
# ASP.NET Session State with SQL Server 2016
|
||||
We are excited to offer two new SQL Server scripts (with and without retry-logic) to be used with the ASP.NET Session State provider!
|
||||
|
||||
The scripts take advantage of memory optimized tables and natively compiled stored procedures to create the necessary database objects that the ASP.NET session state provider requires when SQL Server is used as a storage option for session data. These scripts are based on work from early adopters that modified their SQL Server objects to take advantage of In-Memory OLTP for ASP.NET session state, with great success. To learn more, read the bwin.party case study [Gaming site can scale to 250,000 requests per second and improve player experience](https://www.microsoft.com/danmark/cases/Microsoft-SQL-Server-2014/bwin.party/Gaming-Site-Can-Scale-to-250-000-Requests-Per-Second-and-Improve-Player-Experience/710000003117).
|
||||
|
||||
**This is the recommended way to implement ASP.NET session state with SQL Server 2016**.
|
||||
|
||||
|
||||
### Contents
|
||||
|
||||
[About this sample](#about-this-sample)<br/>
|
||||
[Before you begin](#before-you-begin)<br/>
|
||||
[Install scripts](#install-scripts)<br/>
|
||||
[Disclaimers](#disclaimers)<br/>
|
||||
[Related links](#related-links)<br/>
|
||||
|
||||
<a name=about-this-sample></a>
|
||||
|
||||
## About this sample
|
||||
|
||||
1. **Applies to:** SQL Server 2016 (or higher) Enterprise / Developer / Evaluation Edition, Azure SQL Database (Premium)
|
||||
2. **Key features:**
|
||||
- ASP.NET Session State Provider
|
||||
- Memory Optimized Tables
|
||||
- Natively Compiled Stored Procedures
|
||||
4. **Programming Language:** T-SQL
|
||||
5. **Authors:** Perry Skountrianos [perrysk-msft]
|
||||
|
||||
<a name=before-you-begin></a>
|
||||
|
||||
## Before you begin
|
||||
|
||||
**Software prerequisites:**
|
||||
|
||||
1. SQL Server 2016 (or higher) Enterprise / Developer / Evaluation Edition or Azure SQL Database (Premium)
|
||||
2. .NET Framework 2.0 or higher
|
||||
|
||||
<a name=install-scripts></a>
|
||||
|
||||
## Install Scripts
|
||||
There are two versions of the SQL Server script (with retry logic and without):
|
||||
|
||||
- [aspstate_sql2016 (no retry logic)](https://github.com/Microsoft/sql-server-samples/blob/master/samples/applications/ASP.NET%20Session%20State/aspstate_sql2016_no_retry.sql)
|
||||
- [aspstate_sql2016 (with retry logic)](https://github.com/Microsoft/sql-server-samples/blob/master/samples/applications/ASP.NET%20Session%20State/aspstate_sql2016_with_retry.sql)
|
||||
|
||||
Based on your workload characteristics and the way your application handles session state you have to decide if retry logic is needed or not. [This](https://msdn.microsoft.com/en-us/library/mt668435.aspx) article explains the logic used to detect conflict and implement retry logic in the script. Currently, the two memory-optimized tables: **dbo.ASPStateTempApplications** and **dbo.ASPStateTempSessions** in both of the scripts are created with **DURABILITY = SCHEMA_ONLY** meaning that in a case of a SQL Server restart or a reconfiguration occurs in an Azure SQL Database, the table schema persists, but data in the table is lost. If durability of both schema and data is required tthe script needs to be altered and the two tables above need to be created with: **DURABILITY=SCHEMA\_AND\_DATA**.[This](https://msdn.microsoft.com/en-us/library/dn553122.aspx) article explains the two durability options for memory-optimized tables
|
||||
|
||||
Note: Although both of these scripts have been tested, we always recommend executing your own testing and validation to understand how these scripts behave in your specific environment.
|
||||
|
||||
Follow the steps below to configure SQL Server 2016 In-Memory OLTP to store ASP.NET Session State:
|
||||
|
||||
1. Follow [this](https://support.microsoft.com/en-us/kb/317604) link to configure SQL Server to Store ASP.NET Session State
|
||||
2. Open the script in SQL Server Management Studio ([Download Link](https://support.microsoft.com/en-us/kb/317604))
|
||||
3. Connect to the SQL Server that you want to use.
|
||||
4. Execute (F5)
|
||||
|
||||
The script should execute with no errors and should create the **ASPState** database with the following objects:
|
||||
|
||||
Tables:
|
||||
-
|
||||
- dbo.ASPStateTempApplications
|
||||
- dbo.ASPStateTempSessions
|
||||
|
||||
Stored Procedures
|
||||
-
|
||||
- dbo.TempGetStateItemExclusive3
|
||||
- dbo.TempInsertStateItemShort
|
||||
- dbo.TempUpdateStateItemLong
|
||||
- dbo.TempUpdateStateItemLongNullShort
|
||||
- dbo.TempUpdateStateItemShort
|
||||
- dbo.CreateTempTables
|
||||
- dbo.DeleteExpiredSessions
|
||||
- dbo.GetHashCode
|
||||
- dbo.GetMajorVersion
|
||||
- dbo.TempGetAppID
|
||||
- dbo.TempGetStateItem
|
||||
- dbo.TempGetStateItem2
|
||||
- dbo.TempGetStateItem3
|
||||
- dbo.TempGetStateItemExclusive
|
||||
- dbo.TempGetStateItemExclusive2
|
||||
- dbo.TempGetVersion
|
||||
- dbo.TempInsertStateItemLong
|
||||
- dbo.TempInsertUninitializedItem
|
||||
- dbo.TempReleaseStateItemExclusive
|
||||
- dbo.TempRemoveStateItem
|
||||
- dbo.TempResetTimeout
|
||||
- dbo.TempUpdateStateItemShortNullLong
|
||||
|
||||
<a name=sample-details></a>
|
||||
|
||||
## Disclaimers
|
||||
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.
|
||||
|
||||
<a name=related-links></a>
|
||||
|
||||
## Related Links
|
||||
<!-- Links to more articles. Remember to delete "en-us" from the link path. -->
|
||||
|
||||
For more information, see these articles:
|
||||
|
||||
- [In-Memory OLTP (In-Memory Optimization)](https://msdn.microsoft.com/en-us/library/dn133186.aspx)
|
||||
- [OLTP and database management](https://www.microsoft.com/en-us/server-cloud/solutions/oltp-database-management.aspx)
|
||||
- [Session State Provider](https://msdn.microsoft.com/en-us/library/aa478952.aspx)
|
||||
- [Implementing a Session-State Store Provider](https://msdn.microsoft.com/en-us/library/ms178587.aspx)
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -265,8 +265,8 @@
|
||||
//
|
||||
// FrmMain
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.ClientSize = new System.Drawing.Size(847, 328);
|
||||
this.Controls.Add(this.powerBIReport);
|
||||
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,68 @@
|
||||
# Sample for use of Dynamic Data Masking in WideWorldImporters
|
||||
|
||||
This script demonstrates the use of Dynamic Data Masking to mask sensitive data for certain users.
|
||||
|
||||
|
||||
### Contents
|
||||
|
||||
[About this sample](#about-this-sample)<br/>
|
||||
[Before you begin](#before-you-begin)<br/>
|
||||
[Running the sample](#run-this-sample)<br/>
|
||||
[Sample details](#sample-details)<br/>
|
||||
[Disclaimers](#disclaimers)<br/>
|
||||
[Related links](#related-links)<br/>
|
||||
|
||||
|
||||
<a name=about-this-sample></a>
|
||||
|
||||
## About this sample
|
||||
|
||||
<!-- Delete the ones that don't apply -->
|
||||
1. **Applies to:** SQL Server 2016 (or higher), Azure SQL Database
|
||||
1. **Key features:** Dynamic Data Masking
|
||||
1. **Workload:** OLTP
|
||||
1. **Programming Language:** T-SQL
|
||||
1. **Author:** Rick Davis
|
||||
1. **Update history:** 20 October 2016 - initial revision
|
||||
|
||||
<a name=before-you-begin></a>
|
||||
|
||||
## Before you begin
|
||||
|
||||
To run this sample, you need the following prerequisites.
|
||||
|
||||
**Software prerequisites:**
|
||||
|
||||
<!-- Examples -->
|
||||
1. SQL Server 2016 (or higher) or Azure SQL Database.
|
||||
- With SQL Server, make sure SQL authentication is enabled.
|
||||
2. SQL Server Management Studio
|
||||
3. The WideWorldImporters database.
|
||||
|
||||
<a name=run-this-sample></a>
|
||||
|
||||
## Running the sample
|
||||
|
||||
1. Open the script DemonstrateDDM.sql in Management Studio and connect to the WideWorldImporters database.
|
||||
|
||||
2. Follow the instructions in the script.
|
||||
|
||||
## Sample details
|
||||
|
||||
The WideWorldImporters sample database leverages Dynamic Data Masking to mask sensitive banking data in the table 'Purchasing.Suppliers'.
|
||||
|
||||
When connecting to the database and running a query using a privileged user such as the database owner, you will see the sensitive data in the clear.
|
||||
|
||||
The user 'GreatLakesSales' is an example unprivileged user, and will only see the masked values.
|
||||
|
||||
<a name=disclaimers></a>
|
||||
|
||||
## Disclaimers
|
||||
The code included in this sample is not intended to be used for production purposes.
|
||||
|
||||
<a name=related-links></a>
|
||||
|
||||
## Related Links
|
||||
For more information, see these articles:
|
||||
- [Row-Level Security documentation](https://msdn.microsoft.com/library/dn765131.aspx)
|
||||
- [Row-Level Security SQL Server 2016 (video)](https://channel9.msdn.com/Events/DataDriven/SQLServer2016/Row-Level-Security)
|
||||
+28
-20
@@ -1,28 +1,36 @@
|
||||
USE master
|
||||
GO
|
||||
-- With Azure SQL Database, make sure to connect to a database with name InMemDB
|
||||
-- With SQL Server, make sure SQL Server authentication is enabled, and the sa account is active
|
||||
|
||||
-- create main database files; for large-scale workloads, add additional containers to the DiskBased_fg filegroup
|
||||
CREATE DATABASE DiskBasedDB
|
||||
ON PRIMARY
|
||||
( NAME = DiskBasedDB_root,
|
||||
FILENAME = 'D:\Data\DiskBasedDB_root.mdf',
|
||||
SIZE = 8MB,
|
||||
FILEGROWTH = 10),
|
||||
FILEGROUP DiskBased_fg
|
||||
( NAME = DiskBasedDB_1,
|
||||
FILENAME = 'D:\Data\DiskBasedDB_1'),
|
||||
( NAME = DiskBasedDB_2,
|
||||
FILENAME = 'D:\Data\DiskBasedDB_2')
|
||||
LOG ON
|
||||
( NAME = DiskBasedDB_log,
|
||||
FILENAME = 'E:\Log\DiskBasedDB_LogDiskBasedDB_log.ldf',
|
||||
SIZE = 1000MB,
|
||||
FILEGROWTH = 10)
|
||||
COLLATE Latin1_General_BIN2
|
||||
IF SERVERPROPERTY('EngineEdition') != 5
|
||||
BEGIN
|
||||
DECLARE @sql nvarchar(max) = N'
|
||||
CREATE DATABASE DiskBasedDB
|
||||
ON PRIMARY
|
||||
( NAME = DiskBasedDB_root,
|
||||
FILENAME = ''D:\Data\DiskBasedDB_root.mdf'',
|
||||
SIZE = 8MB,
|
||||
FILEGROWTH = 10),
|
||||
FILEGROUP DiskBased_fg
|
||||
( NAME = DiskBasedDB_1,
|
||||
FILENAME = ''D:\Data\DiskBasedDB_1''),
|
||||
( NAME = DiskBasedDB_2,
|
||||
FILENAME = ''D:\Data\DiskBasedDB_2'')
|
||||
LOG ON
|
||||
( NAME = DiskBasedDB_log,
|
||||
FILENAME = ''E:\Log\DiskBasedDB_LogDiskBasedDB_log.ldf'',
|
||||
SIZE = 1000MB,
|
||||
FILEGROWTH = 10)
|
||||
|
||||
ALTER AUTHORIZATION ON DATABASE::DiskBasedDB TO sa
|
||||
'
|
||||
EXEC sp_executesql @sql
|
||||
END
|
||||
GO
|
||||
|
||||
USE DiskBasedDB
|
||||
GO
|
||||
|
||||
ALTER AUTHORIZATION ON DATABASE::DiskBasedDB TO sa
|
||||
ALTER DATABASE CURRENT COLLATE Latin1_General_BIN2
|
||||
GO
|
||||
|
||||
|
||||
+9
-9
@@ -23,7 +23,7 @@ GO
|
||||
IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'PK_CUSTOMER' )
|
||||
CREATE UNIQUE CLUSTERED INDEX PK_CUSTOMER ON Customer( C_ID )
|
||||
WITH (FILLFACTOR = 100, SORT_IN_TEMPDB=ON, MAXDOP = 8)
|
||||
|
||||
ON DiskBased_fg
|
||||
GO
|
||||
|
||||
CHECKPOINT
|
||||
@@ -33,7 +33,7 @@ GO
|
||||
IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'PK_FULFILLMENT' )
|
||||
CREATE UNIQUE CLUSTERED INDEX PK_FULFILLMENT ON Fulfillment( FM_ID )
|
||||
WITH (FILLFACTOR = 100, SORT_IN_TEMPDB=ON, MAXDOP = 8)
|
||||
|
||||
ON DiskBased_fg
|
||||
GO
|
||||
|
||||
CHECKPOINT
|
||||
@@ -49,7 +49,7 @@ GO
|
||||
IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_ORDERLINES_NC1' )
|
||||
CREATE UNIQUE INDEX IX_ORDERLINES_NC1 ON OrderLines( OL_O_ID, OL_SEQ )
|
||||
WITH (FILLFACTOR = 100, SORT_IN_TEMPDB=ON, MAXDOP = 8)
|
||||
|
||||
ON DiskBased_fg
|
||||
GO
|
||||
|
||||
CHECKPOINT
|
||||
@@ -59,19 +59,19 @@ GO
|
||||
IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'PK_ORDERS' )
|
||||
CREATE UNIQUE CLUSTERED INDEX PK_ORDERS ON Orders( O_ID )
|
||||
WITH (FILLFACTOR = 100, SORT_IN_TEMPDB=ON, MAXDOP = 8)
|
||||
|
||||
ON DiskBased_fg
|
||||
GO
|
||||
|
||||
IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_ORDERS_NC1' )
|
||||
CREATE INDEX IX_ORDERS_NC1 ON Orders( O_C_ID )
|
||||
WITH (FILLFACTOR = 100, SORT_IN_TEMPDB=ON, MAXDOP = 8)
|
||||
|
||||
ON DiskBased_fg
|
||||
GO
|
||||
|
||||
IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_ORDERS_NC2' )
|
||||
CREATE INDEX IX_ORDERS_NC2 ON Orders( O_FM_DTS, O_DTS ASC )
|
||||
WITH (FILLFACTOR = 100, SORT_IN_TEMPDB=ON, MAXDOP = 8)
|
||||
|
||||
ON DiskBased_fg
|
||||
GO
|
||||
|
||||
CHECKPOINT
|
||||
@@ -81,7 +81,7 @@ GO
|
||||
IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'PK_PRODUCTS' )
|
||||
CREATE UNIQUE CLUSTERED INDEX PK_PRODUCTS ON Products( PR_ID )
|
||||
WITH (FILLFACTOR = 100, SORT_IN_TEMPDB=ON, MAXDOP = 8)
|
||||
|
||||
ON DiskBased_fg
|
||||
GO
|
||||
|
||||
CHECKPOINT
|
||||
@@ -90,7 +90,7 @@ GO
|
||||
IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'IX_PRODUCTS_NC1' )
|
||||
CREATE INDEX IX_PRODUCTS_NC1 ON Products( PR_TYPE )
|
||||
WITH (FILLFACTOR = 100, SORT_IN_TEMPDB=ON, MAXDOP = 8)
|
||||
|
||||
ON DiskBased_fg
|
||||
GO
|
||||
|
||||
CHECKPOINT
|
||||
@@ -100,7 +100,7 @@ GO
|
||||
IF NOT EXISTS ( SELECT name FROM sysindexes WHERE name = 'PK_PURCHASE_CRITERIA' )
|
||||
CREATE UNIQUE CLUSTERED INDEX PK_PURCHASE_CRITERIA ON Purchase_Criteria( PC_ID )
|
||||
WITH (FILLFACTOR = 100, SORT_IN_TEMPDB=ON, MAXDOP = 24)
|
||||
|
||||
ON DiskBased_fg
|
||||
GO
|
||||
|
||||
CHECKPOINT
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
-------------------------------------------
|
||||
-- version 0.0.0-1007
|
||||
-- for Azure SQL DB, replace all occurrences of "ON DiskBased_fg" with ""
|
||||
-------------------------------------------
|
||||
|
||||
USE DiskBasedDB
|
||||
|
||||
+27
-19
@@ -1,30 +1,38 @@
|
||||
USE master
|
||||
GO
|
||||
-- With Azure SQL Database, make sure to connect to a database with name InMemDB
|
||||
-- With SQL Server, make sure SQL Server authentication is enabled, and the sa account is active
|
||||
|
||||
-- create main database files; for large-scale workloads, add additional containers in the InMem_fg filegroup
|
||||
CREATE DATABASE InMemDB
|
||||
ON PRIMARY
|
||||
( NAME = InMemDB_root,
|
||||
FILENAME = 'D:\Data\InMem_root.mdf',
|
||||
SIZE = 8MB,
|
||||
FILEGROWTH = 10),
|
||||
FILEGROUP InMem_fg CONTAINS MEMORY_OPTIMIZED_DATA
|
||||
( NAME = InMemDB_1,
|
||||
FILENAME = 'D:\Data\InMem_1')
|
||||
LOG ON
|
||||
( NAME = InMemDB_log,
|
||||
FILENAME = 'E:\Log\InMem_log.ldf',
|
||||
SIZE = 1000MB,
|
||||
FILEGROWTH = 10)
|
||||
COLLATE Latin1_General_BIN2
|
||||
IF SERVERPROPERTY('EngineEdition') != 5
|
||||
BEGIN
|
||||
DECLARE @sql nvarchar(max) = N'
|
||||
CREATE DATABASE InMemDB
|
||||
ON PRIMARY
|
||||
( NAME = InMemDB_root,
|
||||
FILENAME = ''D:\Data\InMem_root.mdf'',
|
||||
SIZE = 8MB,
|
||||
FILEGROWTH = 10),
|
||||
FILEGROUP InMem_fg CONTAINS MEMORY_OPTIMIZED_DATA
|
||||
( NAME = InMemDB_1,
|
||||
FILENAME = ''D:\Data\InMem_1'')
|
||||
LOG ON
|
||||
( NAME = InMemDB_log,
|
||||
FILENAME = ''E:\Log\InMem_log.ldf'',
|
||||
SIZE = 1000MB,
|
||||
FILEGROWTH = 10)
|
||||
ALTER AUTHORIZATION ON DATABASE::InMemDB TO sa
|
||||
'
|
||||
EXEC sp_executesql @sql
|
||||
END
|
||||
GO
|
||||
|
||||
USE InMemDB
|
||||
GO
|
||||
|
||||
ALTER DATABASE CURRENT COLLATE Latin1_General_BIN2
|
||||
GO
|
||||
|
||||
|
||||
/** For memory-optimized tables, automatically map all lower isolation levels (including READ COMMITTED) to SNAPSHOT **/
|
||||
ALTER DATABASE CURRENT SET MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT = ON
|
||||
GO
|
||||
|
||||
ALTER AUTHORIZATION ON DATABASE::InMemDB TO sa
|
||||
GO
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
-------------------------------------------
|
||||
-- version 0.0.0-1006
|
||||
-- update hash index bucket counts based on scale factor. The script was created for scale factor 10.
|
||||
-- update hash index bucket counts based on scale factor. The script was created for scale factor 100, which corresponds to an in-memory footprint ~20GB.
|
||||
-------------------------------------------
|
||||
|
||||
USE InMemDB
|
||||
|
||||
+2
-3
@@ -174,7 +174,6 @@
|
||||
this.txtMaxTPS.Size = new System.Drawing.Size(99, 20);
|
||||
this.txtMaxTPS.TabIndex = 37;
|
||||
this.txtMaxTPS.TabStop = false;
|
||||
this.txtMaxTPS.Text = Program.MAX_TPS.ToString();
|
||||
//
|
||||
// lblRunningThread
|
||||
//
|
||||
@@ -271,8 +270,8 @@
|
||||
//
|
||||
// FrmConfig
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.ClientSize = new System.Drawing.Size(310, 332);
|
||||
this.Controls.Add(this.btnSave);
|
||||
this.Controls.Add(this.LabelReadsPerWrite);
|
||||
|
||||
+43
-59
@@ -79,10 +79,9 @@
|
||||
this.btnRun.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnRun.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnRun.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
|
||||
this.btnRun.Location = new System.Drawing.Point(801, 20);
|
||||
this.btnRun.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.btnRun.Location = new System.Drawing.Point(601, 16);
|
||||
this.btnRun.Name = "btnRun";
|
||||
this.btnRun.Size = new System.Drawing.Size(112, 37);
|
||||
this.btnRun.Size = new System.Drawing.Size(84, 30);
|
||||
this.btnRun.TabIndex = 3;
|
||||
this.btnRun.Text = "Start";
|
||||
this.btnRun.UseVisualStyleBackColor = false;
|
||||
@@ -94,10 +93,9 @@
|
||||
this.btnStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnStop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnStop.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
|
||||
this.btnStop.Location = new System.Drawing.Point(923, 20);
|
||||
this.btnStop.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.btnStop.Location = new System.Drawing.Point(692, 16);
|
||||
this.btnStop.Name = "btnStop";
|
||||
this.btnStop.Size = new System.Drawing.Size(109, 37);
|
||||
this.btnStop.Size = new System.Drawing.Size(82, 30);
|
||||
this.btnStop.TabIndex = 25;
|
||||
this.btnStop.Tag = "Data";
|
||||
this.btnStop.Text = "Stop";
|
||||
@@ -109,10 +107,9 @@
|
||||
this.lbResults.BackColor = System.Drawing.Color.Transparent;
|
||||
this.lbResults.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbResults.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(166)))));
|
||||
this.lbResults.Location = new System.Drawing.Point(-47, 4);
|
||||
this.lbResults.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.lbResults.Location = new System.Drawing.Point(-35, 3);
|
||||
this.lbResults.Name = "lbResults";
|
||||
this.lbResults.Size = new System.Drawing.Size(313, 65);
|
||||
this.lbResults.Size = new System.Drawing.Size(235, 53);
|
||||
this.lbResults.TabIndex = 31;
|
||||
this.lbResults.Text = "Baseline";
|
||||
this.lbResults.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
@@ -124,8 +121,8 @@
|
||||
this.optionsToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Padding = new System.Windows.Forms.Padding(8, 1, 0, 1);
|
||||
this.menuStrip1.Size = new System.Drawing.Size(1087, 26);
|
||||
this.menuStrip1.Padding = new System.Windows.Forms.Padding(6, 1, 0, 1);
|
||||
this.menuStrip1.Size = new System.Drawing.Size(815, 24);
|
||||
this.menuStrip1.TabIndex = 32;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
@@ -135,32 +132,31 @@
|
||||
this.configurationToolStripMenuItem,
|
||||
this.exitToolStripMenuItem});
|
||||
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
|
||||
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(73, 24);
|
||||
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(61, 22);
|
||||
this.optionsToolStripMenuItem.Text = "Options";
|
||||
//
|
||||
// configurationToolStripMenuItem
|
||||
//
|
||||
this.configurationToolStripMenuItem.Name = "configurationToolStripMenuItem";
|
||||
this.configurationToolStripMenuItem.Size = new System.Drawing.Size(175, 26);
|
||||
this.configurationToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
|
||||
this.configurationToolStripMenuItem.Text = "Configuration";
|
||||
this.configurationToolStripMenuItem.Click += new System.EventHandler(this.configurationToolStripMenuItem_Click);
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(175, 26);
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
|
||||
this.exitToolStripMenuItem.Text = "Exit";
|
||||
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
|
||||
//
|
||||
// ErrorMessages
|
||||
//
|
||||
this.ErrorMessages.Location = new System.Drawing.Point(1128, 97);
|
||||
this.ErrorMessages.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.ErrorMessages.Location = new System.Drawing.Point(846, 79);
|
||||
this.ErrorMessages.Multiline = true;
|
||||
this.ErrorMessages.Name = "ErrorMessages";
|
||||
this.ErrorMessages.ReadOnly = true;
|
||||
this.ErrorMessages.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
||||
this.ErrorMessages.Size = new System.Drawing.Size(479, 334);
|
||||
this.ErrorMessages.Size = new System.Drawing.Size(360, 272);
|
||||
this.ErrorMessages.TabIndex = 5;
|
||||
this.ErrorMessages.TabStop = false;
|
||||
//
|
||||
@@ -184,8 +180,7 @@
|
||||
legend1.Enabled = false;
|
||||
legend1.Name = "Legend1";
|
||||
this.chtTPS.Legends.Add(legend1);
|
||||
this.chtTPS.Location = new System.Drawing.Point(449, 110);
|
||||
this.chtTPS.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.chtTPS.Location = new System.Drawing.Point(337, 89);
|
||||
this.chtTPS.Name = "chtTPS";
|
||||
this.chtTPS.Palette = System.Windows.Forms.DataVisualization.Charting.ChartColorPalette.None;
|
||||
series1.ChartArea = "ChartArea1";
|
||||
@@ -196,7 +191,7 @@
|
||||
series1.Name = "TPS";
|
||||
series1.Points.Add(dataPoint1);
|
||||
this.chtTPS.Series.Add(series1);
|
||||
this.chtTPS.Size = new System.Drawing.Size(464, 330);
|
||||
this.chtTPS.Size = new System.Drawing.Size(348, 268);
|
||||
this.chtTPS.TabIndex = 33;
|
||||
this.chtTPS.Text = "chart1";
|
||||
//
|
||||
@@ -208,42 +203,40 @@
|
||||
this.lblTime,
|
||||
this.toolStripStatusLabel3,
|
||||
this.lblThreads});
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 796);
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 645);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.Padding = new System.Windows.Forms.Padding(1, 0, 19, 0);
|
||||
this.statusStrip1.Size = new System.Drawing.Size(1087, 25);
|
||||
this.statusStrip1.Size = new System.Drawing.Size(815, 22);
|
||||
this.statusStrip1.TabIndex = 35;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// toolStripStatusLabel1
|
||||
//
|
||||
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
|
||||
this.toolStripStatusLabel1.Size = new System.Drawing.Size(101, 20);
|
||||
this.toolStripStatusLabel1.Size = new System.Drawing.Size(80, 17);
|
||||
this.toolStripStatusLabel1.Text = "Elapsed Time:";
|
||||
//
|
||||
// lblTime
|
||||
//
|
||||
this.lblTime.Name = "lblTime";
|
||||
this.lblTime.Size = new System.Drawing.Size(17, 20);
|
||||
this.lblTime.Size = new System.Drawing.Size(13, 17);
|
||||
this.lblTime.Text = "0";
|
||||
//
|
||||
// toolStripStatusLabel3
|
||||
//
|
||||
this.toolStripStatusLabel3.Name = "toolStripStatusLabel3";
|
||||
this.toolStripStatusLabel3.Size = new System.Drawing.Size(122, 20);
|
||||
this.toolStripStatusLabel3.Size = new System.Drawing.Size(100, 17);
|
||||
this.toolStripStatusLabel3.Text = "Running Threads:";
|
||||
//
|
||||
// lblThreads
|
||||
//
|
||||
this.lblThreads.Name = "lblThreads";
|
||||
this.lblThreads.Size = new System.Drawing.Size(17, 20);
|
||||
this.lblThreads.Size = new System.Drawing.Size(13, 17);
|
||||
this.lblThreads.Text = "0";
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 31);
|
||||
this.splitContainer1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 25);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
@@ -264,9 +257,8 @@
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.chtLatches);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.chtCPU);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1048, 806);
|
||||
this.splitContainer1.SplitterDistance = 490;
|
||||
this.splitContainer1.SplitterWidth = 5;
|
||||
this.splitContainer1.Size = new System.Drawing.Size(786, 655);
|
||||
this.splitContainer1.SplitterDistance = 398;
|
||||
this.splitContainer1.TabIndex = 39;
|
||||
//
|
||||
// label4
|
||||
@@ -275,19 +267,18 @@
|
||||
this.label4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label4.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
|
||||
this.label4.Location = new System.Drawing.Point(156, 400);
|
||||
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label4.Location = new System.Drawing.Point(117, 325);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(158, 17);
|
||||
this.label4.Size = new System.Drawing.Size(122, 13);
|
||||
this.label4.TabIndex = 45;
|
||||
this.label4.Text = "Transactions/sec x1000";
|
||||
//
|
||||
// speedDialPanel
|
||||
//
|
||||
this.speedDialPanel.Location = new System.Drawing.Point(28, 106);
|
||||
this.speedDialPanel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.speedDialPanel.Location = new System.Drawing.Point(21, 86);
|
||||
this.speedDialPanel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.speedDialPanel.Name = "speedDialPanel";
|
||||
this.speedDialPanel.Size = new System.Drawing.Size(425, 320);
|
||||
this.speedDialPanel.Size = new System.Drawing.Size(319, 260);
|
||||
this.speedDialPanel.TabIndex = 43;
|
||||
//
|
||||
// label2
|
||||
@@ -296,10 +287,9 @@
|
||||
this.label2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label2.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
|
||||
this.label2.Location = new System.Drawing.Point(472, 85);
|
||||
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label2.Location = new System.Drawing.Point(354, 69);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(148, 20);
|
||||
this.label2.Size = new System.Drawing.Size(124, 17);
|
||||
this.label2.TabIndex = 42;
|
||||
this.label2.Text = "Transactions / sec";
|
||||
//
|
||||
@@ -308,10 +298,9 @@
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label1.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
|
||||
this.label1.Location = new System.Drawing.Point(27, 84);
|
||||
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label1.Location = new System.Drawing.Point(20, 68);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(310, 20);
|
||||
this.label1.Size = new System.Drawing.Size(260, 17);
|
||||
this.label1.TabIndex = 41;
|
||||
this.label1.Text = "Increase in performance since last reset";
|
||||
//
|
||||
@@ -321,10 +310,9 @@
|
||||
this.btnToggle.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnToggle.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnToggle.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
|
||||
this.btnToggle.Location = new System.Drawing.Point(24, 446);
|
||||
this.btnToggle.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.btnToggle.Location = new System.Drawing.Point(18, 362);
|
||||
this.btnToggle.Name = "btnToggle";
|
||||
this.btnToggle.Size = new System.Drawing.Size(199, 37);
|
||||
this.btnToggle.Size = new System.Drawing.Size(149, 30);
|
||||
this.btnToggle.TabIndex = 39;
|
||||
this.btnToggle.Text = "Show diagnostics ";
|
||||
this.btnToggle.UseVisualStyleBackColor = false;
|
||||
@@ -350,8 +338,7 @@
|
||||
chartArea2.BorderWidth = 0;
|
||||
chartArea2.Name = "ChartArea1";
|
||||
this.chtLatches.ChartAreas.Add(chartArea2);
|
||||
this.chtLatches.Location = new System.Drawing.Point(0, 148);
|
||||
this.chtLatches.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.chtLatches.Location = new System.Drawing.Point(0, 120);
|
||||
this.chtLatches.Name = "chtLatches";
|
||||
series2.ChartArea = "ChartArea1";
|
||||
series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Bar;
|
||||
@@ -359,7 +346,7 @@
|
||||
series2.Name = "Latches";
|
||||
series2.Points.Add(dataPoint2);
|
||||
this.chtLatches.Series.Add(series2);
|
||||
this.chtLatches.Size = new System.Drawing.Size(913, 103);
|
||||
this.chtLatches.Size = new System.Drawing.Size(685, 84);
|
||||
this.chtLatches.TabIndex = 42;
|
||||
this.chtLatches.Text = "chart1";
|
||||
//
|
||||
@@ -389,7 +376,6 @@
|
||||
this.chtCPU.ChartAreas.Add(chartArea3);
|
||||
this.chtCPU.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.chtCPU.Location = new System.Drawing.Point(0, 0);
|
||||
this.chtCPU.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.chtCPU.Name = "chtCPU";
|
||||
this.chtCPU.Palette = System.Windows.Forms.DataVisualization.Charting.ChartColorPalette.None;
|
||||
series3.ChartArea = "ChartArea1";
|
||||
@@ -398,27 +384,26 @@
|
||||
series3.Name = "CPUUsage";
|
||||
series3.Points.Add(dataPoint3);
|
||||
this.chtCPU.Series.Add(series3);
|
||||
this.chtCPU.Size = new System.Drawing.Size(1048, 311);
|
||||
this.chtCPU.Size = new System.Drawing.Size(786, 253);
|
||||
this.chtCPU.TabIndex = 41;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label3.Location = new System.Drawing.Point(1124, 49);
|
||||
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label3.Location = new System.Drawing.Point(843, 40);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(112, 17);
|
||||
this.label3.Size = new System.Drawing.Size(83, 13);
|
||||
this.label3.TabIndex = 11;
|
||||
this.label3.Text = "Error Messages:";
|
||||
//
|
||||
// FrmMain
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.ClientSize = new System.Drawing.Size(1087, 821);
|
||||
this.ClientSize = new System.Drawing.Size(815, 667);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Controls.Add(this.label3);
|
||||
@@ -426,7 +411,6 @@
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.Name = "FrmMain";
|
||||
this.Text = "Blue Yonder Ticket Reservation Simulator";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmMain_FormClosing);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
SQL Server VSS allows ISVs to develop backup solutions using APIs exposed by VSS framework. One such API method which is commonly used while performing differential backup using SQL VSS is IVssComponent::GetPartialFile. While performing differential backup, IVssComponent::GetPartialFile is used iteratively to obtain the range of changed differential bytes for backup which changed since last full backup.
|
||||
The output for GetPartialFile provides the file path, file name and pbstrRange which is a pointer to 64KB string buffer containing the comma-separated list of the form offset1:length1, offset2:length2, where each offset and length is a 64-bit integer specifying a file offset in bytes and length of the range in bytes, respectively.
|
||||
|
||||
The output for *GetPartialFile* provides the file path, file name and pbstrRange which is a pointer to 64KB string buffer containing the comma-separated list of the form offset1:length1, offset2:length2, where each offset and length is a 64-bit integer specifying a file offset in bytes and length of the range in bytes, respectively.
|
||||
If the changed pages within a partial file is large enough to fall outside the tracking range limit of the 64 bit string buffer, pbstrRange returns the filename containing those ranges instead of the range and offset within the current partial file.
|
||||
|
||||
The ISV Backup code should be able to handle both the output for pbstrRange viz offset/length range string for backup range within the current file or filename containing the backup range if the range falls outside the current file.
|
||||
Reference in New Issue
Block a user