Sql azure federations
Upcoming SlideShare
Loading in...5

Like this? Share it with your network


Sql azure federations






Total Views
Views on SlideShare
Embed Views



2 Embeds 15

http://tuladev.net 11
http://www.tuladev.net 4



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

Sql azure federations Presentation Transcript

  • 1. Scaling DB with SQL Azure Federations Alexander Koval Codemasters International Software Architect, MCPD
  • 2. Presentation Summary• Intended Audience: Developers, Architects• Intended Time: 60 min• Objectives: 1. Review Scaling concepts for DB 2. Introduce SQL Azure Federations 3. Managing Azure Federations 4. Billing & Pricing 5. Tools & Libraries
  • 3. Problem Areas Response Time DB Transactions DB Size
  • 4. Scaling the DB layerScaling UP Table PartitioningMaster/Slave Scaling OUT (Sharding)Cluster Computing App Server #1 DB1 App Server #2 DB1 App Server #3 DB1 App Server #3 DB1
  • 5. What is a SQL Azure Federation? F Federation e Member #1 d e r Federation User Database a Member #2 t i Federation o Member #3 n
  • 6. Terminology1. Federation2. Federation Key (UNIQUEIDENTIFIER, INT, BIGINT, VARBINARY) CREATE FEDERATION Tenant_Fed (id INT RANGE)3. Federation Member Federation Members4. Atomic Unit Federation Root5. Table Data • Federation Root Central Federated • Federation Tables Tables Tables • Reference Tables Reference • Central Tables Tables
  • 7. Create Federation TableCREATE TABLE [dbo].[TenantDocuments]( [ID] [int] NOT NULL, [TenantID] [int] NOT NULL, [Title] [varchar](50) NOT NULL, CONSTRAINT [PK_Account] PRIMARY KEY CLUSTERED( [ID] ASC, [TenantID] ASC)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF))FEDERATED ON (TID = TenantID)GO
  • 8. DEMO
  • 9. Management of Azure Federations ALTER FEDERATION Tenant_Fed SPLIT AT (TenantId=10) My DB Accounts_FedALTER FEDERATION federation_name{ SPLIT AT (distribution_name = boundary_value)| DROP AT ([LOW|HIGH] distribution_name =boundary_value)}[;]
  • 10. Management of Azure Federations
  • 11. Monitoring and Metadata Federation Operation Views sys.dm_federation_operations sys.dm_federation_operation_members sys.dm_federation_operations_errors sys.dm_federation_operation_error_members Federation Operation Views Federation Metadata Tablessys.federation_history sys.federationssys.federation_member_history sys.federation_memberssys.federation_distribution_history sys.federation_distributionssys.federation_member_distributions sys.federation_member_distributions sys.federated_table_columns
  • 12. DEMO
  • 13. Billing ModelPrinciples:• DB Charges are prorated to a day. Example: Cost of 1Gb Web edition is $0.33/day• All DB that exist in the day are charged• Only DB that are in ready state are chargedOperations which affect Billing:• Federation Creation• Federation Repartitioning Operations• Modification of Federation Billing propertiesALTER DATABASE database_name {MODIFY (<edition_options> [, ..n])}<edition_options> ::= {(MAXSIZE = {1|5|10|20|30|40|50|100|150} GB)| (EDITION = {web | business})} [;]
  • 14. Tools & Libraries for Scaling DB• Azure Federation Migration Wizard http://sqlazurefedmw.codeplex.com/• Enzo SQL Shard http://enzosqlshard.codeplex.com/• CloudNinja http://cloudninja.codeplex.com/• Multi-tenant SQL Azure Federation Sample http://shard.codeplex.com/
  • 15. Resources• DB Sharding http://www.codefutures.com/database-sharding/• MSDN: Federations in SQL Azure http://msdn.microsoft.com/en-us/library/windowsazure/hh597452.aspx• Federation Statements http://msdn.microsoft.com/en-us/library/windowsazure/hh597463.aspx• Federation Guidelines and Limitations http://msdn.microsoft.com/en-us/library/windowsazure/hh597469.aspx• Blog http://www.codemastersintl.com/Blogs/Alexander-Koval• Email akoval@codemastersintl.com
  • 16. Questions?