TechEd 2013 1/14/2019 1:34 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.

Slides:



Advertisements
Similar presentations
High Friction & Control Resources Dedicated Shared Low 100% of API, Virtualized Roll-your-own HA/DR/scale SQL Server in IaaS Virtualized Machine SQL.
Advertisements

TechEd /1/2018 7:56 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Running Reporting Services in SharePoint Integrated Mode: How and Why
6/19/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
TechEd /24/2018 8:28 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /26/2018 3:42 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Build /4/2018 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Tech·Ed North America /31/2018 4:35 PM
8/8/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Introduction to SQL Server Management for the Non-DBA
Optimizing Microsoft SQL Server 2008 Applications Using Table Valued Parameters, XML, and MERGE
9/22/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
9/23/2018 1:04 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
TechEd /14/2018 6:05 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
Enriching your BI Semantic Models with Data Analysis Expressions (DAX)
Building the Perfect BI Semantic Model for Power View
TechEd /14/2018 6:26 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
11/16/ :06 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
0 to 60: Developing Apps for Microsoft Office 2013
TechEd /19/ :10 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /21/2018 3:13 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /21/2018 5:20 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /23/ :44 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /24/2018 6:19 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /24/2018 5:46 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /24/2018 8:21 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
Visual Studio 2013 for web developers
TechEd /28/ :51 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /2/2018 7:42 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /4/2018 3:19 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /6/2018 8:16 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Windows Azure Web Sites & On-Premises Connectivity
The Dirty Dozen: Windows PowerShell Scripts for the Busy DBA
Tech Ed North America /1/ :36 AM Required Slide
TechEd /11/ :44 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /11/ :21 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /11/ :54 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /15/2019 8:08 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /18/ :08 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /18/2019 2:43 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
2/17/2019 7:32 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
TechEd /23/2019 7:16 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
2/24/2019 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Building Business Applications in LightSwitch
2/27/2019 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
TechEd /28/2019 7:27 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Pushing Data to and from the Cloud with SQL Azure Data Sync
Building the Perfect BI Semantic Model for Power View
TechEd /3/ :48 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /4/2019 3:19 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Sayed Ibrahim Hashimi Program Manager Microsoft Corporation
Build /10/2019 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /7/2019 1:14 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /11/ :25 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /23/2019 9:23 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /23/2019 9:35 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /28/2019 7:58 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
04 | Performance and the Premium SKU
TechEd /27/2019 5:37 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Code First Development in Microsoft ADO.NET Entity Framework 4.1
TechEd /5/2019 4:36 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Cloud-powered Load Testing with Team Foundation Service
7/5/2019 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
TechEd /7/2019 1:38 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /12/ :12 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /30/2019 7:18 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /30/ :28 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /5/2019 2:08 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
What’s New in Visual Studio 2012 for Web Developers
TechEd /21/2019 9:49 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
Presentation transcript:

TechEd 2013 1/14/2019 1:34 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

1/14/2019 1:34 AM DBI-B330 Cloud Optimizing T-SQL: What You Need to Know If You Use SQL Database or Microsoft SQL Server 2012 Jan Engelsberg Program Manager © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Agenda What is different in SQL Database & Why? Could optimizing your design Connection Reliability Reducing round-trips Caching

Three different ways to run SQL TechEd 2013 1/14/2019 1:34 AM Three different ways to run SQL High “Friction”/Control Resources Dedicated Shared Low SQL Server Raw iron Scale-up Full h/w control Roll-your-own HA/DR/scale 100% of API, Virtualized Roll-your-own HA/DR/scale SQL Server in IaaS Virtualized Machine Auto HA, Fault-Tolerance Friction-free scale Self-provisioning, mgmt @ scale Virtualized Database SQL Database - PaaS © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

What is different in SQL Database & Why? TechEd 2013 1/14/2019 1:34 AM What is different in SQL Database & Why? Traditional vs. Cloud Datacenter layout SQL Instance vs. virtualized Database Machine 1 Application Server Machine 4 SQL Server Instance Machine 1 Application Server $$$$$ $ Machine 1 SQL Server Instance $ Machine 1 SQL Server Instance Machine 1 SQL Server Instance DB DB DB DB DB DB DB DB DB Machine 4 SQL Server Instance Machine 2 Application Server $ $ Machine 2 $ $$$$$ Machine 2 Machine 2 SQL Server Instance SQL Server Instance SQL Server Instance DB DB DB DB DB DB DB Machine 2 SQL Server Instance UserDB Master DB DB $$$$$ Machine 4 SQL Server Instance Machine 3 Application Server $ Machine 3 $ Machine 2 Machine 2 SQL Server Instance SQL Server Instance SQL Server Instance DB DB DB DB DB DB DB DB DB © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Cloud optimizing your database design Master MSDB Temp Master MSDB User DB User DB Instance Collation Logins Credentials Linked Server Defs. CLR … Agent Replication DB Mail … User DB … TempDB Collation Other Apps Other DBs TempDB User DB

