SQL Server 2012 AlwaysOn and SQLSentry

11
SQL Server 2012 AlwaysOn and SQLSentry Kevin Kline Director of Engineering Services, SQL Sentry SQL Server MVP since 2004 Twitter, FB, LI: KEKline Blog: http://KevinEKline.com , http://ForITPros.com

description

SQL Server 2012 AlwaysOn and SQLSentry. Kevin Kline Director of Engineering Services, SQL Sentry SQL Server MVP since 2004 Twitter, FB, LI: KEKline Blog: http://KevinEKline.com , http://ForITPros.com. Agenda. The Basics. Inherits from DBM: Sync / Async data protection - PowerPoint PPT Presentation

Transcript of SQL Server 2012 AlwaysOn and SQLSentry

Page 1: SQL Server  2012  AlwaysOn  and  SQLSentry

SQL Server 2012 AlwaysOn and SQLSentry

Kevin Kline• Director of Engineering Services, SQL Sentry• SQL Server MVP since 2004• Twitter, FB, LI: KEKline• Blog: http://KevinEKline.com, http://ForITPros.com

Page 2: SQL Server  2012  AlwaysOn  and  SQLSentry

SQLSentry.net

Agenda

The Basics of

AlwaysOn

SSMS Tooling Demo

SQLSentry Tooling Demo

Page 3: SQL Server  2012  AlwaysOn  and  SQLSentry

SQLSentry.net

The Basics

• Database-level protection• Built upon the foundation of database mirroring• Requires a Windows Server Failover Cluster.• Availability Groups (AGs) are what most people

mean when they say “AlwaysOn”

Inherits from DBM:• Sync / Async data

protection• Automatic or

manual failover• Automatic page

repair• Compressed data

stream• TCP endpoints

With WSFC:• Does NOT require

instances to be Failover Cluster Instances (FCIs)

• Does NOT require that servers start out as clustered if using standalone instances

Page 4: SQL Server  2012  AlwaysOn  and  SQLSentry

SQLSentry.net

What Does WSFC Mean for a DBA?• You need to know WSFC very thoroughly.• Quorum matters.• Nodes must be part of the same domain. (Different

subnets are ok).• Quorum matters.• WSFC validation is very important.

• AG feature doesn’t check like in setup for FCI• It’s on YOU to check it.• %windir%/Cluster/Reports• Apply hotfixes per Windows version

• Quorum matters.

Page 5: SQL Server  2012  AlwaysOn  and  SQLSentry

SQLSentry.net

I Know Mirroring. How’s This Different?

• Enterprise Edition only. DB in full recovery mode only.• Not a 1:1 ratio of principals to mirrors. Per AG:

• Up to 4 additional replicas, for a total of 5• Up to 3 synchronous replicas• Up to 2 automatic failover pairs

• Multiple DBs in an AG will failover at the same time.***• Easily span subnets.• Replicas usable for read-only access and backups.

Page 6: SQL Server  2012  AlwaysOn  and  SQLSentry

SQLSentry.net

Availability Groups Fundamentals

o

Page 7: SQL Server  2012  AlwaysOn  and  SQLSentry

SQLSentry.net

Flexible Failover Policy LevelsFailure Condition Level

On server down. This is the least restrictive level. 1

On server unresponsive. 2

On critical server error. The default level. (1 and 2, plus internal errors).

3

On moderate server error. (1 – 3, plus other errors like stack dumps). 4

On any qualified failure conditions. (1 – 4, plus other errors like worker thread exhaustion and unresolvable deadlocks).

5

Damaged databases and suspect databases?Nope, not detected by any failure-condition level.

Page 8: SQL Server  2012  AlwaysOn  and  SQLSentry

SQLSentry.net

AG Metadata

• SSMS (in demo)• DMVs:

• sys.availability_*• sys.dm_hadr_*

• Xevents• SP_server_diagnostics: checks the health_check_timeout

value in 30 second intervals, by default.

Page 9: SQL Server  2012  AlwaysOn  and  SQLSentry

SQLSentry.net

Additional Resources

• Plan Explorer Free: http://sqlsentry.net/plan-explorer/sql-server-query-view.asp

• Twitter and #SQLHelp

• SQLCAT.com• SQLSkills.com• Community Sites:

• SQLPASS.org• SQLServerCentral.com• SQLBlog.com• SQLTeam.com

Page 10: SQL Server  2012  AlwaysOn  and  SQLSentry

SQLSentry.net

SUMMARY

SSMS, Traces, and Execution PlansTest Harness & TestingQuery Tuning TipsTemp tables

Cursors & LoopsNULLError HandlingTransactions

Security isn’t an afterthoughtChange Management is risk management

Page 11: SQL Server  2012  AlwaysOn  and  SQLSentry

SQLSentry.net

Q & A

• Send questions to me at: [email protected] • Twitter, Facebook, LinkedIn at KEKline• Slides at http://KevinEKline.com/Slides/ • IT Leadership content at http://ForITPros.com

• THANK YOU!