#sqlsat454 October 10, 2015 Implementing and maintaining an Azure SQL Database project Emanuele thinkit.it –

Slides:



Advertisements
Similar presentations
Database Throughput Unit – DTU Monitoring % of current Performance Level Utilization 75% Read 50% Write CPU 60% Memory (coming) Compute Writes.
Advertisements

Week 6: Chapter 6 Agenda Automation of SQL Server tasks using: SQL Server Agent Scheduling Scripting Technologies.
Ken Casada Technical Evangelist Microsoft Switzerland What’s new in Microsoft Azure.
Amazon RDS (MySQL and Oracle) and SQL Azure Emil Tabakov Telerik Software Academy academy.telerik.com.
AGENDA Tools used in SQL Server 2000 Graphical BOL Enterprise Manager Service Manager CLI Query Analyzer OSQL BCP.
Week 5 – Chap. 5 Data Transfer DBAs often must transfer data to and from text files, Excel spreadsheets, Access, Oracle or other SQL Server databases This.
Sitefinity Performance and Architecture
Manage & Configure SQL Database on the Cloud Haishi Bai Technical Evangelist Microsoft.
XVII Encontro – 29/11/2011. Virgílio Esteves ID&T – Research & Founder of NetPonto Coimbra C# / WPF / Silverlight / XNA / Azure.
Chapter 10 : Designing a SQL Server 2005 Solution for High Availability MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design.
Maintaining a Microsoft SQL Server 2008 Database SQLServer-Training.com.
Windows Azure SQL Database and SQL Reporting for Developers Dr Greg Low Principal Mentor – SQL Down Under AZR221.
Sofia, Bulgaria | 9-10 October SQL Server 2005 High Availability for developers Vladimir Tchalkov Crossroad Ltd. Vladimir Tchalkov Crossroad Ltd.
Your First Azure Application Michael Stiefel Reliable Software, Inc.
1 SQL Server 2000 Administration Kashef Mughal MSB.
Chokchai Junchey Microsoft Product Specialist Certified Technical Training Center.
SQLintersection Session SQL37 SQL Server 2012 Availability Groups Aaron Bertrand
Learningcomputer.com SQL Server 2008 – Administration, Maintenance and Job Automation.
Module 13 Implementing Business Continuity. Module Overview Protecting and Recovering Content Working with Backup and Restore for Disaster Recovery Implementing.
1 Chapter Overview Preparing to Upgrade Performing a Version Upgrade from Microsoft SQL Server 7.0 Performing an Online Database Upgrade from SQL Server.
SQL School is strongly committed to provide COMPLETE PRACTICAL REALTIME Trainings on SQL Server Technologies – Dev, SQL DBA, MSBI (SSIS, SSAS, SSRS) and.
Hosting Websites and Web Applications with Microsoft ® SQL Server ® 2008.
Text Microsoft to Or Tweet #uktechdays Questions?
COS308. SQL Azure Database DEMO.
Course Topics Administering SQL Server 2012 Jump Start 01 | Install and Configure SQL Server04 | Manage Data 02 | Maintain Instances and Databases05 |
Migrating Data to SQL Azure Arunraj Chandrasekaran Twitter June 21, 2011.
Technology Drill Down: Windows Azure Platform Eric Nelson | ISV Application Architect | Microsoft UK |
SQL Server 2012 Session: 1 Session: 4 SQL Azure Data Management Using Microsoft SQL Server.
Page 1 Programming SQL Azure Database Jeff Chu |
Miss a User Group meeting? Forget something that you learned? Want to see content from a User Group not in your area? Want to share with a buddy? We.
Log Shipping, Mirroring, Replication and Clustering Which should I use? That depends on a few questions we must ask the user. We will go over these questions.
Introduction to SQL Server  Working with MS SQL Server and SQL Server Management Studio.
Azure 101 – Where do I start? Andrew Nakamura Keck Medical Center - USC
Azure SQL Database Lori Clark SQL Saturday 10/17/2015.
Putting Your Head in the Cloud Working with SQL Azure David Postlethwaite 19/09/2015David Postlethwaite.
Scaling out and in with Azure SQL DB Elastic Scale DBA-203 Warner Chaves, MCM/MVP, SQLTurbo.com, Pythian.com.
SQL Server as a Cloud Service November 11th 2015 Warner Chaves SQL MVP/MCM.
SQL Advanced Monitoring Using DMV, Extended Events and Service Broker Javier Villegas – DBA | MCP | MCTS.
Configuring SQL Server for a successful SharePoint Server Deployment Haaron Gonzalez Solution Architect & Consultant Microsoft MVP SharePoint Server
Jeremy Kingry, eBECS | ADVANCED SQL SERVER FOR ADMINS AND ANALYSTS.
FUN WITH AVAILABILITY GROUPS Christopher Wolff SQL Server Database Engineer, Xero.
Putting Your Head in the Cloud Working with SQL Azure David Postlethwaite 18/06/2016David Postlethwaite.
SQL Server as a Cloud Service April 15th 2016 Warner Chaves Data Platform MVP/SQL Server MCM.
Microsoft Dynamics NAV Dynamics NAV 2016 one Azure SQL Dmitry Chadayev Microsoft.
Peter Lu Copyright 2016 Developing SQL Database in Azure Peter Lu.Net Practices Director Principle Architect Nexient April 29th 2016.
#sqlsatPordenone #sqlsat495 February 27, 2016 Elastic Database, going to the infinity * Emanuele thinkit.it –
Migrating to Azure SQL Database Tips, Tricks and Lessons Learned
Managing a database environment in the cloud
Backups for Azure SQL Databases and SQL Server instances running on Azure Virtual Machines Session on backup to Azure feature (manual and managed) in SQL.
Use relational database as a service
State of Azure SQL Database
Migrating to Azure SQL Database: Tips, Tricks, and Lessons Learned
How to tune your applications before moving your database to Microsoft Azure SQL Database (MASD) OK, you've jumped into your Azure journey by creating.
Azure SQL Databases - Introduction and Migration
Lead SQL BankofAmerica Blog: SQLHarry.com
Implementing and maintaining an Azure SQL Database project
Example of a page header
04 – Azure SQL Database Bret Stateham | Senior Technical Evangelist​
Developing an app for SharePoint autohosted in Azure
Implementing and maintaining an Azure SQL Database project
Elastic Database, going to the infinity *
Understanding Azure SQL DB Service Tiers
Cloud Data Replication with SQL Data Sync
AlwaysOn Availability Groups
5 Azure Services Every .NET Developer Needs to Know
Disaster Recovery Done Dirt Cheap Founder Curnutt Data Solutions
DEV2DEV Performance tips for faster SQL queries
06 | SQL Server and the Cloud
The Database World of Azure
Presentation transcript:

