Presentation is loading. Please wait.

Presentation is loading. Please wait.

Building Highly Available Systems with SQL Server™ 2005 Vineet Gupta Evangelist – Data and Integration Microsoft Corp.

Similar presentations


Presentation on theme: "Building Highly Available Systems with SQL Server™ 2005 Vineet Gupta Evangelist – Data and Integration Microsoft Corp."— Presentation transcript:

1

2 Building Highly Available Systems with SQL Server™ 2005 Vineet Gupta Evangelist – Data and Integration Microsoft Corp.

3 Availability What does it mean to you?  Why not?  Site is unavailable  System is unavailable  Database is unavailable  Database is partially unavailable  Table is unavailable  Data is unavailable Can your customers get done, what they need to get done, when they need to do it? 24x7x365

4 Barriers To Availability  Database Maintenance and Operations  Data Access Concurrency Limitations  Database Server Failure or Disaster

5 Barriers To Availability  Database Maintenance and Operations  Fast Recovery  Partial Availability  Online Restore  Media Reliability  Dedicated Administration Connection  Dynamic Configuration  Data Access Concurrency Limitations  Database Server Failure or Disaster

6 What happens when…  Disks Fail  In SQL Server™ 2000  Database is marked suspect  Users are unable to access the database  In SQL Server™ 2005  Filegroup is marked offline  Users are able to access undamaged data

7 Partial Database Availability Improving Availability for Isolated Disaster  Undamaged data remains available while damaged data is inaccessible  File Status shown in sys.database_files catalog view  Page Errors written to suspect_pages table in msdb  Agent alerts:  Notification of the damaged file  Can take the database offline, if desired  Can automate the restore, for read-only data

8 What happens when…  Recovery begins  In SQL Server™ 2000  Database is in a restoring state  Users are unable to access the database  File needs to be recreated and zero initialized  File Restore can proceed – offline  In SQL Server™ 2005  Filegroup is in a restoring state  Users are able to access undamaged data  File can be recreated with instant file Initialization  Piecemeal Restore can proceed – online

9 Online Piecemeal Restore Improving Availability during Recovery  Almost any component (page, file, filegroup) can be restored – ONLINE  If a page is damaged – restore only that page from a file, filegroup or database backup  If a file is damaged – restore only that file from a file, filegroup or database backup  If a filegroup is damaged – restore only that filegroup from a filegroup or database backup  Readonly filegroups can be restored without rolling forward log changes  Users can access the database during the restore

10 Partial Database Availability Online Piecemeal Restore

11 Summary: Maintenance and Ops TechnologyImprovesWhen Partial Database Availability  Data Availability Undamaged data/partitions remains available  Recovery Time Recover only that which is damaged Upgrade Immediate Instant File Initialization  Database Creation Time Files are not zero-initialized  File, Filegroup, and Database Restore Missing files are created quickly  Autogrow and Manual Growth time Additional space is quickly added  Recovery Time – Less time to create files Upgrade Immediate Online Piecemeal Restore  Data Availability Undamaged data/partitions remains available during recovery  Recovery Time Recover only that which is damaged – online Upgrade Immediate

12 Barriers To Availability  Database Maintenance and Operations  Data Access Concurrency Limitations  Snapshot Isolation  Online Index Operations  Replication  Data Partitioning  Database Server Failure or Disaster

13 What happens when…  Indexes need to be rebuilt  In SQL Server™ 2000  Index rebuilds require an exclusive table-level lock, resulting in offline rebuilds  Users are unable to access the table  In SQL Server™ 2005  Rebuilds of an index can be performed online if a few simple criteria are met  Users are able to access the table

14 Online Index Operations Improving Concurrency during Index Maintenance  SQL Server™ 2000  Offline Index Rebuilds ; table data is unavailable during operation  Rebuild options: DBCC DBREINDEX and CREATE with DROP_EXISTING  SQL Server™ 2005  Includes all of the above offline operations, plus…  New ALTER INDEX…REBUILD:  ONLINE – allows concurrent user access (queries as well as modifications) to the index during rebuild  OFFLINE – works using locks (same as SQL Server™ 2000)  If online is not possible by default, consider design alternatives to fully leverage online index rebuilds

