Azure SQL Database Lessons Learned From the Trenches Best practices, Tips and Tricks on monitoring and improving performance. Fernando Cobo.

Slides:



Advertisements
Similar presentations
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Advertisements

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Identity Management - Login © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Reprint Outstanding Transactions Report © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Feature: Purchase Requisitions - Requester © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Feature: Payroll and HR Enhancements © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Co- location Mass Market Managed Hosting ISV Hosting.
Windows 7 Training Microsoft Confidential. Windows ® 7 Compatibility Version Checking.
Feature: Purchase Order Prepayments II © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Feature: OLE Notes Migration Utility
Feature: Web Client Keyboard Shortcuts © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Session 1.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
 Rico Mariani Architect Microsoft Corporation.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Assign an Item to Multiple Sites © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Connect with life Connect with life
Windows Azure Connect Name Title Microsoft Corporation.
A Windows Azure application runs multiple instances of each role A Windows Azure application behaves correctly when.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Building Social Games for Windows 8 with Windows Azure Name Title Microsoft Corporation.
Feature: Customer Combiner and Modifier © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
SQL Server SQL Azure Visual Studio“Quadrant” SQL Server Modeling Services Entity Framework ADO.NET“M”/EDM Data Services …
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.

customer.
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
demo Demo.
Advanced SQL Azure Database Name Title Microsoft Corporation.
Feature: Void Historical/Open Transaction Updates © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
Feature: Suggested Item Enhancements – Analysis and Assignment © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and.
Windows Azure SQL Data Sync Name Title Microsoft Corporation.
projekt202 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
The CLR CoreCLRCoreCLR © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.

MIX 09 4/17/2018 4:41 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Rammary Gervais Sharde Edwards Sandra Garcia
Mission-critical performance with Microsoft SQL Server 2016
Возможности Excel 2010, о которых следует знать
Citrix Virtual Desktops version 7
Amit Banerjee Sr. Program Manager Microsoft Data Platform Group
Title of Presentation 11/22/2018 3:34 PM
Baseline: How Are We Doing Now?
Title of Presentation 12/2/2018 3:48 PM
1/3/2019 1:21 PM © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
4/27/17, Bell #8 What amount of net pay has been earned this period?
SharePoint 2013 Authentication with Azure – Part 1
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
WINDOWS AZURE A LAP AROUND PLATFORM THE Steve Marx
Communicating & Connecting in an Age of Social Media
PENSACOLA ENERGY WORK PLAN OCTOBER 10, 2016
5/1/2019 3:29 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Title of Presentation 5/12/ :53 PM
Шитманов Дархан Қаражанұлы Тарих пәнінің
SharePoint 2013 Authentication with Azure – Part 2
Title of Presentation 5/24/2019 1:26 PM
5/24/2019 6:44 PM 1/8/18 Bell #10 In a world governed by the gods, is there any room for human will? Do human choices make a difference? EXPLAIN © 2007.
日本初公開!? Vista の新機能を実演 とっちゃん わんくま同盟 7/23/2019 9:09 AM
Title of Presentation 7/24/2019 8:53 PM
Presentation transcript:

Azure SQL Database Lessons Learned From the Trenches Best practices, Tips and Tricks on monitoring and improving performance. Fernando Cobo José Manuel Jurado Díaz Technical Support Engineer Support Escalation Engineer fercobo@microsoft.com jmjurado@microsoft.com @jmJuradoDiaz

BIG Thanks to SQLSatLima sponsors

Special thanks

1st Lesson Learned: Playing a Role calling Microsoft Support 8/8/2019 11:16 PM 2nd Lesson Learned: Tips and Tricks for Connectivity and Performance 1st Lesson Learned: Playing a Role calling Microsoft Support © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Introduction COSTA RICA Amazing Microsoft Support Engineer Name: Fernando Cobo Email: ferboco@microsoft.com Job Title: Azure SQL DB Support Engineer Other Known Activities: Speaker @ SQL Saturday Rol Play: Amazing Microsoft Support Engineer COSTA RICA

Introduction SPAIN .NET Developer with water up to his neck... Name: José Manuel Jurado Díaz Email: Jmjurado@microsoft.com Twitter: @jmJuradoDiaz Job Title: Azure SQL DB Support Escalation Engineer Subject Matter Expert on Azure SQL DB Other Known Activities: Speaker @ SQL Saturday, TechReady, SQL Nexus, Azure Global BootCamp Rol Play: .NET Developer with water up to his neck... SPAIN

Background Check Are you working with Azure? Are you a DBA or Developer?

Common Azure SQL DB Performance Issues 8/8/2019 Common Azure SQL DB Performance Issues This Photo by Unknown Author is licensed under CC BY-SA-NC © 2014 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.

Common Perf Issues Becoming More Complex 8/8/2019 Common Perf Issues Becoming More Complex Query tuning, investigating execution plans Query Timeouts Blocking Sizing Database Server How to convert DTU - Price x Performance comparison - VCore Elastic Database Tools – Horizontal Sharding Frequently Simple Outdated statistics Missing Indexes Throttling – Max concurrent Logins/Requests/Sessions © 2014 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.

Performance Troubleshooting Path 8/8/2019 Performance Troubleshooting Path Always Verify/Update Statistics Then Investigate Missing Indexes QDS SQL Audit QPI Consider Reducing Fragmentation levels Queries Sufficient DTU / vCore Level for your Workload? Engage Support We can help! © 2014 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.

The 02:05 AM Problem a.k.a.: Sunday 8/8/2019 The 02:05 AM Problem a.k.a.: Sunday sys.dm_db_resource_stats, sys.resource_stas © 2014 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.

Common Azure SQL DB Connectivity Issues 8/8/2019 Common Azure SQL DB Connectivity Issues This Photo by Unknown Author is licensed under CC BY-SA-NC © 2014 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.

Best Practices Configuration Main Points Prevention Retry-Logic Connection String parameters Execution Command Timeout Connect Retry Count Monitor How to monitor my connections

Best Practices – Configuration Wrong DNS DNS not updated, missing, invalid. Outside: 1433 Inside: 11000-11999 / 14000-14999 Ports outbound Antivirus/Windows Firewall Port 1433 is blocked as outbound Ephemeral ports are not available Client IP is blocked Azure SQL Proxy is blocked or changed Your ISP Provider Public IP Azure VM VM needs a Public IP Geo-Replicated User Orphaned Logins

Best Practices – Prevention tcp:yourservername.database.windows.net,1433 Open/close the connection as fast as possible Connection Timeout=30 Connection may fail – Retry Logic is key - EF and NET.4.6.1 Latest version of ADO.NET, Microsoft JDBC, ODBC Avoid idle connections – ConnectRetryInterval and ConnectRetryCount Contained User instead of Logins Try .. Catch for all connections and command executions Connection Pooling MultipleActiveResultSets

Best Practices – Execution Avoid to use select * and return just needed rows Execution timeout Distributed transactions Transaction.Scope Cross-Queries sp_execute_remote UTC, Language AT TIME ZONE Language in the connection string Short Batches Indexes and Statistics

Best Practices – Monitoring Internal Telemetry SQL Auditing SQL Connection Statistics and StopWatch Query Data Store, QPI

Do you want to implement your own performance monitor? 8/8/2019 Do you want to implement your own performance monitor? sys.dm_db_resource_stats, sys.resource_stas https://github.com/JMNetwalker/AzureSQLConnectivityChecker © 2014 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.

Questions.- Questions? 8/8/2019 © 2015 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.

Rafflle Raffle prizes at 17:50

Evaluation Session Eval: http://www.sqlsaturday.com/812/sessions/sessionevaluation.aspx