#sqlsat454 October 10, 2015 Implementing and maintaining an Azure SQL Database project Emanuele thinkit.it – an evergreen session

#sqlsat454 October 10, 2015 Sponsors

#sqlsat454 October 10, 2015 Speaker info – Emanuele Zanchettin  10+ years of experience  data architect and consultant about SQLServer and Azure SQL Database  analyst and software developer using.NET  coordinator of resources and IT projects  Speaker about SQLServer and Azure SQL Database technologies  CEO and co-founder thinkIT Certificated company ISO 9001:2008 (Quality) and ISO/IEC :2011 (IT Services)  –

#sqlsat454 October 10, 2015 About you After a great lunch, time for a long sleep.. ??? Are you awake?  Try to raise your hand  Try to clap your hands How many people are using … (raise your hand)  SQL Server?  Azure SQL Database?  SS Management Studio?  MS Visual Studio?

#sqlsat454 October 10, 2015 Agenda Infrastructure overview Responsible choosing Project Scenarios First publication Publication of revision Backup and restore strategies Service Level Agreement (SLA) and Objective (SLO)

#sqlsat454 October 10, 2015 Some features of SQL Database Basis haven’t changed … +/-

#sqlsat454 October 10, 2015 SQLDatabase inside – High Availability Logic DatabaseDatabase 2 nd physic db 3 rd physic db 1 st physic db Multiple copies redundant automatic and automatic failover, optimized availability

