Sql 2005 high availability
-
Upload
information-technology -
Category
Technology
-
view
1.485 -
download
2
description
Transcript of Sql 2005 high availability
![Page 2: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/2.jpg)
Prerequisite Knowledge
• Basic T-SQL Syntax (SELECT, UPDATE)
• Experience executing stored procedures• Knowledge of how SQL Server uses transaction logs
and the SQL Server recovery process• Knowledge of SQL Server 2000 concurrency controls
Level 200Level 200
![Page 3: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/3.jpg)
Who Am I?• SQL Server & .NET Consultant with Readify• Director of White Bear Consulting• Microsoft MVP for .NET• INETA User Group Relations Chair for Asia-Pacific• President of Qld MSDN User Group• President of Qld SQL Server User Group
![Page 4: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/4.jpg)
Agenda
• Barriers to availability• Database server failure or disaster• User or application error• Data access concurrency limitations• Database Partitioning
![Page 5: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/5.jpg)
Barriers to AvailabilityOverview
• Business requirements– Time and location– Processes– Expectations
• Technology– Hardware– DBMS software– Application software
![Page 6: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/6.jpg)
Barriers to Availability Primary Server or DBMS Barriers
• Database failure or disaster– Hardware failure– Human-made disaster– Natural disaster
![Page 7: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/7.jpg)
Barriers to Availability Primary Server or DBMS Barriers
• User or application error– Accidental data modifications– Malicious data modifications
• Data access concurrency limitations– Multiple transactions accessing same data– Persistent data structure changes
![Page 8: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/8.jpg)
Agenda
• Barriers to availability• Database server failure or disaster• User or application error• Data access concurrency limitations• Database Partitioning
![Page 9: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/9.jpg)
Database Server Failure or Disaster Overview
• Failover clustering• Database mirroring• Now many alternatives available
– Peer to peer replication (new)– Standard replication topologies– Log shipping– Backup and restore– Detach, copy, attach
![Page 10: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/10.jpg)
Database Server Failure or Disaster Failover Clustering• Provides a hot standby• Built on Microsoft Cluster Services (MSCS)
– Multiple nodes (Now 8)– Automatic failover of instance (~20 seconds)– Certified hardware required
• Zero committed work loss• Single copy of instance databases• Standby not available for any other use• Supports more SQL services
MS-2087 Implementing Microsoft Windows 2000 Clustering
![Page 11: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/11.jpg)
Database Server Failure or Disaster Failover Clustering
Shared Disk ArrayShared Disk Array
22ndnd Private ‘Heartbeat’ network Private ‘Heartbeat’ network
Clustered ServersClustered Servers
ClientsClientsVirtual ServerVirtual Server
Primary NetworkPrimary Network
![Page 12: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/12.jpg)
Database Server Failure or Disaster Database Mirroring• Provides a hot standby (instant)• Database failover
– Very fast automatic failover (less than 3 seconds)– Transparent client redirect
• Zero committed work loss• Some performance impact• Maximum one mirror for each database• Standby not directly available for any other use
MS-2733 Updating Your Database Administration Skills to Microsoft SQL Server 2005
![Page 13: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/13.jpg)
Database Server Failure or Disaster Database Mirroring Hardware
• No special hardware required– Requires a second server– Servers do not need duplicate hardware
• Virtually no distance limitations– No shared disk arrays– Transaction latency requirements determine acceptable
network latency
MS-2733 Updating Your Database Administration Skills to Microsoft SQL Server 2005
![Page 14: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/14.jpg)
Database Server Failure or Disaster Database Mirroring With Automatic Failover
Separate Disk ArraysSeparate Disk Arrays
Principal ServerPrincipal Server
Mirror ServerMirror Server
ClientsClients
Witness ServerWitness Server
![Page 15: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/15.jpg)
Database Server Failure or Disaster Database Mirroring With Automatic Failover
![Page 16: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/16.jpg)
Configuring and Using a Database Configuring and Using a Database MirrorMirror
demonstrationdemonstration
![Page 17: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/17.jpg)
User or Application Error Comparison of High Availability Options
Feature
Hot Standby Warm Standby Cold Standby
Database Mirroring
Failover Clustering
Peer-to-Peer
Transactional Replication
Log Shipping
Backup /
Restore
Detach / Copy / Attach
Data LossNo data loss
optionNo data loss
Some Data Loss possible
Some data loss possible
Some data loss possible
Some data loss possible
Some data loss
likely
Automatic Failover
Yes Yes Optional No No No No
Transparent to Client
Yes, Auto-Redirect
Yes, Reconnect to
same IPOptional No, NLB helps
No, NLB helps
No No
Downtime
< 3 Seconds20 Sec + DB
RecoveryNone Seconds
Seconds + DB Recovery
Detect, Restore, Manual failover
Detect, Attach, Manual failover
Standby Read Access
Continuously accessible Snapshot
NoContinuously
accessibleContinuously
accessibleIntermittently accessible
No No
![Page 18: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/18.jpg)
User or Application Error Comparison of High Availability Options
Feature
Hot Standby Warm Standby Cold Standby
Database Mirroring
Failover Clustering
Peer-to-Peer Replication
Transactional Replication
Log Shipping
Backup/ Restore
Detach/ Copy/ Attach
Data Granularity
Database Only
All System and User
DatabasesTable or View Table or View
Database Only
Database Only
Database Only
Masks Disk Failure
YesNo, Shared
DiskYes Yes Yes Yes Yes
Special Hardware Needed
No, Dup. system needed
Specialized Hardware from
Cluster HCL
No, Dup. system needed
No, Dup. system needed
No, Dup. system needed
No, Dup. system needed
No, Dup. system needed
Complexity Some More More More More Some Some
![Page 19: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/19.jpg)
Agenda
• Barriers to availability• Database server failure or disaster• User or application error• Data access concurrency limitations• Database Partitioning
![Page 20: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/20.jpg)
User or Application Error Database Snapshots• Read-only• Static view of database• Transaction consistent at point of time• Does not store all data pages• Reads only original data pages
– Reads data from snapshot if data has changed– Reads data from database if data has not changed
• Increases disk I/O of source database
MS-2733 Updating Your Database Administration Skills to Microsoft SQL Server 2005
![Page 21: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/21.jpg)
User or Application Error How Database Snapshots Work
![Page 22: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/22.jpg)
User or Application Error Database Snapshot Scenarios
• Enabling mirroring database for reporting• Historical point-in-time reporting• Recovering from administrative error• Protecting against application or user error
![Page 23: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/23.jpg)
Implementing and Using Database Implementing and Using Database SnapshotsSnapshots
demonstrationdemonstration
![Page 24: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/24.jpg)
Agenda
• Barriers to availability• Database server failure or disaster• User or application error• Data access concurrency limitations• Database Partitioning
![Page 25: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/25.jpg)
Data Access Concurrency Limitations Pessimistic Concurrency Controls
• Default Setting and Behavior• Designed for Data Integrity• SELECT Operations Require Shared Resource Locks• Different Isolation Levels Control Behavior of Shared
Locks
MS-2072 Administering a Microsoft SQL Server 2000 Database
![Page 26: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/26.jpg)
Data Access Concurrency Limitations Optimistic Concurrency Controls
• Optional setting and behavior• Implemented using row versioning• Designed for data integrity but allows reads of
committed data• SELECT operations do not require shared resource
locks• Different isolation levels control behavior of
committed reads
![Page 27: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/27.jpg)
Data Access Concurrency Limitations Row Versioning
• Several Uses– Triggers for Inserted and Deleted tables– Multiple Active Result Sets (MARS) sessions– ONLINE Index Operations– Optimistic concurrency controls (row snapshots)
• Versions built in tempdb for all modified rows• Versions deleted when no remaining transaction or
operation needs them
![Page 28: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/28.jpg)
Data Access Concurrency Limitations Snapshot Isolation Level
• Reads committed data at time of transaction start• ALLOW _SNAPSHOT_ISOLATION database option• TRANSACTION ISOLATION LEVEL SNAPSHOT
session option
![Page 29: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/29.jpg)
Data Access Concurrency Limitations ONLINE Index Operations
• Table accessible for reads and modifications during ONLINE index operations
• Existing non-clustered indexes available to optimize during ONLINE clustered index operations
• Non-clustered index is not available during its index operation
![Page 30: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/30.jpg)
Data Access Concurrency Limitations ONLINE Index Operation Commands
• CREATE INDEX• ALTER INDEX• DROP INDEX• ALTER TABLE
– ADD or DROP of UNIQUE index– ADD or DROP of PRIMARY KEY with CLUSTERED index
option
![Page 31: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/31.jpg)
Agenda
• Barriers to availability• Database server failure or disaster• User or application error• Data access concurrency limitations• Database Partitioning
![Page 32: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/32.jpg)
Database Partitioning
• Designed for:– VLDB with very large tables (ie 100’s GB)– Large systems with 8, 16, 32 or more “real” CPUs
• Replace partitioned views where partitions are in a single database
![Page 33: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/33.jpg)
Database Partitioning
• Partition Function – each row of a table is assigned to a partition (ie 1, 2, 3…)
• Currently only a single column but workaround with persisted calculated columns
• Partition Scheme – each partition for a partition function is mapped to a filegroup
![Page 34: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/34.jpg)
Implementing and Using Database Implementing and Using Database PartitionsPartitions
demonstrationdemonstration
![Page 35: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/35.jpg)
Session Summary
• Several new features available in SQL Server 2005 to protect against server failure
• Database snapshots can be used to protect against application, user, or administrative error
• Use the new optimistic concurrency controls and ONLINE index operations to reduce database contention issues
![Page 36: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/36.jpg)
For More Information
• Visit TechNet at www.microsoft.com/technet
![Page 37: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/37.jpg)
Microsoft LearningTraining Resources for IT Professionals
To see the detailed syllabus or to locate a training providerTo see the detailed syllabus or to locate a training providerplease visitplease visit
www.microsoft.com/learning
Course Title Available
MS-2733 Updating Your Database Administration Skills to Microsoft SQL Server 2005
Now
MS-2734 Updating your Development skills to Microsoft SQL Server 2005 Database
Now
MS-2087 Implementing Microsoft Windows 2000 Clustering
Now
![Page 38: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/38.jpg)
SQL Server 2005 2 Day Workshops
• Microsoft SQL Server 2005 Database Infrastructure & Scalability,
• presented by Brent Challis, DDLS
• Microsoft SQL Server 2005 Business Intelligence,
• presented by Peter Myers. Tenix Connections
• Microsoft SQL Server 2005 Development,• presented by Greg Low, White Bear Consulting
![Page 39: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/39.jpg)
SQL Server 2005 Workshops• Cost $650 and $575 for early birds. • For Schedule, Registration and further
information
– Partners only http://www.microsoft.com/australia/partner/training/
– Customers and Partners: http://www.microsoft.com/australia/events/sql2005 (This page will be available later this month)
![Page 40: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/40.jpg)
SQL Server 2005 Workshops
• Register Now for Yukon Workshops
Microsoft Partner can register for all 3 workshops at www.microsoft.com/australia/partner/training/default.aspx
Microsoft Customers can register for all 3 workshops at• com.au/YukonCusBI
• com.au/YukonCusDev
• com.au/YukonCusAdmin
Workshops run nationally and are scheduled between 7 March and 30 June 2005, places are limited so be quick.
![Page 41: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/41.jpg)
User Community
• SQLServer.org.au (Australian SQL Server User Group)
• Sign up and attend your local user group!• SQL Server 2005 Beta 2 Kit:
– http://msstore.datacom.com.au/sqlbeta– 3 CD/DVDs
• SQL Server 2005 Beta 2• SQL Server 2005 Resource Kit• SQL Server 2005 Presentations (videos)
![Page 42: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/42.jpg)
Code Camp• Code Camp Oz is happening 23/24th April at
Charles Sturt University in Wagga Wagga• Be there!• www.codecampoz.com
![Page 43: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/43.jpg)
The SQL Server 2005 University Masters
•Fully accredited, masters level degree from Charles Sturt University
•SQL Server 2005 MCDBA certification included as an integral component
•Graduates eligible for full professional level membership of the Australian Computing Society
•Part time study delivered via Distance Education
•Qualifies for Government FEE-HELP program
•Places available for experienced applicants without previous qualifications
First intake commences September 2005Register your interest at www.itmasters.info
![Page 44: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/44.jpg)
Where Can I Get Help?• Free chats and webcasts
www.microsoft.com/technet/community/chatswww.microsoft.com/technet/community/webcasts
• List of newsgroupswww.microsoft.com/technet/community/newsgroups
• Microsoft community siteswww.microsoft.com/technet/community
• Community eventswww.microsoft.com/technet/community/events
• Community columnswww.microsoft.com/technet/community/columns
![Page 45: Sql 2005 high availability](https://reader034.fdocuments.net/reader034/viewer/2022051411/545beffcb0af9f9a2c8b45b0/html5/thumbnails/45.jpg)