SlideShare uma empresa Scribd logo
1 de 46
Top 5 Things Developers Should Know @
                 SQL Azure
        By Ike Ellis
        http://www.ellisteam.net
        @ike_ellis
        ike@ellisteam.net
        P: 619.922.9801
Before the Dragons
Quick Demo: How to Sign Up
• Free Accounts
   – BizSpark
   – MSDN Subscription
   – 30 day trial
     • Bing SQL Azure 30 day trial….there are coupons and
       instructions.
     • Look on the SQL Azure Team Blog
  – Remember: Microsoft wants you to use this,
    there’s a way to try it for free…
Architecture
Before the Dragons: Architecture -
Logical/Physical Databases/Servers
Dragon #1: The ConnectionString
Your SQL Server




    Your
    App



Change Connection String
                           SQL Azure
5 Things Make Up a Connection String

• What are they?
5 Things Make Up a Connection String

• What are they?
  – UserName
  – Password
  – Database(Catalog)
  – ServerName
  – ProviderName
#1 ConnectionString


<add name="FlashcardEntities"
connectionString="metadata=res://*/Models.FlashcardData.csdl|res://*/Models.FlashcardData.ss
dl|res://*/Models.FlashcardData.msl;provider=System.Data.SqlClient;provider connection
string=&quot
;Data Source=etnejn2aev.database.windows.net;Initial Catalog=flashcards;Integrated
Security=False;
User ID=***(username@servername);Password=*******;
MultipleActiveResultSets=True
;Encrypt=True(negotiated)
;TrustServerCertificate=False&quot;" providerName="System.Data.EntityClient" />
Connection Providers
• Use ADO.NET, ODBC, PHP (NOT OLE DB)
   – Client libraries pre-installed in Azure roles
   – Support for ASP.NET controls
• Clients connect directly to a database
   – Cannot hop across DBs (no USE)
   – May need to include <login>@<server>
   – Use familiar tools (sqlcmd, osql, SSMS, etc)
   – Use connection pooling for efficiency
• SSMS 2008 R2 can connect
   – http://blogs.msdn.com/ssds/archive/2009/11/11/9921041.aspx
• SSRS, SSIS, SSAS can all connect to SQL Azure using the right
  provider.
Typical ADO.NET Connection.Open()
try
{

      using (SqlConnection conn = new SqlConnection(sqlConnectionString))

       {

            using (SqlCommand cmd = new SqlCommand(sqlStatement, conn))

      {

                  conn.Open();
                        using (SqlDataReader dr = cmd.ExecuteReader())

      {

                        while (dr.Read())

                        {


                       }

                 }

           }

     }

}
catch (SqlException ex)

{

      SxpLog.WriteSqlException(ex, "some", "other", "data");

}
New Connection.Open())

string sqlContext = string.empty;
try
{

        using (SqlConnection conn = new SqlConnection(sqlConnectionString))

         {

               using (SqlCommand cmd = new SqlCommand(sqlStatement, conn))

               {

                      sqlContext = GetSqlContextInfo(conn);
                            using (SqlDataReader dr = cmd.ExecuteReader())

                      {

                            while (dr.Read())

                            {

                             }

                      }

               }

        }

}
catch (SqlException ex)

{

         SxpLog.WriteSqlException(ex, sqlContext, "some", "other", "data");

}
GetSqlContextInfo
•   http://blogs.msdn.com/b/bartr/archive/2010/06/18/sql-azure-connection-
    retry.aspx?utm_source=feedburner&utm_medium=twitter&utm_campaign=Feed:+Microsoft/MSDN-
    Blogs+(MSDN+Blogs)
Dragon #2: Throttling, Disaster Recovery, &
            Some New Errors
Throttling
Throttling
• Throttling Service
   – Protects a machine from sustained high usage of
     system resources
   – Evaluate actual resource usage vs. safe thresholds
     real-time
   – Throttle the busiest days first

• Throttling shows as connection error 40501
   – The service is currently busy. Retry the request after
     10 seconds…
• Needs Decoding
Throttling Scenario #1
• Customer A uses 30% of the CPU on the server
• Customer B comes in and starts using 70% of the
  CPU on the server
• Customer B triggers the throttling event
• Customer B gets throttled
Throttling Scenario #2
• Customer B uses 70% of the CPU on the server
• Customer A comes in and uses 30% of the CPU on
  the server
• Customer A triggers the throttling event
• Customer B gets throttled
Throttling Class – Trace Young
• http://social.technet.microsoft.com/wiki/contents/ar
  ticles/sql-azure-performance-and-elasticity-
  guide.aspx#Code_Sample_Decoding_SQL_Azure_Rea
  son_Codes
Another Reason We Need Retry Code =
Disaster Recovery/Database Replicas
Dragon #2: Some New Errors
1.   40550 - Session has been terminated because it has acquired too many locks. Try reading or
     modifying fewer rows in a single transaction. (Greater than 1,000,000 locks)

2.   40551 - Session has been terminated because of excessive TempDB Usage(TempDB is only
     allowed to be 5GB in size)

3.   40552 - Session used too much of the transaction log. try modifying fewer rows in a single
     transaction. (Transaction consuming excessive log resources are terminated. The max
     permitted log size for a single transaction is 1GB)

4.   40544 - Database reached it's max size. Switched to read-only