#sqlsat454 October 10, 2015 Data partitioning - Scalability Scale-out Horizontal partitioning Vertical Partitioning Scale-up Idval Idval Idval Database bigger dbmore dbs Elastic scale (ex. app multi-tenant)

#sqlsat454 October 10, 2015 Conclusions Scale-up  All right Vertical Partitioning  External foreign keys, between databases, not permitted  You can not have transactions between databases Even using Microsoft Distributed Transaction Coordinator (MDTC client side)  Scale-out or horizontal partitioning  Embedded in Azure  Schema design  Developing and troubleshooting are little bit hard   Elastic Scale … was Federation …

#sqlsat454 October 10, 2015 Other conclusions  Service evolution t f (x) start 6 months ago 2 days ago tomorrow? today

#sqlsat454 October 10, 2015 Hard to belive? Try to calculate the price

#sqlsat454 October 10, 2015 The choice, conscious Service Tier Performance Level Common App Pattern PerformanceBusiness Continuity Max DB Size Transaction Perf. Objective DTUPITRDR / GEO- Rep Basic Small DB, SQL opp 2 GB Reliability / Hr. 5 7 Days DB Copy + Manual Export Standard S0 S1 S2 S3 Wrkgp/cloud app, multiple concurrent operations 250 GB Reliability / Min Days DB Copy + Manual Export Premium P1 P2 P4 P6 Mission Critical, High volume, Many concurrent Users 500 GB Reliability / sec Days Active Geo- replication P111TB1750

#sqlsat454 October 10, 2015 Save money at every cost  First benchmark: B vs S0, 1kk rows SQL Server Execution Times CPU time = 672 ms elapsed time = ms. (8’ 3”) ( row(s) affected) SQL Server Execution Times CPU time = 891 ms elapsed time = ms. (4’ 20”) ( row(s) affected) B 5DTU S0 10DTU

#sqlsat454 October 10, 2015 Save money at every cost  Last benchmark: B vs S0, 20kk rows The service has encountered an error processing your request. Please retry again. Error code SQL Server Execution Times CPU time = ms elapsed time = ms. (4h 57’) ( row(s) affected) B 5DTU S0 10DTU the transaction log becomes full

#sqlsat454 October 10, 2015  Last benchmark: B, 5*4kk rows Save money at every cost SQL Server Execution Times CPU time = 4078 ms, elapsed time = ms. (1h 21’) CPU time = 3719 ms, elapsed time = ms. (1h 21’) CPU time = 4234 ms, elapsed time = ms. (1h 21’) CPU time = 5578 ms, elapsed time = ms. (1h 21’) (5h 26’) ( row(s) affected) B 5DTU S0 was 4h 57’ S0 was 4h 57’

#sqlsat454 October 10, 2015 Evolution from Federation to Elastic Scale The Azure SQL Database Federations feature is being retired along with the Web/Business editions in September 2015 (Cit.)

#sqlsat454 October 10, 2015 Shard Map  Two types of Shard Map  Range: intervals contiguous elements  List: list of values Four types of keys  INT  BIGINT  GUID  VARBINARY

#sqlsat454 October 10, 2015 Split/Merge scenario Some comands –CreateShard –DeleteShard –CreateRangeMapping –CreatePointMapping –DeleteMapping –UpdateMapping –MarkMappingOffline –MarkMappingOnline KeyShard Location 1Database_A 3Database_B 4Database_C 6Database_B... Key RangeShard Location [1, 50)Database_A [50, 100)Database_B [100, 200)Database_C [400, 600)Database_C...

#sqlsat454 October 10, 2015 Premium Easy to understand Vertical: Scale-up or scale-down Horizontal: Scale-out or scale-in Basic Standard Basic Premium Standard Scale out/in Scale up/down

#sqlsat454 October 10, 2015 Go … What’s your case?

#sqlsat454 October 10, 2015 Migrating existing project all on cloud on premise + cloud (hybrid)

