how to manage and monitor large sql server estates

27
Large SQL Server Estates How to manage and monitor them… Web: www.sqlwatchmen.com Email: [email protected] Twitter: @SQLMurph Jim Murphy CEO SQLWatchmen, LLC.

Upload: red-gate-software

Post on 22-Jan-2018

62 views

Category:

Software


0 download

TRANSCRIPT

Page 1: How to manage and monitor large sql server estates

Large SQL Server EstatesHow to manage and monitor them…

Web: www.sqlwatchmen.comEmail: [email protected]: @SQLMurph

Jim MurphyCEOSQLWatchmen, LLC.

Page 2: How to manage and monitor large sql server estates

Who is SQLWatchmen?

§ DBA Services – performance tuning,

disaster recovery, maintenance

§ SQL Programming - views, SPs, triggers

§ Integration Services - SSIS for trying

systems together

§ Reporting - SSRS for custom analytics

to fill business needs

§ Cloud Migration

§ Tech company in Austin, TX

§ Can serve as Remote / Fractional DBAs

§ SQL Server Specialists (We work alongside

general tech consulting firms)

§ Compliance (HIPAA, SOX, SOC2)

How can we assist you?

2

Page 3: How to manage and monitor large sql server estates

Only Scratching The Surface

• There is so much we have to skip due to timing.• Discussing two aspects of large estates:

• Managing• Monitoring

• We’ll discuss DIY options along the way.

3

Page 4: How to manage and monitor large sql server estates

WHAT’S ALL THIS NOISE

TIPS & TRICKS

PITFALLS & AVOIDING THEM

CONCLUSION

DEMO

4

Page 5: How to manage and monitor large sql server estates

5

PITFALLS FOR DBA’S WHEN MANAGING LARGE SQL SERVER ESTATES

Page 6: How to manage and monitor large sql server estates

Basics - Alerts

Systems Online?

• If not, how are you alerted?• If SQL Agent stopped, no alerts!• DIY Solutions.

6

Page 7: How to manage and monitor large sql server estates

Basics – Estate View

• Dashboard needed!• DIY Solutions.• This is a not a small project!

7

Page 8: How to manage and monitor large sql server estates

Basics - Repository

This is a large ODS/DW like project!

• Collect local data.• Sweep data to central monitoring repository. (SSIS?)• Interpret results.• Make data accessible.

8

Page 9: How to manage and monitor large sql server estates

Maintenance Issues - Backups

• Are they working?• Does one instance have backups disabled?• DIY Solutions.

• Hope. Pray.

9

Page 10: How to manage and monitor large sql server estates

Maintenance Issues – Disk Space

• Disk Space Danger• Is daily trigger of >80% good enough?• Is every 5 mins too much?• PowerShell?

• Failed jobs or long running jobs• Email overload.

10

Page 11: How to manage and monitor large sql server estates

11

Page 12: How to manage and monitor large sql server estates

Management - Compliance

• Change Control and settings.• How to ensure no one changes settings?• How to enforce new instances to follow company standard?• DIY Solutions.

12

Page 13: How to manage and monitor large sql server estates

13

Page 14: How to manage and monitor large sql server estates

14

Page 15: How to manage and monitor large sql server estates

Performance – Does it really matter?

Problem: Application Hourglasses & Time-outs.

§ The database is the foundation of the entire application or corporate stack. If the database is slow…

15

Page 16: How to manage and monitor large sql server estates

Performance - Waitstats• Waitstats (sys.dm_os_wait_stats)

• http://download.microsoft.com/download/4/7/a/47a548b9-249e-484c-abd7-29f31282b04d/Performance_Tuning_Waits_Queues.doc

• Identify if system bottleneck is:• CPU• DISK• MEMORY• NETWORK

• … Then locate queries consuming those resources and tune them.

16

Page 17: How to manage and monitor large sql server estates

Performance - Perfmon• What to monitor in Perfmon.exe (Performance Monitor):

• Processor - % Processor Time.• System – Processor Queue Depth.• SQL Statistics - Batch Requests/s. (throughput).• SQL Statistics – Compilations and Recompilations.• Memory Manager – Memory Grants Pending • Physical Disk – Avg. Disk Sec/Read and /Write.• Network Interface – Bytes Total/sec.

• What NOT to monitor• PLE < 300• Disk Queue Length

17

Page 18: How to manage and monitor large sql server estates

Performance - Queries

• Find queries consuming most of the resources.• Query is a long query and I can’t paste it here. If you want it, go to

https://www.sqlwatchmen.com/contact-us and let me know you want the “worst query” script and I’ll send it to you.

18

Page 19: How to manage and monitor large sql server estates

Demo

19

Page 20: How to manage and monitor large sql server estates

PRO TIP

Pay attention to data collection FREQUENCY. If your average is over 1 min while SAN Admin’s average is over 1

hour, they may not see the spikes you report. [ ]What you see What they see

20

Page 21: How to manage and monitor large sql server estates

Performance Solutions

DIY: How to do this across 100 SQL Servers?

• Daily job/email?• Job to save query results to local tables.• Sweep changes to central server.• Baseline – What is normal?• Performance Dashboard Reports (add-in to SSMS).

21

Page 22: How to manage and monitor large sql server estates

22

WHAT IS NOISE AND HOW TO AVOID IT

Page 23: How to manage and monitor large sql server estates

23

Page 24: How to manage and monitor large sql server estates

Noisy SQL Servers

Alerts must be:• Actionable.• As infrequent as possible.

Using a service can help:• PagerDuty (integrates with Jira/others).• SQLWatchmen uses OpsGenie and Redmine.

24

Page 25: How to manage and monitor large sql server estates

Conclusion

Managing lots of SQL Server installs:• There are some great Enterprise tools PBM/CMS/PowerShell.

Monitoring lots of SQL Server installs:• DIY is complicated.• DIY is the right choice for some.• For everyone else:

• Monitoring software solves these problems!

25

Page 26: How to manage and monitor large sql server estates

26

Build Buy

Page 27: How to manage and monitor large sql server estates

Large SQL Server EstatesHow to manage and monitor them…

Web: www.sqlwatchmen.comEmail: [email protected]: @SQLMurph

Jim MurphyCEOSQLWatchmen, LLC.

Thank You!