5.   40553 - Session is terminated because of excessive memory usage. (Where there is memory
     contention, sessions consuming greater than 16MB for more than 20 seconds are terminated in
     the descending order of time the resource has been held)

6.   40549 - Session is terminated because of a long running transaction (SQL Azure kills all
     transactions after 24 hours.)

7.   40501 The service is currently busy. Retry the request after 10 seconds. Code: %d (SQL Azure
     might terminate the transactions and disconnect the sessions when the CPU utilization,
     input/output I/O latency, and the number of busy workers exceed thresholds.
Dragon #3: Tooling



• SQL Azure Database Manager
   – Silverlight Tool
• SSMS 2008 R2
   – Standard Tool
Dragon #4: DB Migration

•   SSIS
•   BCP
•   SSMS – Generate Scripts
•   DEMO: SQL Azure Migration Wizard
Dragon #5: Performance Tuning

•   Let’s get this out of the way – What we don’t have:
•   no sql error log
•   no sql profiler
•   no pssdiag
•   no bpa (best practices analyzer)
•   no xevent
•   no server side network capture
•   no mps reports(microsoft product support reports)
•   Only some DMVs
SQL Azure Performance Guide
1) Missing Indexes or better indexes
      1) Use DMVs
      2) Use Query Plans
2) Covering indexes for the WHERE clause
3) Can sorting be done on the client?
4) Minimize round trips
5) Limit records (paging)
6) Use Connection Pooling (open connection late, close them early)
7) Retry Logic (wait 10 seconds and then retry)
8) Catch errors and understand that when azure throws an error, the tran rollback
9) Caching and batching - evaluate caching and batching to limit round-trips to the server
10) avoid latency - choose a data center nearest to your location
11) Trace connections - traced connections using context_info() to troubleshoot connectivity issues
12) CALL SUPPORT
What I Didn’t Cover, But You Might
Want to Research
•   Pricing
•   Included/Excluded Features
•   Product Roadmap
•   SQL Azure Reporting
• Backup/Restore Options
• SQL Azure Data Sync
• SQL Azure Odata
• Future Differences Between Editions
Good Resources
•   SQL Azure Team Blog & Twitter
      – http://blogs.msdn.com/b/sqlazure/
      – Twitter: @sqlazure
•   Inside SQL Azure – Kalen Delaney
      – http://social.technet.microsoft.com/wiki/contents/articles/inside-sql-azure.aspx
•   SQL Azure & Entity Framework – Julie Lerman
      – http://msdn.microsoft.com/en-us/magazine/gg309181.aspx
      – Doesn’t cover the retry issue.
•   My Site – Ike Ellis
      – http://www.ellisteam.net
      – Twitter: @ike_ellis
•   .NET ROCKS – SQL Azure Migration Wizard – December, 2009
      – http://www.dotnetrocks.com/default.aspx?showNum=512
•   Scott Klein & Herve Rogerro Book
      – http://www.amazon.com/Pro-Azure-Experts-Voice-
          NET/dp/1430229616/ref=sr_1_1?ie=UTF8&qid=1297792245&sr=8-1
•   MY O’REILLY BOOK IS COMING THIS SPRING!
      – Yes, it has an animal cover.
Red Gate Tools for SQL Azure
• SQL Compare
• SQL Data Compare
• SQL Azure Backup
DBA role places more focus on logical management
• SQL Azure focus on logical administration
   – Schema creation and management
   – Query optimization
   – Security management (Logins, Users, Roles)
• Service handles physical management
   – Automatically replicated with HA “out of box”
   – Transparent failover in case of failure
   – Load balancing of data to ensure SLA
Database Backup Today = Full Copy
Backup / Restore – Database Copy
• CREATE DATABASE TechBio2 AS COPY OF servername.
  TechBio
• Select * from sys.dm_database_copies
• No point in time
Hope for the Future
Until Then
• Red-Gate has a tool
   – No Point In Time Restore
   – Brings the database on-premise! And Restores
     from on-premise!
Contact Ike
•   Email: ike@ellisteam.net
•   Twitter: @ike_ellis
•   Website: http://www.ellisteam.net
•   Phone: 619.922.9801
•   User Group: http://www.sdtig.com
•   DevelopMentor Courses: http://www.develop.com

Mais conteúdo relacionado

Mais procurados

Dynamic SQL: How to Build Fast Multi-Parameter Stored Procedures
Dynamic SQL: How to Build Fast Multi-Parameter Stored ProceduresDynamic SQL: How to Build Fast Multi-Parameter Stored Procedures
Dynamic SQL: How to Build Fast Multi-Parameter Stored ProceduresBrent Ozar
 
SQL Server ASYNC_NETWORK_IO Wait Type Explained
SQL Server ASYNC_NETWORK_IO Wait Type ExplainedSQL Server ASYNC_NETWORK_IO Wait Type Explained
SQL Server ASYNC_NETWORK_IO Wait Type ExplainedConfio Software
 
MongoDB Performance Tuning
MongoDB Performance TuningMongoDB Performance Tuning
MongoDB Performance TuningMongoDB
 
SQL Server Wait Types Everyone Should Know
SQL Server Wait Types Everyone Should KnowSQL Server Wait Types Everyone Should Know
SQL Server Wait Types Everyone Should KnowDean Richards
 
Row level security in enterprise applications
Row level security in enterprise applicationsRow level security in enterprise applications
Row level security in enterprise applicationsAlexander Tokarev
 
