Real World Sql Azure
Upcoming SlideShare
Loading in...5

Like this? Share it with your network


Real World Sql Azure



Slide deck from MSDN SQL Azure presentation given on March 3, 2010

Slide deck from MSDN SQL Azure presentation given on March 3, 2010



Total Views
Views on SlideShare
Embed Views



1 Embed 22 22



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
  • Fan out queries: where a query can be run against every container in parallel and the results returned and a union-all performed at the client.  This is an important scenario for us and we are looking at how we can make this pattern run effiAuto partitioning. Multi-spindle storage solution. 10 drives look like 1 logical drive.
  • Here is my "current" take: In a pure multi-tenant architecture a single instance of the hosted application is capable of servicing all customers (tenants). Unlike more classical web applications or web services “in the cloud” which behave the same way for each requests, a multi-tenant architecture is designed to allow tenant-specific configurations at the UI (branding), business rules, business processes and data model layers. This is has to be enabled without changing the code as the same code is shared by all tenants, therefore transforming customization of software into configuration of softwre. As you can imagine, this drives the clear need for "metadata driven everything". The other main challenge is being able to co-locate (mingle and “de-mingle”) persistent data of multiple tenants in the same data infrastructure. In other words, the challenge for the multi-tenant application is to behave as if it was fully dedicated to a single tenant but is actually serving all of them in parallel on the same code base. I call this "you are my #1 customer" approach; which means every customer believe they are the #1 customer but in reality they are all served by a talented customer rep.
  • Clustered indexes sort and store the data rows in the table based on their key values. There can only be one clustered index per table, because the data rows themselves can only be sorted in one order. For more information about clustered index architectureWith few exceptions, every table should have a clustered index defined on the column, or columns, that offer the following: Can be used for frequently used queries. Provide a high degree of uniqueness. Can be used in range queries.Distributed Query – reference multiple linked servers and can perform either updae or read operations against each individual linked serverDistributed transactions span two or more servers known as resource managers. The management of the transaction must be coordinated between the resource managers by a server component called a transaction manager.DDL – data definition language statement to create drop or alter mining models and multidimensional objects such as cubes and dimensions
  • Database files can be grouped together in filegroups for allocation and administration purposes. Some systems can improve their performance by controlling the placement of data and indexes onto specific disk drives. Filegroups can aid this process. The system administrator can create filegroups for each disk drive, then assign specific tables, indexes, or the text, ntext, or image data from a table, to specific filegroups.
  •!IEDOTNET_StudyGroups.StudentsSELECT ToCreate DB. Right click, New DatabaseNew TableCREATE TABLE [dbo].[MyTable]( [Id] [int] IDENTITY(1,1) NOT NULL, [FName][nvarchar] (50) NOT NULL, [LName][nvarchar] (50) NOT NULL CONSTRAINT PK_MyTable PRIMARY KEY ([Id] ASC))GO

Real World Sql Azure Presentation Transcript

  • 1. Real World SQL Azure
    …and some other nifty stuff
    James Johnson
    Founder and President, Inland Empire .NET User’s Group
    Microsoft MVP
    e: t:@latringo
  • 2. Founder and President of the Inland Empire .NET User’s Group
    Microsoft MVP, Evangelist, Influencer, Software and Database Architect, Author, Coach, Facilitator, and Mentor
    ADHD/ADD/OCD when it comes to new technology
    Can’t stay away from the shiny new stuff.
    Twitter: @latringo
    Who am I?
  • 3. Familiar SQL Server relational model
    Uses existing APIs & tools
    Friction free provisioning and reduced management
    Built for the Cloud with availability and scale
    Accessible to all from PHP, Ruby, and Java
    What is SQL Azure
  • 4. Maximum single database size is currently 10GB
    Database size calculation
    Includes: primary replica data, objects and indexes
    Does NOT include: logs, master database, system tables, server catalogs or additional replicas
    V1 does not support auto-partitioning or fan-out queries
    Must handle partitioning logic within the application
    Special ConsiderationsDatabase Size
  • 5. Support common application patterns
    Logical/policy based administration
    Patterns work from SQL Server to SQL Azure
    Multi-tenancy considerations
    Throttling and load balancing
    Limits on DB size, transaction duration
    Compatibility Goals
  • 6. Compatibility for V1
    In Scope
    • Tables, indexes and views
    • 7. Requires clustered index
    • 8. Stored Procedures
    • 9. Triggers
    • 10. Constraints
    • 11. Table variables, session temp tables
    Out of Scope
    • Distributed Transactions
    • 12. Distributed Query
    • 13. CLR
    • 14. Service Broker
    • 15. Spatial
    • 16. Physical server or catalog DDL and views
  • Constants
    Index management and rebuilding indexes
    Local temporary tables
    Reserved keywords
    Stored procedures
    Statistics management
    Supported T-SQL (v1)
    • Triggers
    • 17. Tables, joins, and table vars
    • 18. T-SQL elements
    • 19. Create/drop databases
    • 20. Create/alter/drop tables
    • 21. Create/alter/drop users and logins
  • Unsupported T-SQL (v1)
    Database file placement
    Database mirroring
    Distributed queries
    Distributed transactions
    Filegroup management
    Full Text Search
    • Global temporary tables
    • 23. Spatial data and indexes
    • 24. SQL Server configuration options
    • 25. SQL Server Service Broker
    • 26. System tables
    • 27. Trace Flags
  • Connect via ADO.NET, ODBC, etc.
    OLE DB is NOT supported
    May need to include <login>@<server>
    Use familiar tools (sqlcmd, osql, SSMS, etc)
    Current version of SSMS is not fully supported but it works
    SSMS 2008 R2 CTP has connection capability
    Connecting to SQL Azure
  • 28. Connecting to SQL Azure with SSMS 2008 R2
  • 29. Since SQL Azure supports only a subset of features, some modifications need to be made
    Migrating an existing schema
    • User Defined Data Types
    • 30. Specifying Filegroups
    • 31. Extended Properties
    • 32. USE DATABASE
    • 34. Various Index options
    • 35. Windows logins
    • 36. Unsupported XML features
    • 37. Indices need to be clustered
    • 38. Full list at
    • 39.
  • Generating, then modifying, the SQL script
  • 40. The SQL team is working on the issue
    In the meantime…
    SQL Azure Migration Wizard
    Ugh… that wasn’t pretty
  • 41. Using SQL Azure Migration Wizard
  • 42. Questions
  • 43. James Johnson
    Twitter: @latringo
    Don’t forget to tip your wait staff
    Thank you