understanding sql azure

31
Understanding SQL Azure Name Title Microsoft Corporation

Upload: adli

Post on 23-Mar-2016

89 views

Category:

Documents


7 download

DESCRIPTION

Understanding SQL Azure. Name Title Microsoft Corporation. Agenda. Starting with the Basics Build and Deploy your Database Secure your Database Exploring Advanced Capabilities. Starting with the Basics. Start With the Basics. SQL Azure Database is - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Understanding  SQL  Azure

Understanding SQL AzureNameTitleMicrosoft Corporation

Page 2: Understanding  SQL  Azure

Agenda

Starting with the BasicsBuild and Deploy your DatabaseSecure your DatabaseExploring Advanced

Capabilities

Page 3: Understanding  SQL  Azure

Starting with the Basics

Page 4: Understanding  SQL  Azure

Start With the BasicsSQL Azure Database isSQL Server database technology delivered as a service on the Windows Azure PlatformIdeal for both simple and complex applicationsEnterprise-ready with automatic support for HADesigned to scale out elastically with demand

Get started quicklyChoose a planChoose a billing optionProvision servers

Ready to get started?Let’s jump into development

Page 5: Understanding  SQL  Azure

Provision Your ServerServer definedService head that contains databasesConnect via automatically generated FQDN (xxx.database.windows.net)Initially contains only a master database

Provision servers interactivelyLog on to Windows Azure Management PortalCreate a SQL Azure serverSpecify admin login credentialsAdd firewall rules and enable service access

Automate server provisioningUse Windows Azure Platform PowerShell cmdlets (or use REST API directly)wappowershell.codeplex.com

Page 6: Understanding  SQL  Azure

Creating a SQL Azure DB

demo

Page 7: Understanding  SQL  Azure

Build and Deploy your Database

Page 8: Understanding  SQL  Azure

Build Your DatabaseUse familiar technologiesSupports Transact-SQLSupports popular languages