Groovy concurrency
Groovy concurrencyGroovy concurrency
Groovy concurrencyAlex Miller
 
Caching In The Cloud
Caching In The CloudCaching In The Cloud
Caching In The CloudAlex Miller
 
High-Performance Hibernate - JDK.io 2018
High-Performance Hibernate - JDK.io 2018High-Performance Hibernate - JDK.io 2018
High-Performance Hibernate - JDK.io 2018Vlad Mihalcea
 
Cassandra Day Atlanta 2015: Building Your First Application with Apache Cassa...
Cassandra Day Atlanta 2015: Building Your First Application with Apache Cassa...Cassandra Day Atlanta 2015: Building Your First Application with Apache Cassa...
Cassandra Day Atlanta 2015: Building Your First Application with Apache Cassa...DataStax Academy
 
JPA and Hibernate Performance Tips
JPA and Hibernate Performance TipsJPA and Hibernate Performance Tips
JPA and Hibernate Performance TipsVlad Mihalcea
 
Midwest PHP Presentation - New MSQL Features
Midwest PHP Presentation - New MSQL FeaturesMidwest PHP Presentation - New MSQL Features
Midwest PHP Presentation - New MSQL FeaturesDave Stokes
 
Open Source World June '21 -- JSON Within a Relational Database
Open Source World June '21 -- JSON Within a Relational DatabaseOpen Source World June '21 -- JSON Within a Relational Database
Open Source World June '21 -- JSON Within a Relational DatabaseDave Stokes
 
Python SQite3 database Tutorial | SQlite Database
Python SQite3 database Tutorial | SQlite DatabasePython SQite3 database Tutorial | SQlite Database
Python SQite3 database Tutorial | SQlite DatabaseElangovanTechNotesET
 
Qtp connect to an oracle database database - database skill
Qtp connect to an oracle database   database - database skillQtp connect to an oracle database   database - database skill
Qtp connect to an oracle database database - database skillsiva1991
 
High Performance Hibernate JavaZone 2016
High Performance Hibernate JavaZone 2016High Performance Hibernate JavaZone 2016
High Performance Hibernate JavaZone 2016Vlad Mihalcea
 
Confoo 2021 -- MySQL New Features
Confoo 2021 -- MySQL New FeaturesConfoo 2021 -- MySQL New Features
Confoo 2021 -- MySQL New FeaturesDave Stokes
 
CocoaHeads PDX 2014 01 23 : CoreData and iCloud Improvements iOS7 / OSX Maver...
CocoaHeads PDX 2014 01 23 : CoreData and iCloud Improvements iOS7 / OSX Maver...CocoaHeads PDX 2014 01 23 : CoreData and iCloud Improvements iOS7 / OSX Maver...
CocoaHeads PDX 2014 01 23 : CoreData and iCloud Improvements iOS7 / OSX Maver...smn-automate
 

Mais procurados (20)

Dynamic SQL: How to Build Fast Multi-Parameter Stored Procedures
Dynamic SQL: How to Build Fast Multi-Parameter Stored ProceduresDynamic SQL: How to Build Fast Multi-Parameter Stored Procedures
Dynamic SQL: How to Build Fast Multi-Parameter Stored Procedures
 
SQLite 3
SQLite 3SQLite 3
SQLite 3
 
SQL Server ASYNC_NETWORK_IO Wait Type Explained
SQL Server ASYNC_NETWORK_IO Wait Type ExplainedSQL Server ASYNC_NETWORK_IO Wait Type Explained
SQL Server ASYNC_NETWORK_IO Wait Type Explained
 
CDI 2.0 Deep Dive
CDI 2.0 Deep DiveCDI 2.0 Deep Dive
CDI 2.0 Deep Dive
 
MySQL JSON Functions
MySQL JSON FunctionsMySQL JSON Functions
MySQL JSON Functions
 
MongoDB Performance Tuning
MongoDB Performance TuningMongoDB Performance Tuning
MongoDB Performance Tuning
 
SQL Server Wait Types Everyone Should Know
SQL Server Wait Types Everyone Should KnowSQL Server Wait Types Everyone Should Know
SQL Server Wait Types Everyone Should Know
 
Row level security in enterprise applications
Row level security in enterprise applicationsRow level security in enterprise applications
Row level security in enterprise applications
 
Groovy concurrency
Groovy concurrencyGroovy concurrency
Groovy concurrency
 
Caching In The Cloud
Caching In The CloudCaching In The Cloud
Caching In The Cloud
 
High-Performance Hibernate - JDK.io 2018
High-Performance Hibernate - JDK.io 2018High-Performance Hibernate - JDK.io 2018
High-Performance Hibernate - JDK.io 2018
 
Cassandra Day Atlanta 2015: Building Your First Application with Apache Cassa...
Cassandra Day Atlanta 2015: Building Your First Application with Apache Cassa...Cassandra Day Atlanta 2015: Building Your First Application with Apache Cassa...
Cassandra Day Atlanta 2015: Building Your First Application with Apache Cassa...
 
JPA and Hibernate Performance Tips
JPA and Hibernate Performance TipsJPA and Hibernate Performance Tips
JPA and Hibernate Performance Tips
 
Midwest PHP Presentation - New MSQL Features
Midwest PHP Presentation - New MSQL FeaturesMidwest PHP Presentation - New MSQL Features
Midwest PHP Presentation - New MSQL Features
 
