Real World Sql Azure

1,254 views

Published on

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

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,254
On SlideShare
0
From Embeds
0
Number of Embeds
24
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • 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.http://blogs.msdn.com/gianpaolo/archive/2006/02/26/539717.aspx
  • 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.
  • mw1c22vaga.database.windows.netjamesLatringo09!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

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

    ×