.NET Framework (C#, Visual Basic, F#) via ADO.NETC / C++ via ODBCJava via Microsoft JDBC providerPHP via Microsoft PHP provider

Supports popular frameworksOData, Entity Framework, WCF Data Services, NHibernate

Supports popular toolsSQL Server Management Studio (2008 R2 and later)SQL Server command-line utilities (SQLCMD, BCP)CA Erwin® Data ModelerEmbarcadero Technologies DBArtisan®

Differences in comparison to SQL Server Focus on logical vs. physical administrationDatabase and log files automatically placedThree high-availability replicas maintained for every databaseDatabases are fully containedTables require a clustered indexMaximum database size is 50 Gb

Unsupported SQL Server featuresBACKUP / RESTOREUSE command, linked servers, distributed transactions, distributed views, distributed queries, four-part namesService BrokerCommon Language Runtime (CLR)SQL Agent

Page 9: Understanding  SQL  Azure

Build Your DatabaseThin client database developmentIntroducing the SQL Azure management portalWeb designers for tables, views, stored procsInteractive query editing and execution

Rich client database developmentIntroducing SQL Server Data Tools (SSDT)Visual Studio IDE for database developmentIncludes modern designers and projects with declarative, model-driven developmentDevelop and test in both connected and disconnected statesPlatform targeting for both SQL Server (2005 and above) and SQL AzureGet it free with Web PI, with SQL Server 2012 and with Visual Studio 11

Page 10: Understanding  SQL  Azure

Deploy Your DatabaseData-tier Application Framework (DAC Fx)Alternative to traditional script based approachDramatically simplifies deployment, migration and versioning of databasesProvides a single unit of deployment for schema (dacpac) or for schema + data (bacpac)Supports automatic versioning of database schemasSupports platform targeting for both SQL Server (2005 and above)

and SQL AzureBuild from scratch or extract from existing db

How to get the latest DAC FxWith SQL Server Data ToolsWith SQL Server 2012 Management StudioWith SQL Azure Import/Export ServiceVia sqldacexamples.codeplex.com

Page 11: Understanding  SQL  Azure

Deploy Your DatabaseInteractive approach for dacpac v1 and v2Manage your server with SQL Azure Management PortalDeploy dacpacLoad data (scripts, bulk copy, SSIS)Also supported in SQL Server 2012 Management Studio

Interactive approach for bacpac v2Upload bacpac to blob storageLog into Windows Azure Management PortalImport bacpac, table data automatically loadedAlso supports export to blob storage

Upgrading a dacpac or bacpacNot supported in portals yetUse SQL Server 2012 Management Studio

Page 12: Understanding  SQL  Azure

DAC deployment from Visual Studio

demo

Page 13: Understanding  SQL  Azure

Secure your Database

Page 14: Understanding  SQL  Azure

There are two ways to secure a database:

Within the Database

On the Server

Page 15: Understanding  SQL  Azure

BenefitsServer identity and access controlSQL authentication supported Integrated authentication not supportedConnect to master to administer logins and create / drop databasesThe admin login (configured during service provisioning) is like saThe admin login has full rights on the server (and all databases) and should only be used for administrationManage logins with CREATE / ALTER / DROP LOGIN commandsMembership in the loginmanager server role grants CREATE / ALTER / DROP LOGIN privilegesMembership in the dbmanager server role grants CREATE / DROP DATABASE privileges

Page 16: Understanding  SQL  Azure

BenefitsDatabase identity and access controlLogins must have an associated user account to connect to a databaseThe admin login is automatically associated with a special user known as dbo (database owner)The dbo has full rights in the database and should only be used for administrationManage users with CREATE / ALTER / DROP USER commandsAdd users to system or user-defined database roles to grant privileges via sp_add_rolememberOrganize database objects into schema containers based upon common access control requirementsGrant privileges to schema containers instead of individual objects for better productivity

Page 17: Understanding  SQL  Azure

Connect Your ApplicationConnecting to SQL Azure1. TDS (Tabular Data Stream) protocol over TCP/IP

supported2. SSL required3. Use firewall rules to connect from outside Microsoft

data centerASP.NET EXAMPLE:

Special considerations1. Legacy tools and providers may require special

format for login: [login]@[server]2. Idle connections terminated after 30 minutes3. Long running transactions terminated after 24 hours4. DoS guard terminates suspect connections with no

error message5. Failover events terminate connections6. Throttling may cause errors7. Use connection pooling and implement retry logic to

handle transient failures8. Latency introduced for updates due to HA replicas9. No cross-database dependencies, result sets from

different databases must be combined in application tier

<connectionStrings><addname="AdventureWorks"connectionString=

"Data Source=[server].database.windows.net;Integrated Security=False;Initial Catalog=ProductsDb;User Id=[login];Password=[password];Encrypt=true;"

providerName="System.Data.SqlClient"/></connectionStrings>

Page 18: Understanding  SQL  Azure

Exploring advanced Capabilities

Page 19: Understanding  SQL  Azure

Explore Advanced CapabilitiesRapid innovationImproved engineering efficienciesQuarterly service update cadence Improved operational agility

Powerful new servicesBuy / sell finished data sets on the Windows Azure MarketplaceVisualize data with SQL Azure Reporting Synchronize data with SQL Azure Data SyncScale out data with SQL Azure Federations

New developer opportunitiesDevices connected to continuously available cloud servicesConsumer applicationsSaaS applications

Page 20: Understanding  SQL  Azure

Visualize Your DataSQL Azure Reporting isSQL Server Reporting Services technology delivered as a service on the Windows Azure PlatformIdeal for operational reporting against SQL Azure dataEnterprise-ready with automatic support for HADesigned to scale elastically with demand

Get started quicklyProvision report server via Windows Azure Management PortalBuild reports with Reporting Services Report DesignerDeploy reports to report serverRender reports with Visual Studio ReportViewer controls

Page 21: Understanding  SQL  Azure

Visualize Your DataDifferences in comparison to Reporting ServicesFocus on logical vs. physical administrationReport catalog and temporary database automatically provisionedWindows Azure Management Portal replaces Report managerSSL RequiredSQL Azure data sources only

Unsupported Reporting Services featuresReport BuilderSubscriptions, schedules, caching Custom extensionsReport modelsExternal images

Use familiar technologiesVisual Studio Report DesignerRDL (Report Definition Language)Report items and visualizationsReport Server Web Service / URL accessVisual Studio ReportViewer Control

Identity and access controlSQL authentication supported (no support for integrated authentication)Admin user configured during provisioningAdmin user has all rights on server, use for administration onlyProvision users using portal or web serviceAdd users to appropriate item (Browser, Publisher) and system roles (User, Admin)Grant item-level permissions to folders or reports

Page 22: Understanding  SQL  Azure

SQL Azure Reporting Services

demo

Page 23: Understanding  SQL  Azure

Synchronize Your Data

SQL Azure (Hub)

SQL Azure (US)

SQL Azure (WE)

SQL Server (OnPre

m)

SQL Azure Data Sync isMicrosoft Sync Framework technology delivered as a service on the Windows Azure PlatformIdeal for scheduling synchronization between data sets hosted in SQL Azure or SQL ServerUses a hub and spoke topology

Special considerationsConflict resolution policy configured centrally (hub or client wins)Sync direction configured between each client and the hub (to hub, from hub, bi-directional)Sync schedule must be between 5 minutes and 1 monthData sets include multiple tables and can be filtered, triggers are added to data set tables Tables added to hub and client schemasAgent must be installed for on-prem clients

Page 24: Understanding  SQL  Azure

Synchronize Your DataProvisioning synchronization groupsDeploy database to hub and clientsSet synchronization scheduleSet conflict resolution policyDefine data setAdd SQL Azure clients to topologyInstall agents on SQL Server clients and add them to topology using keysDeploy topology

Operational considerationsManual synchronization supportedHub updates require one synchronization to distribute to all clientsClient updates require two synchronizations to distribute to all clientsSync Framework triggers may affect application behavior

Page 25: Understanding  SQL  Azure

SQL Azure DataSync

demo

Page 26: Understanding  SQL  Azure

Scale Out Your DataSQL Azure Federations providesIntegrated database sharding that can scale to hundreds of nodesMulti-tenancy via flexible repartitioningOnline split operations to minimize downtimeAutomatic data discovery regardless of changes in how data is partitioned

Special considerationsA logical database can contain multiple federationsDistribution scheme supports int, bigint, guid, and varbinary typesFiltering routes connection to appropriate shard regardless of changes in partitionsMerge, fan-out queries and automatic distribution of schema changes not supported in initial release

Multi-Tenant Db

Tenant 1

Tenant 2

Tenant 3 Db Tenant 4

Tenant 4

Db 1

Tenant 4

Db 2

Federation Root

Page 27: Understanding  SQL  Azure

SQL Azure Federations

demo

Page 28: Understanding  SQL  Azure

Thank You

Page 29: Understanding  SQL  Azure

Appendix

Page 30: Understanding  SQL  Azure

SQL Azure Billing Rates (As of October 2011)

Web Edition $9.99 per database up to 1 GB per month $49.95 per database up to 5 GB per month

Business Edition $99.99 per database up to 10 GB per month $199.98 per database up to 20 GB per month $299.97 per database up to 30 GB per month $399.96 per database up to 40 GB per month $499.95 per database up to 50 GB per month

Data TransfersNorth America and Europe regions $0.15 per GB out Asia Pacific region $0.20 per GB out All inbound data transfers are at no charge.

Page 31: Understanding  SQL  Azure

SQL Azure Database Architecture (As of October 2011)