Open Source World June '21 -- JSON Within a Relational Database
Open Source World June '21 -- JSON Within a Relational DatabaseOpen Source World June '21 -- JSON Within a Relational Database
Open Source World June '21 -- JSON Within a Relational Database
 
Python SQite3 database Tutorial | SQlite Database
Python SQite3 database Tutorial | SQlite DatabasePython SQite3 database Tutorial | SQlite Database
Python SQite3 database Tutorial | SQlite Database
 
Qtp connect to an oracle database database - database skill
Qtp connect to an oracle database   database - database skillQtp connect to an oracle database   database - database skill
Qtp connect to an oracle database database - database skill
 
High Performance Hibernate JavaZone 2016
High Performance Hibernate JavaZone 2016High Performance Hibernate JavaZone 2016
High Performance Hibernate JavaZone 2016
 
Confoo 2021 -- MySQL New Features
Confoo 2021 -- MySQL New FeaturesConfoo 2021 -- MySQL New Features
Confoo 2021 -- MySQL New Features
 
CocoaHeads PDX 2014 01 23 : CoreData and iCloud Improvements iOS7 / OSX Maver...
CocoaHeads PDX 2014 01 23 : CoreData and iCloud Improvements iOS7 / OSX Maver...CocoaHeads PDX 2014 01 23 : CoreData and iCloud Improvements iOS7 / OSX Maver...
CocoaHeads PDX 2014 01 23 : CoreData and iCloud Improvements iOS7 / OSX Maver...
 

Destaque

iPad Development Slides #ilta12
iPad Development Slides #ilta12iPad Development Slides #ilta12
iPad Development Slides #ilta12Ike Ellis
 
SQL Pass Architecture SQL Tips & Tricks
SQL Pass Architecture SQL Tips & TricksSQL Pass Architecture SQL Tips & Tricks
SQL Pass Architecture SQL Tips & TricksIke Ellis
 
SQL Server Tips & Tricks
SQL Server Tips & TricksSQL Server Tips & Tricks
SQL Server Tips & TricksIke Ellis
 
Kedi story 2009 10
Kedi story 2009 10Kedi story 2009 10
Kedi story 2009 10kedi school
 
CGMA: Elevating the Finance Function
CGMA: Elevating the Finance FunctionCGMA: Elevating the Finance Function
CGMA: Elevating the Finance FunctionKen Witt
 
Fake presentation
Fake presentationFake presentation
Fake presentationsgunterrn
 

Destaque (6)

iPad Development Slides #ilta12
iPad Development Slides #ilta12iPad Development Slides #ilta12
iPad Development Slides #ilta12
 
SQL Pass Architecture SQL Tips & Tricks
SQL Pass Architecture SQL Tips & TricksSQL Pass Architecture SQL Tips & Tricks
SQL Pass Architecture SQL Tips & Tricks
 
SQL Server Tips & Tricks
SQL Server Tips & TricksSQL Server Tips & Tricks
SQL Server Tips & Tricks
 
Kedi story 2009 10
Kedi story 2009 10Kedi story 2009 10
Kedi story 2009 10
 
CGMA: Elevating the Finance Function
CGMA: Elevating the Finance FunctionCGMA: Elevating the Finance Function
CGMA: Elevating the Finance Function
 
Fake presentation
Fake presentationFake presentation
Fake presentation
 

Semelhante a Top 5 Things Developers Should Know About SQL Azure

High Throughput Analytics with Cassandra & Azure
High Throughput Analytics with Cassandra & AzureHigh Throughput Analytics with Cassandra & Azure
High Throughput Analytics with Cassandra & AzureDataStax Academy
 
Best Practices for Building Robust Data Platform with Apache Spark and Delta
Best Practices for Building Robust Data Platform with Apache Spark and DeltaBest Practices for Building Robust Data Platform with Apache Spark and Delta
Best Practices for Building Robust Data Platform with Apache Spark and DeltaDatabricks
 
JoTechies - Azure SQL DB
JoTechies - Azure SQL DBJoTechies - Azure SQL DB
JoTechies - Azure SQL DBJoTechies
 
Scalable relational database with SQL Azure
Scalable relational database with SQL AzureScalable relational database with SQL Azure
Scalable relational database with SQL AzureShy Engelberg
 
Spark Summit EU talk by Mike Percy
Spark Summit EU talk by Mike PercySpark Summit EU talk by Mike Percy
Spark Summit EU talk by Mike PercySpark Summit
 
Cloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure toolsCloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure toolsPushkar Chivate
 
Scaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersScaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersoazabir
 
OracleStore: A Highly Performant RawStore Implementation for Hive Metastore
OracleStore: A Highly Performant RawStore Implementation for Hive MetastoreOracleStore: A Highly Performant RawStore Implementation for Hive Metastore
OracleStore: A Highly Performant RawStore Implementation for Hive MetastoreDataWorks Summit
 
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsZohar Elkayam
 
PowerUpSQL - 2018 Blackhat USA Arsenal Presentation
PowerUpSQL - 2018 Blackhat USA Arsenal PresentationPowerUpSQL - 2018 Blackhat USA Arsenal Presentation
PowerUpSQL - 2018 Blackhat USA Arsenal PresentationScott Sutherland
 
Taking SharePoint to the Cloud
Taking SharePoint to the CloudTaking SharePoint to the Cloud
Taking SharePoint to the CloudAaron Saikovski
 
