Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Azure SQL Database Lessons Learned From the Trenches Best practices, Tips and Tricks on monitoring and improving performance. Fernando Cobo."— Presentation transcript:

1 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 @jmJuradoDiaz

2 BIG Thanks to SQLSatLima sponsors

3 Special thanks

4 1st Lesson Learned: Playing a Role calling Microsoft Support
8/8/ :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.

5 Introduction COSTA RICA Amazing Microsoft Support Engineer
Name: Fernando Cobo Job Title: Azure SQL DB Support Engineer Other Known Activities: SQL Saturday Rol Play: Amazing Microsoft Support Engineer COSTA RICA

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

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

8 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.

9 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.

10 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.

11 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.

12 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.

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

14 Best Practices – Configuration
Wrong DNS DNS not updated, missing, invalid. Outside: 1433 Inside: / 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

15 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

16 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

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

18 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 © 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.

19 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.

20 Rafflle Raffle prizes at 17:50

21 Evaluation Session Eval:


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

Similar presentations


Ads by Google