41

1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?
Page 2: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Czy jesteśmy gotowi na SQL Azure?

Tobiasz Janusz Koprowski aka Anorak

Page 3: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

{get: BIO} • związany z informatyką od dwunastu lat • kilkuletnie doświadczenie w informatyce bankowej *Zorba, AS/400, ICBS, BTeller+ • od ponad czterech lat pracuje w dużej spółce informatycznej • na co dzieo interesujący się MOSS, Disaster Recovery, High Availibility, wirtualizacją,

bezpieczeostwem fizycznym, tworzeniem procedur bezpieczeostwa, umowami SLA, ISO • konsultant i wdrożeniowiec przy projektach audytów licencyjnych, systemów procedur

bezpieczeostwa i operacyjnych, wdrożeniach platformy SharePoint, • uczestnik kilku programów Microsoft: Connect, Community Leadership Programm, • ITPro Momentum, VS2010 Terminology Community, Windows 7 Beta, Desktop Deployment

Planning Service, New Efficiency Program, Subject Matter Expert • lider wrocławskiej grupy PLSSUG • prelegent na spotkaniach społeczności • Microsoft System Center Influencer • Członek GLOBAL Technical Support Team w GITCA • Director-at-Large GITCA EMEA Board • Członek PASS programm Committee for 2010 • Członek PASS SQL Azure Virtual Chapter • autor kilku artykułów technicznych i współpracownik wydawnictwa aPress • właściciel kilku blogów (w tym dwóch specjalizowanych)

• W lipcu 2010 wyróżniony nagrodą MVP w kategorii SQL Server

Page 4: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Agenda

• Wprowadzenie do Microsoft Azure

– DEMO 1 – zakładamy nasza bazę główną

• Model dostępu

– DEMO 2 – zakładamy nasza bazę testową

• Kompatybilność z innymi wersjami

– DEMO 3 – tworzymy obiekty

• Bezpieczeństwo SQL Azure

– DEMO 4 – użytkownicy, uprawnienia

– DEMO 5 – ustawienia Firewall

• Service Level Agreement dla SQL Azure

• Przydatne linki

Page 5: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Wprowadzenie do Microsoft Azure

Page 6: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Krótkie wprowadzenie do Microsoft Azure Platform

DZIEŃ DZISIEJSZY:

• Windows Azure Compute:

Virtualized compute environment based on Windows

Server

Storage:

Durable, scalable, & available storage

Management:

Automated, model-driven management of the service

• SQL Azure (cloud-based database) Database:

Relational processing for structured/unstructured data

• App Fabric (.NET services) Service Bus:

General purpose application bus

Access Control:

Rules-driven, claims-based access control

PRZYSZŁOŚĆ:

• Live Services

• SharePoint Services

• Dynamics CRM

Rysunek pochodzi z dokumentu: INTRODUCING THE WINDOWS AZURE PLATFORM | David Chappel

Page 7: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Place

Type

Service

Data Platform: Device to Cloud

Analysis Caching

Integration

Sync

Search

Relational BLOB

Query Backup

Load

Multi Dim

In Memory File XML

Reporting Mining Protection

RDBMS

Model & policy based development and management

Page 8: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Database Choices R

eso

urc

es

Low High “Friction”/Control

SQL Azure (RDBMS)

Value Props:

Hosted

On-premise

Value Props:

Value Props:

Roll-your-own HA/DR/scale

Page 9: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Database Editions

Two SQL Azure Database SKUs: Web & Business Web Edition: 1 GB @ $9.99/month | 5 GB @ $49.95/month Business Edition: Up to 50 GB @ $99.99/10 GB/month 10 GB @ $99.99 | 20 GB @ $199.98 | 30 GB @ $299.97 | 40 GB @ $399.96 | 50 GB @ $499.95

You specify Web or Business Edition

Web: EDITION = Web Business: EDITION = Business

You specify MAXSIZE

Web: MAXSIZE = 1GB| 5GB Business: MAXSIZE = 10GB | 20GB | 30GB | 40GB | 50GB This is the size we will not let you grow beyond You will be charged for the actual (peak) size (in any one day)

