SQL Server on Linux Troubleshooting tips and tricks

Slides:



Advertisements
Similar presentations
DynaTrace Platform.
Advertisements

Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
Module 17 Tracing Access to SQL Server 2008 R2. Module Overview Capturing Activity using SQL Server Profiler Improving Performance with the Database Engine.
Keeping our websites running - troubleshooting with Appdynamics Benoit Villaumie Lead Architect Guillaume Postaire Infrastructure Manager.
Module 20 Troubleshooting Common SQL Server 2008 R2 Administrative Issues.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 11: Monitoring Server Performance.
Chapter 11 - Monitoring Server Performance1 Ch. 11 – Monitoring Server Performance MIS 431 – created Spring 2006.
Maintaining and Updating Windows Server 2008
Loupe /loop/ noun a magnifying glass used by jewelers to reveal flaws in gems. a logging and error management tool used by.NET teams to reveal flaws in.
Server Roles and Features.NET Framework 3.51.NET Framework 4.5 IIS Web Server IIS Default Document IIS Directory Browsing IIS HTTP Errors.
Check Disk. Disk Defragmenter Using Disk Defragmenter Effectively Run Disk Defragmenter when the computer will receive the least usage. Educate users.
Module 2: Planning to Install SQL Server. Overview Hardware Installation Considerations SQL Server 2000 Editions Software Installation Considerations.
Connect with life Praveen Srvatsa Director | AsthraSoft Consulting Microsoft Regional Director, Bangalore Microsoft MVP, ASP.NET.
Enterprise Reporting with Reporting Services SQL Server 2005 Donald Farmer Group Program Manager Microsoft Corporation.
Chris Testa-O’Neill EMC Consulting. Agenda Resource Governor Integrating Performance Monitor and Profiler Policy Based Management Performance Data Collector.
Module 15: Monitoring. Overview Formulate requirements and identify resources to monitor in a database environment Types of monitoring that can be carried.
Hands-On Microsoft Windows Server 2008 Chapter 1 Introduction to Windows Server 2008.
Module 18 Monitoring SQL Server 2008 R2. Module Overview Monitoring Activity Capturing and Managing Performance Data Analyzing Collected Performance Data.
IBM Software Group Washington Area Informix User Group Forum 2004 The DB2 DBA Checklist Dwaine R Snow, DB2 & Informix.
New SA Training Topic 9: Logging, Monitoring, and Performance  Logging  Windows – “Auditing”  Linux – syslog  Monitoring  MRTG  Big Brother  Performance.
Module 1: Introduction to Microsoft SQL Server 7.0.
Maintaining a Microsoft SQL Server 2008 Database SQLServer-Training.com.
Troubleshooting From the Field – Part 2 SQL DIAG & SQL NEXUS By Ahmad Osama SQL Server Geeks - Editor In Chief and Regional Mentor(Delhi & NCR)
Key Concepts About Performance Factors Affecting SQL Performance SQL Performance Tuning Methodologies SQL Performance Tuning Tools 1.
TechEd /22/2017 5:40 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Module 7: Fundamentals of Administering Windows Server 2008.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 11: Monitoring Server Performance.
Introducing the SQL Server 2008 Performance Data Collector by Brad McGehee August 20, 2008 Audio via phone conference (866) , the dial in code.
Module 10: Monitoring ISA Server Overview Monitoring Overview Configuring Alerts Configuring Session Monitoring Configuring Logging Configuring.
© 2008 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Introduction to HP Availability Manager.
Guide to Linux Installation and Administration, 2e1 Chapter 10 Managing System Resources.
Contents 1.Introduction, architecture 2.Live demonstration 3.Extensibility.
Monitoring Windows Server 2012
Learningcomputer.com SQL Server 2008 – Profiling and Monitoring Tools.
Module 14 Monitoring and Optimizing SharePoint Performance.
Maintaining and Updating Windows Server Monitoring Windows Server It is important to monitor your Server system to make sure it is running smoothly.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 11: Monitoring Server Performance.
1 Chapter Overview Planning to Install SQL Server 2000 Deciding SQL Server 2000 Setup Configuration Options Running the SQL Server 2000 Setup Program Using.
Troubleshooting SQL Server Performance: Tips &Tools Amit Khandelwal.
Distributed Logging Facility Castor External Operation Workshop, CERN, November 14th 2006 Dennis Waldron CERN / IT.
ECHO A System Monitoring and Management Tool Yitao Duan and Dawey Huang.
Module 14: Advanced Topics and Troubleshooting. Microsoft ® Windows ® Small Business Server (SBS) 2008 Management Console (Advanced Mode) Managing Windows.
2: Operating Systems Networking for Home & Small Business.
Introduction to SQL Server  Working with MS SQL Server and SQL Server Management Studio.
Maintaining and Updating Windows Server 2008 Lesson 8.
SQL Advanced Monitoring Using DMV, Extended Events and Service Broker Javier Villegas – DBA | MCP | MCTS.
Improve query performance with the new SQL Server 2016 query store!! Michelle Gutzait Principal Consultant at
SQL Database Management
Managing a database environment in the cloud
Fundamental of Databases
SQL Server on Linux CTP 1.1 Florian
Monitoring Windows Server 2012
An introduction to Wait Statistics
What Is The SSIS Catalog and Why Do I Care?
Troubleshooting SQL Server high CPU usage
SQL Server Data Collector From Every Angle
SQL Server Monitoring Overview
Microsoft Dumps Question Answer - Dumps4download
SQL Server Client Tools 2018
Introduction of Week 3 Assignment Discussion
Performance Monitoring Using Extended Events, DMVs & Query Store
Troubleshooting SQL Server Basics
SQL Server 2016 Query Data Store
මොඩියුල විශ්ලේෂණය SQL Server Waits. Tables රැසක් එකට එකතු කිරීම.
Using Power Bi to troubleshoot SQL Server instances
Analyzing Performance Problems Using XEvents, DMVs & Query Store
Our awesome sponsors! Please visit the sponsor area in the break and interact with them. They are the reason we can hold this conference free of charge!
Managing and monitoring SQL Server on Linux from the command line
Analyzing Performance Problems Using XEvents, DMVs & Query Store
SharePoint 2013 Best Practices
Presentation transcript:

SQL Server on Linux Troubleshooting tips and tricks Suresh Kandoth SQL Server on Linux Troubleshooting tips and tricks

What exactly are you troubleshooting? https://cloudblogs.microsoft.com/sqlserver/2016/12/16/sql-server-on-linux-how-introduction/

diagnostic info & basic logs Identify installed software SQL Server packages -> yum info mssql-server / dpkg -l mssql-server select @@version systemctl status mssql-server SQL Server logs default location -> /var/opt/mssql/log Database engine -> errorlog Database engine -> default trace [log*.trc] & default system session [system_health*.xel] SQL Agent -> sqlagent.out Operating System logs centralized system logging -> journalctl kernel messages -> dmesg application or daemon logs -> syslog / messages Other key logs-> /var/logs

permissions & accounts binary /opt/mssql/ ownership = root fixed path data /var/opt/mssql/ ownership = mssql customizable config service daemon process startup context mssql config file

troubleshooting file activity client application, sql server error log, journalctl error messages specific process, specific path, typical syscalls tracing errors - strace writes & reads normal activity - strace

troubleshooting memory consumption free / sar swap file OOM Killer settings operating system pidstat mssql-conf [memory.memorylimitmb] multiple components inside single process Process DMV [dm_os_process_memory, dm_os_memory_nodes, dm_os_memory_clerks] DBCC MEMORYSTATUS SSMS Memory consumption report Extended Event [page_allocated and page_freed] sp_configure ‘max server memory’, memory grants [RG/hints] database engine

Performance monitoring OS diagnostics overview of system (top / vmstat / uptime / pmstat); process view (pidstat) cpu (mpstat); memory (free / sar –r); disk (iostat / iotop); network (sar –n) long term collection: sar or pcp collectd/InfluxDB/Grafana [mssql-monitoring] telegraph [cross platform monitoring agents for SQL Server] SQL diagnostics Activity monitor [SSMS] Performance dashboard [SSMS] Dashboard insights [sqlops] Extended Events

db engine performance troubleshooting Query Store runtime statistics plans used at different times wait categories DMV’s queries [sys.dm_exec_requests & sys.dm_exec_query_stats] waits [sys.dm_os_waiting_tasks & sys.dm_os_wait_stats] PSSDIAG and SQL Nexus utility unified data collection Linux collector on GitHub import data into database for analysis sys.dm_os_performance_counters can be used to query performance counters of db engine

deeper investigations sqldumper.exe exceptions in db engine dbcc stackdump dumptrigger / -y / create_dump event Memory dumps gdb or paldumper exceptions in sql pal generate-sql-dump.sh <pid> <target_dir> Core dumps Track activity of SQLPAL components /var/opt/mssql/logger.ini Trace written to log file PAL logger

Availability Groups pcs cluster status pcs cluster start / stop cluster management pcs resource show --full pcs status / crm_mon pcs resource update resource management pcs resource move pcs resource clear pcs resource unmanage failover resources

high availability logs /var/log/cluster/ or /var/log/corosync/ corosync.log /var/opt/mssql/log/ errorlog var/opt/mssql/log/ AlwaysOn_health*.xel

/var/log/sssd KRB5_TRACE AD authentication SPN configuration (setspn) keytab file (ktutil) kerberos (id, kinit, klist) networking issues SSSD+NSS /var/log/sssd KRB5_TRACE

Thank you!

PSSDIAG for SQL Server on Linux shell script based unified data collection SQL Server instances host instance container instances OS distributions RHEL, Ubuntu & SLES customize & extend analyze data using same tools [SQL Nexus] framework performance static logs memory dumps scenarios OS data points performance data using sysstat configuration information common OS logs SQL data points perfstats scripts DMV’s & catalog views SQL performance counters extended events SQL log files data collection start_collector.sh stop_collector.sh scenario config [*.scn files] control scripts https://github.com/Microsoft/DiagManager/blob/master/LinuxPSSDiag/Readme.txt

Live Monitoring : mssql-monitoring https://blogs.msdn.microsoft.com/sqlcat/2017/07/03/how-the-sqlcat-customer-lab-is-monitoring-sql-on-linux/

PAL logging Content of /var/opt/mssql/logger.ini to trace libos activity Content of /var/opt/mssql/logger.ini to trace kerberos activity [Output.FileOutput] type=File filename=/var/opt/mssql/log/palstart_$(_pid).log [Logger] level=silent [Logger.libos.trace] level=debug outputs=FileOutput [Output.FileOutput] type=File filename=/var/opt/mssql/log/palkerb_$(_pid).log [Logger] level=silent [Logger.security.kerberos] level=debug outputs=FileOutput trace output is captured in /var/opt/mssql/log/pal*.log; don’t leave the trace running, can get very big