Microservices, Continuous Delivery, and Elasticsearch at Capital One
Microservices, Continuous Delivery, and Elasticsearch at Capital OneMicroservices, Continuous Delivery, and Elasticsearch at Capital One
Microservices, Continuous Delivery, and Elasticsearch at Capital OneNoriaki Tatsumi
 
World2016_T5_S5_SQLServerFunctionalOverview
World2016_T5_S5_SQLServerFunctionalOverviewWorld2016_T5_S5_SQLServerFunctionalOverview
World2016_T5_S5_SQLServerFunctionalOverviewFarah Omer
 
Escalabilidad horizontal y Arquitecturas elásticas en Windows Azure | SolidQ ...
Escalabilidad horizontal y Arquitecturas elásticas en Windows Azure | SolidQ ...Escalabilidad horizontal y Arquitecturas elásticas en Windows Azure | SolidQ ...
Escalabilidad horizontal y Arquitecturas elásticas en Windows Azure | SolidQ ...SolidQ
 
Practical Approach towards SQLi ppt
Practical Approach towards SQLi pptPractical Approach towards SQLi ppt
Practical Approach towards SQLi pptAhamed Saleem
 
Migrating on premises workload to azure sql database
Migrating on premises workload to azure sql databaseMigrating on premises workload to azure sql database
Migrating on premises workload to azure sql databasePARIKSHIT SAVJANI
 

Semelhante a Top 5 Things Developers Should Know About SQL Azure (20)

High Throughput Analytics with Cassandra & Azure
High Throughput Analytics with Cassandra & AzureHigh Throughput Analytics with Cassandra & Azure
High Throughput Analytics with Cassandra & Azure
 
Dapper performance
Dapper performanceDapper performance
Dapper performance
 
Best Practices for Building Robust Data Platform with Apache Spark and Delta
Best Practices for Building Robust Data Platform with Apache Spark and DeltaBest Practices for Building Robust Data Platform with Apache Spark and Delta
Best Practices for Building Robust Data Platform with Apache Spark and Delta
 
Orms vs Micro-ORMs
Orms vs Micro-ORMsOrms vs Micro-ORMs
Orms vs Micro-ORMs
 
JoTechies - Azure SQL DB
JoTechies - Azure SQL DBJoTechies - Azure SQL DB
JoTechies - Azure SQL DB
 
Scalable relational database with SQL Azure
Scalable relational database with SQL AzureScalable relational database with SQL Azure
Scalable relational database with SQL Azure
 
Snowflake Datawarehouse Architecturing
Snowflake Datawarehouse ArchitecturingSnowflake Datawarehouse Architecturing
Snowflake Datawarehouse Architecturing
 
Spark Summit EU talk by Mike Percy
Spark Summit EU talk by Mike PercySpark Summit EU talk by Mike Percy
Spark Summit EU talk by Mike Percy
 
Cloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure toolsCloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure tools
 
Scaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersScaling asp.net websites to millions of users
Scaling asp.net websites to millions of users
 
OracleStore: A Highly Performant RawStore Implementation for Hive Metastore
OracleStore: A Highly Performant RawStore Implementation for Hive MetastoreOracleStore: A Highly Performant RawStore Implementation for Hive Metastore
OracleStore: A Highly Performant RawStore Implementation for Hive Metastore
 
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
 
PowerUpSQL - 2018 Blackhat USA Arsenal Presentation
PowerUpSQL - 2018 Blackhat USA Arsenal PresentationPowerUpSQL - 2018 Blackhat USA Arsenal Presentation
PowerUpSQL - 2018 Blackhat USA Arsenal Presentation
 
Taking SharePoint to the Cloud
Taking SharePoint to the CloudTaking SharePoint to the Cloud
Taking SharePoint to the Cloud
 
Microservices, Continuous Delivery, and Elasticsearch at Capital One
Microservices, Continuous Delivery, and Elasticsearch at Capital OneMicroservices, Continuous Delivery, and Elasticsearch at Capital One
Microservices, Continuous Delivery, and Elasticsearch at Capital One
 
World2016_T5_S5_SQLServerFunctionalOverview
World2016_T5_S5_SQLServerFunctionalOverviewWorld2016_T5_S5_SQLServerFunctionalOverview
World2016_T5_S5_SQLServerFunctionalOverview
 
SQL Server Clustering Part1
SQL Server Clustering Part1SQL Server Clustering Part1
SQL Server Clustering Part1
 
Escalabilidad horizontal y Arquitecturas elásticas en Windows Azure | SolidQ ...
Escalabilidad horizontal y Arquitecturas elásticas en Windows Azure | SolidQ ...Escalabilidad horizontal y Arquitecturas elásticas en Windows Azure | SolidQ ...
Escalabilidad horizontal y Arquitecturas elásticas en Windows Azure | SolidQ ...
 
Practical Approach towards SQLi ppt
Practical Approach towards SQLi pptPractical Approach towards SQLi ppt
Practical Approach towards SQLi ppt
 
Migrating on premises workload to azure sql database
Migrating on premises workload to azure sql databaseMigrating on premises workload to azure sql database
Migrating on premises workload to azure sql database
 

Mais de Ike Ellis

Storytelling with Data with Power BI
Storytelling with Data with Power BIStorytelling with Data with Power BI
Storytelling with Data with Power BIIke Ellis
 
Storytelling with Data with Power BI.pptx
Storytelling with Data with Power BI.pptxStorytelling with Data with Power BI.pptx
Storytelling with Data with Power BI.pptxIke Ellis
 