Cloud optimizing your database design Feature = All syntax or semantic changes to the surface area Database Feature Very few features are both Example: CREATE DATABASE Only grand fathering here No new features that have this characteristic will be added Host Feature Contained within a database Examples: Table Trigger Database Firewall rules … Not contained within a database Examples: High Availability DR … Database Host

Best Practices Instrument, instrument, instrument DMVs, SET STATISTICS …, XEvents, …  Next slide Automate, automate, automate Optimize your database design & queries Make your app resilient to failures  More details in a bit Minimize roundtrips

Instrumenting your app TechEd 2013 1/14/2019 1:34 AM Instrumenting your app Snapshotting DMVs Collecting XEvents DB DB DB DB DW DB DB DB DB DB © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Connection Reliability Issue types Exception  Message from server/app indicating failure Timeout (or user impatience)  No message from server/app within desired response time Unreliable User Client app Web Server DB Server Not durable Durable

Let’s look at what can happen X Web Server DB Server ? X Request is executed on the Server  Retry for reads is safe  Retry for writes is NOT safe Request has not yet reached the server  Retry for reads and writes is safe The request has reached the server  Retry for reads is safe  Retry for writes is NOT safe

Safe retry-protocol for writes Client Assign a unique ID (GUID) to request Send request to server Send transaction received notification Server If request ID already exists return error message Begin transaction Save request ID Execute request Commit transaction Return result Delete request ID Retention clean-up

Retry considerations Read Write Just re-execute TechEd 2013 1/14/2019 1:34 AM Retry considerations Read Write Just re-execute Requires tracking of transaction ID Requires outer transaction Low cost operation High cost operation A general system wide back-off strategy is typically a good idea Query dependent back-off strategy to avoid overloading the system © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Reducing round-trips Get all @ once Batch updates TechEd 2013 1/14/2019 1:34 AM Reducing round-trips Get all @ once Issue one query that gets the data you need Consider using FOR XML for simpler consumption Batch updates Example - “Update the following 1000 entities” N updates  N round-trips vs. N updates  <N (1?) round-trips SELECT… SELECT… SELECT… SELECT… N  N One client server roundtrip per execution N  <N XML Delimited list Table Valued Parameter All executions in one batch © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Reducing round-trips cont’d Roundtrip per execution Delimited list XML Table Valued Parameter Fully streaming Easy to use Performance is good No SQL Injection Can be strongly typed No SQL Injection Nice option if your data is already XML! Great flexibility Strongly typed No SQL Injection Performance is great! Easy to use Allows for some level of streaming Poor performance Potential for SQL Injection attacks Requires SQLCLR Data is not strongly typed Cumbersome implementation Can be simplified by created one TVF per “list type” Not strongly typed by default Performance is ok but not the best Less cumbersome than the delimited list but still somewhat cumbersome Less flexible than XML Allows for streaming, but only to the server

Caching Cache aggressively Rowversion vs. Checksums TechEd 2013 1/14/2019 1:34 AM Caching Cache aggressively This is based on a business requirement: “How fresh does the data I show you have to be?” Rowversion vs. Checksums Rowversion is automatic, Checksums need to be calculated manually Rowversion changes on any row update, Checksum can be calculated per column set Rowversion can be used as “high water mark” CHECKSUM vs. HASBYTES (CONCAT(…)) Querying efficiently Typically convert rowversion to BIGINT for simpler handling in the client tier Avoid creating indexes on these columns, will cause fragmentation for highly updated tables Include other predicates when possible © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

1/14/2019 1:34 AM Related content Breakout Exploring Microsoft SQL Server Data Tools in Visual Studio 2012 Microsoft SQL Server Database Development with SQL Server Data Tools for Visual Studio 2012 Query Performance Tuning Techniques For Windows Azure SQL Database Overview, Best Practices and Lessons Learned on Microsoft SQL Server in Windows Azure Virtual Machines Hands-on Labs Exploring New T-SQL Features in Microsoft SQL Server 2012 Find Me Later At… TLC Area after this session & tomorrow morning Ask The Experts tables © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Download Data Explorer Track Resources Download Data Explorer SQL Server Website Hands-On Labs @sqlserver Download Geoflow mva Microsoft Virtual Academy Get Certified! Windows Azure

Resources Learning TechNet msdn http://channel9.msdn.com/Events/TechEd 1/14/2019 1:34 AM Resources Learning Sessions on Demand http://channel9.msdn.com/Events/TechEd Microsoft Certification & Training Resources www.microsoft.com/learning TechNet msdn Resources for IT Professionals http://microsoft.com/technet Resources for Developers http://microsoft.com/msdn © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Complete an evaluation on CommNet and enter to win! 1/14/2019 1:34 AM Complete an evaluation on CommNet and enter to win! © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

1/14/2019 1:34 AM Required Slide *delete this box when your slide is finalized Your MS Tag will be inserted here during the final scrub. Evaluate this session Scan this QR code to evaluate this session and be automatically entered in a drawing to win a prize © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

1/14/2019 1:34 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.