CREATE DATABASE foo1 (EDITION='business', MAXSIZE=50GB); CREATE DATABASE foo2 (EDITION='business', MAXSIZE=30GB); CREATE DATABASE bar1 (EDITION='web', MAXSIZE=5GB); CREATE DATABASE bar2 (EDITION='web'); -- Defaults to 1GB

Page 10: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

GEO-LOKALIZACJA

Page 11: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

DEMO 1 – zakładamy nasza bazę główną

Page 13: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Model dostępu

Page 14: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

SQL Azure Database

Customer Value Props

Self-provisioning and capacity on demand

Symmetry w/ on-premises database platform

Automatic high-availability and fault-tolerance

Automated DB maintenance (infrastructure)

Simple, flexible pricing – “pay as you grow”

MS Datacenter

Windows Azure Compute

Browser

SOAP/REST HTTP/S

T-SQL (TDS)

App Code (ASP.NET)

SQL Server Report Server (on-premises)

ADO.NET/REST - EDM HTTP/S

- AD Federation (LiveId /AppFabric AC)

SQL Azure Database

T-SQL (TDS)

Relational database service

• SQL Server technology foundation

• Highly symmetrical

• Highly scaled

• Highly secure

Database “as a Service” – beyond hosting

Highly scaled out relational database as a service

Page 15: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

V1 Application Topologies

MS Datacenter

SOAP/REST HTTP/S

SQL Azure access from within MS Datacenter

(Azure compute – ADO.NET)

Windows Azure

T-SQL (TDS)

MS Datacenter

T-SQL (TDS)

App Code

/ Tools

SQL Azure access from outside MS Datacenter

(On-premises – ADO.NET)

App Code (ASP.NET)

ADO.NET Data Svcs/REST - EF HTTP/S

Code Far

SQL Data

Services

SQL Data

Services

Application/

Browser

Code Near

Page 16: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Architecture

• Shared infrastructure at SQL database and below

‒ Request routing, security and isolation

• Scalable HA technology provides the glue

‒ Automatic replication and failover

• Provisioning, metering and billing infrastructure

Machine 5 SQL Instance

SQL DB User DB1

User DB2

User DB3

User DB4

Scalability and Availability: Fabric, Failover, Replication, and Load balancing