15 Online Index Rebuilds

16 What happens when…  Readers and Writers desire the same data  In SQL Server™ 2000  Locking is used to guarantee the intended level of isolation  Users must wait to access locked data  Concurrency and performance compromised  Correctness is compromised when lower isolation levels are used to avoid locking  In SQL Server™ 2005  Locking OR Versioning can be used to guarantee a variety of isolation levels  With versioning, Readers won’t block writers and writers won’t block readers  Performance improved if contention was primary bottleneck  Correctness is not compromised due to use of lower isolation levels

17 Snapshot Isolation Improving Concurrency in Mixed Workloads  SQL Server™ 2000  Isolation implemented solely through locking  Mixed workloads may experience:  Concurrency problems due to blocking  The Inconsistent Analysis problem  SQL Server™ 2005  Isolation implemented using locking and versioning  Mixed workloads can improve read consistency and performance using:  Read committed with Statement-level snapshot to improve statement-level consistency  Snapshot Isolation to improve transaction-level consistency

18 Snapshot Isolation

19 Barriers To Availability  Database Maintenance and Operations  Data Access Concurrency Limitations  User or Application Error  Database Server Failure or Disaster  Failover Clustering  Database Mirroring  Peer-to-Peer Replication  Log Shipping

20 Database Mirroring Database-level Redundancy  Upcoming High Availability Technology  Released for testing and prototyping in SQL Server™ 2005 RTM  Certified for Production Use in the first half of 2006  Supports three configurations:  High Availability  High Protection  High Performance

21 Commit Write to Local Log Transmit to Mirror Write to Remote Log Acknowledge Committed in Log Constantly Redoing on Mirror Acknowledge Database Mirroring Log DB Log

22 Database Mirroring Configuration Summary  No Automatic Detection  Manual Failover  Uses synchronous form of mirroring  Does not require Witness  Principal performance is affected by network speed and distance High Availability High Protection High Performance  Automatic Detection  Automatic Failover  Uses synchronous form of mirroring  Requires Witness  Principal performance is affected by network speed and distance  No Automatic Detection  Manual Failover  Uses asynchronous form of mirroring  Does not require Witness  Principal performance is NOT affected by network speed and distance

23 Database Mirroring

24 Which Technology When? Downtime – Time to Detect, Failover/Recover and Resume Workload s e c o n d s to m i n u t e s to h o u r s to d a y s Failover Clustering Database Mirroring Database Mirroring High Availability Configuration Workloss Exposure – Amount of Potential Data Loss none to seconds tominutes to days Workloss Exposure – Amount of Potential Data Loss none to seconds to minutes to days Failover Clustering Geographically Dispersed Database Mirroring Database Mirroring High Performance Configuration Replication Peer-to-Peer Transactional Log Shipping Backup/Restore Backup/Restore Online Page-level to File-level to Filegroup-level to Offline Database Detach/Attach Database Snapshot

25 Summary: Standby Technologies TechnologyStandbyProtectionWhen Failover Clustering HotServer Minimal Work to Leverage Database Mirroring High Availability Configuration HotDatabase Minimal Work to Leverage Log Shipping WarmDatabase Minimal Work to Leverage Database Mirroring High Protection Configuration WarmDatabase Minimal Work to Leverage Database Mirroring High Performance Configuration WarmDatabase Minimal Work to Leverage ReplicationWarm Database (Publication of objects) Design and Architect Partial Database Availability OnlineFilegroup/File Upgrade Immediate Backup and Restore Cold Database Filegroup/File Upgrade Immediate

26 Barriers To Availability How SQL Server 2005 Addresses Them  Database Maintenance and Operations  Fast Recovery  Partial Availability  Online Restore  Media Reliability  Dedicated Administration Connection  Dynamic Configuration  Data Access Concurrency Limitations  Snapshot Isolation  Online Index Operations  Replication  Data Partitioning  Database Server Failure or Disaster  Failover Clustering  Database Mirroring  Peer-to-Peer Replication  Log Shipping

27 © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.


Download ppt "Building Highly Available Systems with SQL Server™ 2005 Vineet Gupta Evangelist – Data and Integration Microsoft Corp."

Similar presentations


Ads by Google