#sqlsat454 October 10, 2015 New project all on cloud

#sqlsat454 October 10, 2015 Upgrading project V2 > V12 SQL V2 SQL V12 easy* Upgrading this server to the latest SQL Database Update is permanent and irreversible. To confirm the upgrade, type the name of the server ‘pluto' below. The duration of upgrade ranges from several hours to days depending on the size, edition and number of databases in the server. During this time all databases on this server will remain online but server and database management actions will be restricted. This release does not currently support some features that may be used by your application. Please review the list carefully before continuing with the upgrade. *

#sqlsat454 October 10, 2015 Privacy Policy In Italy is called Law 196/2003 “Sensitive Personal Information” means personal information that reveals race, ethnic origin, sexual orientation, political opinions, religious or philosophical beliefs, trade union membership or that concerns an individual’s health. Authorization needed

#sqlsat454 October 10, 2015 First publishing Are you ready to do this?

#sqlsat454 October 10, 2015 Migration tools  Schema and data SQL Server Migration Assistant (SSMA)  from Oracle, Sybase, MySQL and Access SQL Server Management Studio (SSMS)  from SQL Server 2012 using.bacpac package  SQL Database Migration Wizard (CodePlex)  SQL Server 2008 R2 SP1 (v3x), SQL Server 2012 (v4x), SQL Server 2014 (v5x)  Only data  bcp, SSMS, SQL Data Sync, SSIS  Only schema SQL Server Data Tools  from Microsoft Visual Studio 2012  VS2013  from SQL Server 2012 using.dacpac package  2014+

#sqlsat454 October 10, 2015 A migration real case Tool: Migrate Data di SQL Server Migration Assistant for MySQL Quantity: 6 tables, 9KK rows, 520MB size Times: 26’ 30’’ parallel upload, fiber 10Mbit/s

#sqlsat454 October 10, 2015 DEMO SQL Server Database migration

#sqlsat454 October 10, 2015 Conclusions  Features limits (Updated: March 27, 2015) Collation of system objects, Connection related (Endpoint statements, ORIGINAL_DB_NAME. Windows authentication is not available for logins or contained database users ), Cross database queries, cross database ownership chaining, TRUSTWORTHY setting, Data Collector, Database Diagrams, Database Mail, DATABASEPROPERTY (use DATABASEPROPERTYEX instead), Distributed transactions, EXECUTE AS logins, Encryption: extensible key management, Eventing (events, event notifications, query notifications), Features related to database file (placement, size, and database files which are automatically managed by Microsoft Azure), Features that relate to high availability which is managed through your Microsoft Azure account (backup, restore, AlwaysOn, database mirroring, log shipping, recovery modes), Features that rely upon the log reader (Replication, Change Data Capture), Features that rely upon the SQL Server Agent or the MSDB database (jobs, alerts, operators, Policy-Based Management, database mail, central management servers), FILESTREAM, Functions (fn_get_sql, fn_virtualfilestats, fn_virtualservernodes), Global temporary tables, Hardware related server settings (memory, worker threads, CPU affinity, trace flags, etc. Use service levels instead.), HAS_DBACCESS, KILL STATS JOB, Linked servers (OPENQUERY, OPENROWSET, OPENDATASOURCE, BULK INSERT, 3 and 4 part names), Master/target servers, Resource governor, Semantic search, Server credentials, Sever-level items (Server roles, IS_SRVROLEMEMBER, sys.login_token. Server level permissions are not available though some are replaced by database-level permissions. Some server-level DMV's are not available though some are replaced by database- level DMV's), Serverless express (localdb, user instance), Service broker, SET REMOTE_PROC_TRANSACTIONS, SHUTDOWN, sp_addmessage, sp_configure options and RECONFIGURE, SQL Server audit (use SQL Database auditing instead), SQL Server Profiler, SQL Server trace, Trace flags, Transact-SQL debugging, Triggers (Server-scoped or logon triggers), USE statement  Documentation available online

#sqlsat454 October 10, 2015 Update publishing And now?

