Monitoring & Tuning Azure SQL Database: Presenting Sponsors
Monitoring & Tuning Azure SQL Database: Presenting Sponsors
Database
Presenting Sponsors
Thank You to Our Presenting Sponsors
IDERA designs powerful software with one SentryOne empowers Microsoft data professionals to
goal in mind – to solve customers’ most complex achieve breakthrough performance across physical,
challenges with easy-to-use solutions. IDERA’s award- virtual and cloud environments. We develop solutions
winning SQL Server database solutions and multi- to monitor, diagnose, and optimize SQL Server
platform database, application and cloud monitoring performance, including Plan Explorer, the query-tuning
tools ensure your business never slows down. tool with more than 100,000 downloads.
Supporting Sponsor
Attend PASS Summit to Grow Your Career
Connect with a global network of 250,000+ data professionals
PASS Summit is the largest conference for technical professionals who
leverage the Microsoft Data Platform.
PASSsummit.com
The Community
Dustin Ryan
Blog at SQLDusty.com
Published author, technical editor, speaker
Facebook.com/SQLDusty
[email protected]
Twitter.com/SQLDusty
Avid collector of fun dolls
They’re so cool!
LinkedIn.com/in/SQLDusty
Monitoring & Tuning Azure SQL
Database
Presenting Sponsors
Agenda
• Monitoring resource utilization
• Monitor using Query Performance Insights
• Automatically monitor w/ Intelligent Insights
• Manually tune
• Automatically tune
• Database Security Vulnerability Assessment
Monitor Resource Utilization
Monitor databases using the Azure portal
• You can create and edit monitoring charts in the portal
• Charts can be pinned to the database dashboard screen
• Available metrics
• Blocked by Firewall • Failed connections
• CPU % • In-Memory OLTP storage %
• DTU limit • Log IO %
• DTU % • Sessions %
• DTU used • Successful connections
• Data IO % • Total database size
• Database size % • Workers %
• Deadlocks
• You can also configure data driven alerts based on performance metrics
• These performance metrics can also help you determine if you can
downgrade to a lower performance level
Monitor databases using DMVs (cont.)
• sys.dm_db_resource_stats
• Good for monitoring granular data within a smaller time frame
• Available in every SQL database
• Shows recent resource use relative to the service tier
• Metrics are recorded every 15 seconds and maintained for 1 hour
• Metrics are expressed as a percentage of the max allowed DTU for the database service tier
• For more information on this DMV, view the documentation
Returns the average and maximum values for CPU percent, data and log I/O, and
memory consumption over the last hour:
Monitor databases using DMVs
• sys.resource_stats
• Good for monitoring less granular data across longer periods of time
• Metrics captured data every 5 minutes and maintains historical data for 14 days
• Metrics are expressed as a percentage of the max allowed DTU for the database
service tier
Returns all databases that are averaging at least 80% of compute utilization over the
last one week:
Monitoring Queries
Calculate size of database objects
SELECT sys.objects.name, SUM(reserved_page_count) * 8.0 / 1024
FROM sys.dm_db_partition_stats, sys.objects
WHERE sys.dm_db_partition_stats.object_id = sys.objects.object_id
GROUP BY sys.objects.name;
Monitor with
Query Performance Insights
Query
Performance
Insights
• Spend less time troubleshooting
performance
• Provides deeper insights into your
database resource consumption
• The ability to drill down into query
details, view text, history of resource
utilization
• Performance tuning annotations that
show actions performed by
SQL Azure Database Advisor
• Basic
• Good for databases with a single user, very little concurrent requests, or you’re just getting
started with SQL DB
• Standard
• Good for multiple concurrent requests like workgroup or web apps with low to medium IO
traffic requirements
• Premium
• Good if your app requires substantial resources for extended periods of time, many
concurrent requests, low latency
• Premium RS
• Good for IO intensive workloads that do not require the highest availability guarantees such
as high-performance test environments or analytical workloads
@sqlpass
#sqlpass
@PASScommunity
Presenting Sponsors