SDS Provisioning (databases, accounts, roles, …, Metering, and Billing

Machine 6

SQL Instance

SQL DB User DB1

User DB2

User DB3

User DB4

Machine 4

SQL Instance

SQL DB User DB1

User DB2

User DB3

User DB4

Scalability and Availability: Fabric, Failover, Replication, and Load balancing

Page 17: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Connection Model

When writing applications for SQL Azure, you can use the following drivers and libraries:

• .NET Framework Data Provider for SQL Server (System.Data.SqlClient) from the .NET Framework 3.5 Service Pack 1.

• SQL Server 2008 Native Client ODBC driver.

• SQL Server 2008 Driver for PHP version 1.1.

• SQL Azure supports tabular data stream (TDS) protocol client version 7.3 or later. Earlier versions of TDS protocol are not supported.

• Connecting to SQL Azure by using OLE DB is not supported.

• Support for ASP.NET controls

• Clients connect directly to a database

‒ Cannot hop across DBs (no USE)

Page 18: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Service Provisioning Model

• Each account has zero or more servers ‒ Azure wide, provisioned in a common portal

‒ Billing instrument

• Each server has one or more databases ‒ Contains metadata about the databases and usage

‒ Unit of authentication

‒ Unit of Geo-location

‒ Generated DNS based name

• Each database has standard SQL objects ‒ Unit of consistency

‒ Unit of multi-tenancy

‒ Contains Users, Tables, Views, Indices, etc.

‒ Most granular unit of billing

Account

Server

Database

Page 19: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

DEMO 2 – zakładamy nasza bazę testową

Page 20: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Kompatybilność z innymi wersjami

Page 21: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Kompatybilność SQL Azure z SQL „tradycyjnym”

• In Scope for v1

• Constants

• Constraints

• Cursors

• Index management and rebuilding indexes

• Local temporary tables

• Reserved keywords

• Stored procedures

• Statistics management

• Transactions

• Triggers

• Tables, joins, and table variables

• Transact-SQL language elements such as

– Create/drop databases

– Create/alter/drop tables

– Create/alter/drop users and logins

– and so on.

• User-defined functions

• Views

• Out of Scope for v1

• Common Language Runtime (CLR)

• Database file placement

• Database mirroring

• Distributed queries

• Distributed transactions

• Filegroup management

• Global temporary tables

• Spatial data and indexes

• SQL Server configuration options

• SQL Server Service Broker

• System tables

• Trace Flags

• Physical server or catalog DDL and views

Page 22: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Nie kompatybilność SQL Azure z...

• SQL Server 2005

• Common Language Runtime (CLR) and CLR User-Defined Types

• Database Mirroring

• Service Broker

• Table Partitioning

• Typed XML and XML indexing is not supported. The XML data type is supported by SQL Azure.

• SQL Server 2008

• Change Data Capture

• Data Auditing

• Data Compression

• Extended Events

• External Key Management / Extensible Key Management

• FILESTREAM Data

• Integrated Full-Text Search

• Large User-Defined Aggregates (UDAs)

• Large User-Defined Types (UDTs)

• Performance Data Collection (Data Collector)

• Policy-Based Management

• Resource Governor

• Sparse Columns

• Spatial data with GEOGRAPHY and GEOMETRY data types

• SQL Server Replication

• Transparent Data Encryption

Page 23: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

DEMO 3 – tworzymy obiekty

Page 24: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Bezpieczeństwo SQL Azure

Page 25: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Międzynarodowe wymagania bezpieczeństwa

Jako dostawca usług (Service Provider) Microsoft musi spełniad warunki pozwalające mu świadczyd usłuch w chmurze. Na dzieo dzisiejszy Azure Platform spełnia wymagania: • ISO/IEC 27001:2005 • SAS 70 Type 1 and II Również udaje mu się pozytywnie przejśd audyty z zakresu: • PCI DSS • SOX compliance • HIPAA compliance Oczywiście dla samych Data Center spełnia standardowe wymagania: • Physical security of the data centers (locks, cameras, biometric devices, card readers,

alarms) • Firewalls, application gateways and IDS to protect the network • Access Control Lists (ACLs) applied to virtual local area networks (VLANs) and applications • Authentication and authorization of persons or processes that request access to data • Hardening of the servers and operating system instances • Redundant internal and external DNS infrastructure with restricted write access • Securing of virtual machine objects • Securing of static and dynamic storage containers

Page 26: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Model bezpieczeństwa?

• Uses regular SQL security model

‒ Authenticate logins, map to users and roles

‒ Authorize users and roles to SQL objects

• Support for standard SQL Auth logins

‒ Username + password

• Future AD Federation, WLID, etc as alternate authentication protocols

[admin, administrator, guest, root, sa]

Security model is 100% compatible with on-premise SQL

Page 27: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

DEMO 4 – użytkownicy, uprawnienia

Page 28: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

DEMO 5 – ustawienia Firewall

Page 29: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Service Level Agreement dla SQL Azure

Page 30: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Cennik usługi SQL Azure – v.1.0

Web Edition

• 1 GB Database

• $9.99 / month

• Bandwidth

‒ $0.10 /GB inbound

‒ $0.15 /GB outbound

Business Edition

• 10GB Database

• $99.99 / month

• Bandwidth

‒ $0.10 /GB inbound

‒ $0.15 /GB outbound

• Specified by MAXSIZE on CREATE DATABASE command or portal

• Billing granularity is the day

• Monthly billing period

Page 31: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Cennik usługi SQL Azure – v.1.5

Web Edition • 1 GB Database $9.99 / month

• 5 GB Database $49.95 / month

• Bandwidth

‒ $0.10 /GB inbound

‒ $0.15 /GB outbound

Business Edition

• 10GB Database - $99.99 / month

• 20GB Database - $199.98 / month

• 30GB Database - $299.97 / month

• 40GB Database - $399.96 / month

• 50GB Database - $499.95 / month

• Specified by MAXSIZE on CREATE DATABASE command or portal

• Billing granularity is the day

• Monthly billing period

Page 32: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

SQL Azure Service Level Agreement

Poziomy usług | Poziom usług Dostępność w miesiącu: Definicje

1. „Łączna liczba przedziałów czasu” to liczba przedziałów czasu o długości 5 minut w

miesięcznym cyklu rozliczeniowym, obliczana przez pomnożenie liczby dni w cyklu przez 24

* 60 / 5.

2. Przedział czasu o długości 5 minut jest oznaczany jako niedostępny, jeśli wszystkie próby

Klienta nawiązania połączenia z usługą SQL Azure nie powiodą się lub ich wykonanie zajmie

ponad 30 sekund, bądź jeśli podstawowe, prawidłowe operacje odczytu i zapisu (zgodnie z

opisem w naszej dokumentacji technicznej) nie powiodą się po nawiązaniu połączenia. Nie

są uwzględniane niepowodzenia spowodowane przez oprogramowanie, sprzęt lub sieć w

lokalizacji używanej przez klienta w celu nawiązania połączenia z usługą SQL Azure.

3. „Zaplanowany przestój” oznacza czas, w przypadku którego firma Microsoft powiadomiła

Klienta o okresach przestoju na co najmniej pięć dni przed wystąpieniem takiego Przestoju.

Zaplanowany przestój o długości krótszej niż 10 godzin w roku kalendarzowym nie jest

uznawany za Przestój do celów niniejszej umowy SLA.

SQL Azure Service Level Agreement (SLA) http://www.microsoft.com/downloads/details.aspx?FamilyID=fa4f7fed-b17f-4cf5-b80f-531b9b681b5c&displaylang=en

Page 33: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

SQL Azure Service Level Agreement

4. „Procent miesięcznego czasu pracy” dla określonego Klienta jest obliczany przez pomnożenie łącznej liczby minut w miesiącu kalendarzowym przez łączną liczbę użytkowników, a następnie odjęcie łącznej liczby minut Przestoju doświadczonego przez wszystkich użytkowników w danym miesiącu kalendarzowym oraz podzielenie wyniku przez łączną liczbę minut w danym miesiącu kalendarzowym pomnożoną przez łączną liczbę użytkowników. Jest to przedstawiane przy użyciu następującego wzoru:

Łączna liczba minutw miesiącu

XŁączna liczbaużytkowników -

Łączna liczba minut czasuprzestoju dla wszystkich

użytkowników w danym miesiącu

Łączna liczba minutw miesiącu

XŁączna liczbaużytkowników

Procent miesięcznego czasu pracy Kredyt usługi

< 99,9% 10%

< 99% 25%

Page 34: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Przydatne linki

Page 35: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

SQL Azure Training Kit

•Preparing your SQL Azure Account - In this simple click-through demo you will walk

through the process of configuring your SQL Azure account for first time usage through the Windows Azure portal.

•Connecting to SQL Azure - In this demo you will look at connecting to SQL Azure using SQL Server Management

Studio.

•Managing Logins and Security in SQL Azure - In this demo you configure the security

for a SQL Azure database by creating logins and users and then assigning users to roles for a specific database.

•Creating Objects in SQL Azure - In this demo you will look at how to create objects in SQL Azure

by creating tables, indexes and stored procedures through SQL Server Management Studio.

•Migrating a Database Schema to SQL Azure - In this demo you will look at how to

take an existing SQL Server schema and migrate it to SQL Azure using Adventure Works 2008 Light.

•Moving Data Into and Out Of SQL Azure using SSIS - In this demo you will look

at how to move data between a SQL Azure Database and an on premise SQL Server Database using SQL Server Integration Services.

•Building a Simple SQL Azure App - In this demo you will look at creating a simple Windows

Azure Web Role that connects to SQL Azure to retrieve data and display it.

•Scaling Out SQL Azure with Database Sharding - In this demo you will see the

basics of database sharding to scale out with SQL Azure.

Page 36: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Want to Know More?

• Windows Azure Platform – http://www.azure.com/

• MSDN Development Center – http://msdn.microsoft.com/en-us/sqlserver/dataservices

• Team Blog – http://blogs.msdn.com/sqlazure

• Windows Azure Platform Training Kit – http://www.microsoft.com/downloads/details.aspx?FamilyID=413E88F8-5966-4A83-B309-53B7B77EDF78&displaylang=en

• Microsoft OS Cloud Windows Azure Data Center – Google & Amazon

battle – http://www.youtube.com/watch?v=K3b5Ca6lzqE

• Microsoft patterns & practices: Windows Azure Security Guidance – http://azuresecurity.codeplex.com/

• Installing Certificates in Windows Azure VMs – http://blogs.msdn.com/b/jnak/archive/2010/01/29/installing-certificates-in-windows-azure-vms.aspx

Page 37: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Get ongoing SQL Server learning from MVPs, top experts, and real-world users:

• Training webcasts, technical education, worldwide event info, and more Sign up for your FREE PASS membership today: www.sqlpass.org

• Go to local PASS Chapter meetings Visit the PASS Chapter booth to learn about upcoming local events, or visit www.sqlpass.org/PASSChapters

• No local Chapter? Start a Chapter with support and resources from PASS www.sqlpass.org/getchapterinfo

• Attend PASS Summit 2010

World's largest and best conference for SQL Server and BI technical education www.sqlpass.org/na2010

Follow / Join us online: Twitter @sqlpass #sqlpass, LinkedIn group, Facebook group

Page 38: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Introduction to SQL Azure Data Sync

http://azure.sqlpass.org/

Liam Cavanagh

Bio:

Liam Cavanagh currently works as a Sr. Program Manager for Microsoft in the Cloud Data Services group. In this group

he works on the Data Sync Service for SQL Azure – enabling organizations to extend on-premises data to the cloud as

well as to remote offices and mobile workers to remain productive regardless of network availability. Additionally, he

works with enterprise corporations implementing enterprise mobile solutions, conducts training seminars worldwide on

mobile and wireless technology design, development, and deployment. Liam holds a Bachelor of Mathematics degree in

Business and Information Systems from the University of Waterloo in Waterloo, Ontario, Canada.Specialties:Mobile,

Wireless, Replication and Cloud Database TechnologiesTitle

Description

In this session we will show you how SQL Azure Data Sync enables on-premises SQL Server data to be easily shared

with SQL Azure allowing you to extend your on-premises data to begin creating new cloud-based applications. Using

SQL Azure Data sync’s bi-directional data synchronization support, changes made either on SQL Server or SQL Azure

are automatically synchronized back and forth. Next we show you how SQL Azure Data Sync provides symmetry

between SQL Azure databases to allow you to easily geo-distribute that data to one or more SQL Azure data centers

around the world. Now, no matter where you make changes to your data, it will be seamlessly synchronized to all of

your databases whether that be on-premises or in any of the SQL Azure data centers.

Page 39: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Pytania ?

Page 40: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

PYTANIA PO SESJI / KONTAKT: MAIL: [email protected] | MSG: [email protected]

JABBER: [email protected] | SKYPE: tjkoprowski (niezmiernie rzadko) TWITTER/FACEBOOK/LINKEDIN: KoprowskiT

BLOGI:

ITPRO Anorak’s Vision: http://itblogs.pl/blogs/notbeautifulanymore/default.aspx [PL] Volume Licensing Specialites: http://volumelicensingspecialites.wordpress.com [PL]

My MVP Blog: http://koprowskit.eu/geek [EN/PL]

POLECANE STRONY: Społeczności IT: http://www.ms-groups.pl | CodeGuru: http://www.codeguru.pl

Virtual Study Portal: http://www.virtualstudy.pl | Windows Server System: http://www.wss.pl Global IT Community Association: http://www.gitca.org Polish SQL Server User Group: http://www.plssug.org.pl

Professional Association of SQL Server: http://www.sqlpass.org

Page 41: 1st Silesian Code Camp - Czy jesteśmy gotowi na SQL Azure?

Dziękuję za uwagę