#sqlsat454 October 10, 2015 Managing schema and data  Managing environments of test and production  Plan an undo step  Changing schema and data SQL Server Management Studio (SSMS)  from SQL Server 2012 using.bacpac package  SQL Database Migration Wizard (CodePlex)  SQL Server 2008 R2 SP1 (v3x), SQL Server 2012 (v4x), SQL Server 2014 (v5x)  Changing only data  bcp, SSMS, SQL Data Sync, SSIS  Changing only schema  Microsoft Visual Studio 2012  SQL Server Management Studio

#sqlsat454 October 10, 2015 Tool: Custom Console Program.NET fw 4.5 with Task Parallel Library (TPL) Elastic Scale roles Int key Range value [1-6) [6-12) [12-18) [18-24) 4 databases B Quantity: 3 tables, 8,6KK rows, 490MB size Times: 8’ 34’’, fiber 10Mbit/s An elastic scale upload real case was 26’ 30’’ was 26’ 30’’

#sqlsat454 October 10, 2015 DEMO Have fun with Elastic Scale

#sqlsat454 October 10, 2015 Conclusions  DBA, Data Architect and developers, do not quarrel amongst yourselves  “Scaling” before reaching the limit  Chosing a step-by-step publication  Plans before starting

#sqlsat454 October 10, 2015 Backup and restore strategies Don’t forget it!

#sqlsat454 October 10, 2015 Who does what?  SQL Azure periodical at least 7 days “as a safe guard against catastrophic software and system failures” !!!! Backup Full weekly, Differential daily, Transaction Log avery 5’ History 7d (B), 14d (S), 35d (P) Point in Time Restore, Restoring a Deleted Database, Geo-Restore  User’s error (Business Continuity) Using SQL Data Sync (backup offline/remoto) Copy Database (CREATE DATABASE [destination] AS COPY OF [source]) Import/Export Service (Azure BLOB storage needed, auto in preview) Group/Agent of synchronization Azure (SQLDataSyncAgent only x86  )  Plans before starting

#sqlsat454 October 10, 2015 Service Level Agreement (SLA) Guarantees on the service provided?

#sqlsat454 October 10, 2015 SLA  99,99% (B, S, P)  Monthly, calculated over a minute of inactivity >= 1 minute  Limit of subscription  Credit card without money  Over quota  DTU (Database Throughput Units)  Upgrade / Downgrade of Service tier

#sqlsat454 October 10, 2015 Service Level Objective (SLO) Guarantees on your service provided?

#sqlsat454 October 10, 2015 SLO  “the evil formula” on changing Service tier 3 x (5 minutes + database size / 150 MB/minute) Ex. 3 x (5 minutes + 50 GB x 1024 MB/GB / 150 MB/minute) ≈ 17 hours SLO > SLA  (  )SLO == SLA  SLO < SLA

#sqlsat454 October 10, 2015 Links  Migration from federation to elastic scale azure.microsoft.com/en-us/documentation/articles/sql- database-elastic-scale-federation-migration/ azure.microsoft.com/en-us/documentation/articles/sql- database-elastic-scale-federation-migration/  Azure SQL Database Elastic Scale Ch9 channel9.msdn.com/Shows/Data-Exposed/Azure-SQL- Database-Elastic-Scale channel9.msdn.com/Shows/Data-Exposed/Azure-SQL- Database-Elastic-Scale  SQL Database Service Level Agreement (SLA)  SQL Database pricing

#sqlsat454 October 10, 2015 Links  SQL Server Migration Assistant (SSMA) blogs.msdn.com/b/ssma/  Guidelines and Limitations (Windows Azure SQL Database) msdn.microsoft.com/en-us/library/windowsazure/ff aspx  Known SQL Data Sync (Preview) Limits msdn.microsoft.com/en-us/library/jj aspx  Azure SQL Database Backup and Restore msdn.microsoft.com/en-us/library/azure/jj aspx

#sqlsat454 October 10, 2015 Q&A  Questions?

#sqlsat454 October 10, 2015 THANKS! You can clap your hands now and don’t forget to put your feedback at THANKS! #sqlsat454