Build a modern data platform.pptx
Build a modern data platform.pptxBuild a modern data platform.pptx
Build a modern data platform.pptxIke Ellis
 
Data Modeling on Azure for Analytics
Data Modeling on Azure for AnalyticsData Modeling on Azure for Analytics
Data Modeling on Azure for AnalyticsIke Ellis
 
Migrate a successful transactional database to azure
Migrate a successful transactional database to azureMigrate a successful transactional database to azure
Migrate a successful transactional database to azureIke Ellis
 
Data modeling trends for analytics
Data modeling trends for analyticsData modeling trends for analytics
Data modeling trends for analyticsIke Ellis
 
Data modeling trends for Analytics
Data modeling trends for AnalyticsData modeling trends for Analytics
Data modeling trends for AnalyticsIke Ellis
 
Relational data modeling trends for transactional applications
Relational data modeling trends for transactional applicationsRelational data modeling trends for transactional applications
Relational data modeling trends for transactional applicationsIke Ellis
 
Power bi premium
Power bi premiumPower bi premium
Power bi premiumIke Ellis
 
Move a successful onpremise oltp application to the cloud
Move a successful onpremise oltp application to the cloudMove a successful onpremise oltp application to the cloud
Move a successful onpremise oltp application to the cloudIke Ellis
 
Azure Databricks is Easier Than You Think
Azure Databricks is Easier Than You ThinkAzure Databricks is Easier Than You Think
Azure Databricks is Easier Than You ThinkIke Ellis
 
Pass 2018 introduction to dax
Pass 2018 introduction to daxPass 2018 introduction to dax
Pass 2018 introduction to daxIke Ellis
 
Pass the Power BI Exam
Pass the Power BI ExamPass the Power BI Exam
Pass the Power BI ExamIke Ellis
 
Slides for PUG 2018 - DAX CALCULATE
Slides for PUG 2018 - DAX CALCULATESlides for PUG 2018 - DAX CALCULATE
Slides for PUG 2018 - DAX CALCULATEIke Ellis
 
Introduction to DAX
Introduction to DAXIntroduction to DAX
Introduction to DAXIke Ellis
 
60 reporting tips in 60 minutes - SQLBits 2018
60 reporting tips in 60 minutes - SQLBits 201860 reporting tips in 60 minutes - SQLBits 2018
60 reporting tips in 60 minutes - SQLBits 2018Ike Ellis
 
14 Habits of Great SQL Developers
14 Habits of Great SQL Developers14 Habits of Great SQL Developers
14 Habits of Great SQL DevelopersIke Ellis
 
14 Habits of Great SQL Developers
14 Habits of Great SQL Developers14 Habits of Great SQL Developers
14 Habits of Great SQL DevelopersIke Ellis
 
Dive Into Azure Data Lake - PASS 2017
Dive Into Azure Data Lake - PASS 2017Dive Into Azure Data Lake - PASS 2017
Dive Into Azure Data Lake - PASS 2017Ike Ellis
 
A lap around microsofts business intelligence platform
A lap around microsofts business intelligence platformA lap around microsofts business intelligence platform
A lap around microsofts business intelligence platformIke Ellis
 

Mais de Ike Ellis (20)

Storytelling with Data with Power BI
Storytelling with Data with Power BIStorytelling with Data with Power BI
Storytelling with Data with Power BI
 
Storytelling with Data with Power BI.pptx
Storytelling with Data with Power BI.pptxStorytelling with Data with Power BI.pptx
Storytelling with Data with Power BI.pptx
 
Build a modern data platform.pptx
Build a modern data platform.pptxBuild a modern data platform.pptx
Build a modern data platform.pptx
 
Data Modeling on Azure for Analytics
Data Modeling on Azure for AnalyticsData Modeling on Azure for Analytics
Data Modeling on Azure for Analytics
 
Migrate a successful transactional database to azure
Migrate a successful transactional database to azureMigrate a successful transactional database to azure
Migrate a successful transactional database to azure
 
Data modeling trends for analytics
Data modeling trends for analyticsData modeling trends for analytics
Data modeling trends for analytics
 
Data modeling trends for Analytics
Data modeling trends for AnalyticsData modeling trends for Analytics
Data modeling trends for Analytics
 
Relational data modeling trends for transactional applications
Relational data modeling trends for transactional applicationsRelational data modeling trends for transactional applications
Relational data modeling trends for transactional applications
 
Power bi premium
Power bi premiumPower bi premium
Power bi premium
 
Move a successful onpremise oltp application to the cloud
Move a successful onpremise oltp application to the cloudMove a successful onpremise oltp application to the cloud
Move a successful onpremise oltp application to the cloud
 
Azure Databricks is Easier Than You Think
Azure Databricks is Easier Than You ThinkAzure Databricks is Easier Than You Think
Azure Databricks is Easier Than You Think
 
Pass 2018 introduction to dax
Pass 2018 introduction to daxPass 2018 introduction to dax
Pass 2018 introduction to dax
 
Pass the Power BI Exam
Pass the Power BI ExamPass the Power BI Exam
Pass the Power BI Exam
 
Slides for PUG 2018 - DAX CALCULATE
Slides for PUG 2018 - DAX CALCULATESlides for PUG 2018 - DAX CALCULATE
Slides for PUG 2018 - DAX CALCULATE
 
