Your SlideShare is downloading. ×
  • Like
Sql azure federations
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Sql azure federations



Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads


Total Views
On SlideShare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide


  • 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• Enzo SQL Shard• CloudNinja• Multi-tenant SQL Azure Federation Sample
  • 15. Resources• DB Sharding• MSDN: Federations in SQL Azure• Federation Statements• Federation Guidelines and Limitations• Blog• Email
  • 16. Questions?