Introduction to DAX
Introduction to DAXIntroduction to DAX
Introduction to DAX
 
60 reporting tips in 60 minutes - SQLBits 2018
60 reporting tips in 60 minutes - SQLBits 201860 reporting tips in 60 minutes - SQLBits 2018
60 reporting tips in 60 minutes - SQLBits 2018
 
14 Habits of Great SQL Developers
14 Habits of Great SQL Developers14 Habits of Great SQL Developers
14 Habits of Great SQL Developers
 
14 Habits of Great SQL Developers
14 Habits of Great SQL Developers14 Habits of Great SQL Developers
14 Habits of Great SQL Developers
 
Dive Into Azure Data Lake - PASS 2017
Dive Into Azure Data Lake - PASS 2017Dive Into Azure Data Lake - PASS 2017
Dive Into Azure Data Lake - PASS 2017
 
A lap around microsofts business intelligence platform
A lap around microsofts business intelligence platformA lap around microsofts business intelligence platform
A lap around microsofts business intelligence platform
 

Último

Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 

Último (20)

Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 

Top 5 Things Developers Should Know About SQL Azure

  • 1. Top 5 Things Developers Should Know @ SQL Azure By Ike Ellis http://www.ellisteam.net @ike_ellis ike@ellisteam.net P: 619.922.9801
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13. Before the Dragons Quick Demo: How to Sign Up • Free Accounts – BizSpark – MSDN Subscription – 30 day trial • Bing SQL Azure 30 day trial….there are coupons and instructions. • Look on the SQL Azure Team Blog – Remember: Microsoft wants you to use this, there’s a way to try it for free…
  • 15. Before the Dragons: Architecture - Logical/Physical Databases/Servers
  • 16. Dragon #1: The ConnectionString
  • 17. Your SQL Server Your App Change Connection String SQL Azure
  • 18. 5 Things Make Up a Connection String • What are they?
  • 19. 5 Things Make Up a Connection String • What are they? – UserName – Password – Database(Catalog) – ServerName – ProviderName
  • 20. #1 ConnectionString <add name="FlashcardEntities" connectionString="metadata=res://*/Models.FlashcardData.csdl|res://*/Models.FlashcardData.ss dl|res://*/Models.FlashcardData.msl;provider=System.Data.SqlClient;provider connection string=&quot ;Data Source=etnejn2aev.database.windows.net;Initial Catalog=flashcards;Integrated Security=False; User ID=***(username@servername);Password=*******; MultipleActiveResultSets=True ;Encrypt=True(negotiated) ;TrustServerCertificate=False&quot;" providerName="System.Data.EntityClient" />
  • 21. Connection Providers • Use ADO.NET, ODBC, PHP (NOT OLE DB) – Client libraries pre-installed in Azure roles – Support for ASP.NET controls • Clients connect directly to a database – Cannot hop across DBs (no USE) – May need to include <login>@<server> – Use familiar tools (sqlcmd, osql, SSMS, etc) – Use connection pooling for efficiency • SSMS 2008 R2 can connect – http://blogs.msdn.com/ssds/archive/2009/11/11/9921041.aspx • SSRS, SSIS, SSAS can all connect to SQL Azure using the right provider.
  • 22. Typical ADO.NET Connection.Open() try
{
 using (SqlConnection conn = new SqlConnection(sqlConnectionString))
 {
 using (SqlCommand cmd = new SqlCommand(sqlStatement, conn))
 {
 conn.Open(); using (SqlDataReader dr = cmd.ExecuteReader())
 {
 while (dr.Read())
 {
 }
 }
 }
 }
 } catch (SqlException ex)
 {
 SxpLog.WriteSqlException(ex, "some", "other", "data");
 }
  • 23. New Connection.Open()) string sqlContext = string.empty; try
{
 using (SqlConnection conn = new SqlConnection(sqlConnectionString))
 {
 using (SqlCommand cmd = new SqlCommand(sqlStatement, conn))
 {
 sqlContext = GetSqlContextInfo(conn); using (SqlDataReader dr = cmd.ExecuteReader())
 {
 while (dr.Read())
 {
 }
 }
 }
 }
 } catch (SqlException ex)
 {
 SxpLog.WriteSqlException(ex, sqlContext, "some", "other", "data");
 }
  • 24. GetSqlContextInfo • http://blogs.msdn.com/b/bartr/archive/2010/06/18/sql-azure-connection- retry.aspx?utm_source=feedburner&utm_medium=twitter&utm_campaign=Feed:+Microsoft/MSDN- Blogs+(MSDN+Blogs)
  • 25. Dragon #2: Throttling, Disaster Recovery, & Some New Errors
  • 27. Throttling • Throttling Service – Protects a machine from sustained high usage of system resources – Evaluate actual resource usage vs. safe thresholds real-time – Throttle the busiest days first • Throttling shows as connection error 40501 – The service is currently busy. Retry the request after 10 seconds… • Needs Decoding
  • 28. Throttling Scenario #1 • Customer A uses 30% of the CPU on the server • Customer B comes in and starts using 70% of the CPU on the server • Customer B triggers the throttling event • Customer B gets throttled
  • 29. Throttling Scenario #2 • Customer B uses 70% of the CPU on the server • Customer A comes in and uses 30% of the CPU on the server • Customer A triggers the throttling event • Customer B gets throttled
  • 30.
  • 31. Throttling Class – Trace Young • http://social.technet.microsoft.com/wiki/contents/ar ticles/sql-azure-performance-and-elasticity- guide.aspx#Code_Sample_Decoding_SQL_Azure_Rea son_Codes
  • 32. Another Reason We Need Retry Code = Disaster Recovery/Database Replicas
  • 33. Dragon #2: Some New Errors 1. 40550 - Session has been terminated because it has acquired too many locks. Try reading or modifying fewer rows in a single transaction. (Greater than 1,000,000 locks) 2. 40551 - Session has been terminated because of excessive TempDB Usage(TempDB is only allowed to be 5GB in size) 3. 40552 - Session used too much of the transaction log. try modifying fewer rows in a single transaction. (Transaction consuming excessive log resources are terminated. The max permitted log size for a single transaction is 1GB) 4. 40544 - Database reached it's max size. Switched to read-only 5. 40553 - Session is terminated because of excessive memory usage. (Where there is memory contention, sessions consuming greater than 16MB for more than 20 seconds are terminated in the descending order of time the resource has been held) 6. 40549 - Session is terminated because of a long running transaction (SQL Azure kills all transactions after 24 hours.) 7. 40501 The service is currently busy. Retry the request after 10 seconds. Code: %d (SQL Azure might terminate the transactions and disconnect the sessions when the CPU utilization, input/output I/O latency, and the number of busy workers exceed thresholds.
  • 34. Dragon #3: Tooling • SQL Azure Database Manager – Silverlight Tool • SSMS 2008 R2 – Standard Tool
  • 35. Dragon #4: DB Migration • SSIS • BCP • SSMS – Generate Scripts • DEMO: SQL Azure Migration Wizard
  • 36. Dragon #5: Performance Tuning • Let’s get this out of the way – What we don’t have: • no sql error log • no sql profiler • no pssdiag • no bpa (best practices analyzer) • no xevent • no server side network capture • no mps reports(microsoft product support reports) • Only some DMVs
  • 37. SQL Azure Performance Guide 1) Missing Indexes or better indexes 1) Use DMVs 2) Use Query Plans 2) Covering indexes for the WHERE clause 3) Can sorting be done on the client? 4) Minimize round trips 5) Limit records (paging) 6) Use Connection Pooling (open connection late, close them early) 7) Retry Logic (wait 10 seconds and then retry) 8) Catch errors and understand that when azure throws an error, the tran rollback 9) Caching and batching - evaluate caching and batching to limit round-trips to the server 10) avoid latency - choose a data center nearest to your location 11) Trace connections - traced connections using context_info() to troubleshoot connectivity issues 12) CALL SUPPORT
  • 38. What I Didn’t Cover, But You Might Want to Research • Pricing • Included/Excluded Features • Product Roadmap • SQL Azure Reporting • Backup/Restore Options • SQL Azure Data Sync • SQL Azure Odata • Future Differences Between Editions
  • 39. Good Resources • SQL Azure Team Blog & Twitter – http://blogs.msdn.com/b/sqlazure/ – Twitter: @sqlazure • Inside SQL Azure – Kalen Delaney – http://social.technet.microsoft.com/wiki/contents/articles/inside-sql-azure.aspx • SQL Azure & Entity Framework – Julie Lerman – http://msdn.microsoft.com/en-us/magazine/gg309181.aspx – Doesn’t cover the retry issue. • My Site – Ike Ellis – http://www.ellisteam.net – Twitter: @ike_ellis • .NET ROCKS – SQL Azure Migration Wizard – December, 2009 – http://www.dotnetrocks.com/default.aspx?showNum=512 • Scott Klein & Herve Rogerro Book – http://www.amazon.com/Pro-Azure-Experts-Voice- NET/dp/1430229616/ref=sr_1_1?ie=UTF8&qid=1297792245&sr=8-1 • MY O’REILLY BOOK IS COMING THIS SPRING! – Yes, it has an animal cover.
  • 40. Red Gate Tools for SQL Azure • SQL Compare • SQL Data Compare • SQL Azure Backup
  • 41. DBA role places more focus on logical management • SQL Azure focus on logical administration – Schema creation and management – Query optimization – Security management (Logins, Users, Roles) • Service handles physical management – Automatically replicated with HA “out of box” – Transparent failover in case of failure – Load balancing of data to ensure SLA
  • 42. Database Backup Today = Full Copy
  • 43. Backup / Restore – Database Copy • CREATE DATABASE TechBio2 AS COPY OF servername. TechBio • Select * from sys.dm_database_copies • No point in time
  • 44. Hope for the Future
  • 45. Until Then • Red-Gate has a tool – No Point In Time Restore – Brings the database on-premise! And Restores from on-premise!
  • 46. Contact Ike • Email: ike@ellisteam.net • Twitter: @ike_ellis • Website: http://www.ellisteam.net • Phone: 619.922.9801 • User Group: http://www.sdtig.com • DevelopMentor Courses: http://www.develop.com

Notas do Editor

  1. This is you
  2. You are very good looking.
  3. You are sailing safely on the waters of an ON PREMISE SQL SERVER….You know these waters…and they are comfortable.
  4. What’s that up ahead?
  5. It’s a cloud! A SQL Azure Cloud! And it look unavoidable…yet fun! You decide to consult your map, to learn more about what might be in that cloud.
  6. That dragon on the map looks scary!
  7. But when you look closer at the real dragon, you find that it’s not so scary…in fact, kind of harmless….