Se ha denunciado esta presentación.
Se está descargando tu SlideShare. ×

SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners

Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Cargando en…3
×

Eche un vistazo a continuación

1 de 40 Anuncio

SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners

Descargar para leer sin conexión

Microsoft released SQL Azure more than two years ago - that's enough time for testing (I hope!). So, are you ready to move your data to the Cloud? If you’re considering a business (i.e. a production environment) in the Cloud, you need to think about methods for backing up your data, a backup plan for your data and, eventually, restoring with Red Gate Cloud Services (and not only). In this session, you’ll see the differences, functionality, restrictions, and opportunities in SQL Azure and On-Premise SQL Server 2008/2008 R2/2012. We’ll consider topics such as how to be prepared for backup and restore, and which parts of a cloud environment are most important: keys, triggers, indexes, prices, security, service level agreements, etc.

Microsoft released SQL Azure more than two years ago - that's enough time for testing (I hope!). So, are you ready to move your data to the Cloud? If you’re considering a business (i.e. a production environment) in the Cloud, you need to think about methods for backing up your data, a backup plan for your data and, eventually, restoring with Red Gate Cloud Services (and not only). In this session, you’ll see the differences, functionality, restrictions, and opportunities in SQL Azure and On-Premise SQL Server 2008/2008 R2/2012. We’ll consider topics such as how to be prepared for backup and restore, and which parts of a cloud environment are most important: keys, triggers, indexes, prices, security, service level agreements, etc.

Anuncio
Anuncio

Más Contenido Relacionado

Presentaciones para usted (20)

Anuncio

Similares a SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners (20)

Más de Tobias Koprowski (20)

Anuncio

Más reciente (20)

SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners

  1. 1. #sqlsatMoscow Windows AzureSQL Database Tipsand Tricksfor Beginners Tobiasz Janusz Koprowski SQL Server MVP, FORG+
  2. 2. #sqlsatMoscow Спонсоры
  3. 3. #sqlsatMoscow Sponsors
  4. 4. #sqlsatMoscow ABOUT ME PolishSQL Server User GroupLeader Microsoft CertifiedTrainer(MCP, MCSA, MLSS, MLSBS, MCTS, MCITP) SQL Server MVP (fouryearsin a row) Blogger, Influencer, Technical Writer Last8 yearslivingin Data Center in Wrocław About14 years in IT/banking area Speaker at SQL Server Community Launch, Time for SharePoint, CodeCamps, SharePoint Community Launch, CISSP Day, SQL in the City, InfoTRAMS, SQL Bits, SQL Saturday, CareerCon, Sharepoint& SQL Connection, IT Camp, SQL Rally, SQL Relay… DeepDivesCo-Author: High availability of SQL Server in the context of Service Level Agreements(Chapter18th) Technical reviewer: ExploringMDX for SQL Server 2012 @KoprowskiT
  5. 5. #sqlsatMoscow AGENDA PART ONE: SQL Azure Introduction Security and errors Compability Scenarios PART TWO: Demo Easycreate Easymanage PART THREE: Cloud Services Backupand Restore, Synchronize andSchedule PART THREE: additionallinks Q&A
  6. 6. #sqlsatMoscow PART ONE: SQL AzureDatabase
  7. 7. #sqlsatMoscow ShortIntroduction •Windows Azure Compute: Virtualized compute environment based on Windows ServerStorage: Durable, scalable, & available storageManagement: 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 busAccess Control: Rules-driven, claims-based access control
  8. 8. #sqlsatMoscow Security Requirementsfor AzurePlatform AsaServiceProviderMicrosofthasanobligationtopassingtheseveralrulesforsecurity: •ISO/IEC27001:2005 •SAS70Type1andII Alsotheypassing(continuisly)severaldatasecuringaudits: •PCIDSS •SOXcompliance •HIPAAcompliance AndofcourserequirementsforDataCenters: •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
  9. 9. #sqlsatMoscow Windows AzureDataCenters Some datacenters have servers grouped inside containers -each containing 1800-2500 servers. North America North-central US -Chicago, IL South-central US -San Antonio, TX West US -California East US -Virginia Asia East Asia -Hong Kong, China South East Asia -Singapore Europe North Europe -Dublin, Ireland West Europe -Amsterdam, Netherlands Japan Japan East, the Tokyo area Japan West, the Kansai area Oceania (announced, coming soon) Sydney, New South Wales Melbourne, Victoria
  10. 10. #sqlsatMoscow PART ONE: SQL Azure We want to work with SQL Azure (oops SQL Database) Size doesit matter? Personal: 1GB, 5GB Business: 10GB, 20GB, 30GB, 40GB, 50GB, 100GB, 150GB (3x50) “Private”: less than 100 MB ($4.995 / month) Version does it matter? 10.25 my firstexperience, but afterJuly 2011 Service Release… 11.00 now> closeto SQL Server 2012 Collation does it matter? defaultcollation: SQL_Latin1_General_CP1_CI_AS table level collation error msg 40544: The database has reached its size quota. Partition or delete data, drop indexes, or consult the documentation for possible resolutions.
  11. 11. #sqlsatMoscow PART ONE: SQL Database Naming, Logins, Users Admin, administrator, guest, root, sa Data Migration Support Youcanuse: SQL Server 2008 Integration Services (SSIS) The bulkcopyutility(BCP.exe) System.Data.SqlClient.SqlBulkCopyclass Scripts thatuseINSERT statementsto loaddata intothe database SQL Data Compare from Red Gate Youcan'tuse: The RESTORE statement. Attachinga databaseto the SQL Database server. No SQL Server Agent (almost) No SQL Server jobs No SQL Server Browser No Cross Database queries
  12. 12. #sqlsatMoscow PART ONE: SQL Database Indexes, of courseindexes You MUST use CLUSTERED INDEX with your (Azure)SQL Database. Heap tables are not supportes, so You MUST create CLUSTERED INDEX before INSERT will be executed error msg 40054: Tables without a clustered index are not supported in this version of SQL Server.Create a clustered index and try again. CREATETABLESource(IdintNOTNULLIDENTITY, [Name]nvarchar(max), CONSTRAINT[PK_Source]PRIMARYKEYCLUSTERED ( [Id]ASC ))
  13. 13. #sqlsatMoscow PART ONE: SQL Database Closed connections to the service… by the service Becauseof multi-tenant: Excessive resource usage Connections that have been idle for 30 minutes or longer (Program assuming your connection is going to fail) Failover because of server failures errors: 40197, 40501, 40544, 40549, 40550, 40551, 40552, 40553, and 40613
  14. 14. #sqlsatMoscow Hardware Boundary Hardware Boundary Hardware Boundary Hardware Boundary Shared Environment B C D A A B B C C D D A
  15. 15. #sqlsatMoscow Sample of SQL Compability 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
  16. 16. #sqlsatMoscow SQLServer 2005 {9.0}NON-Compability 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.
  17. 17. #sqlsatMoscow SQL Server 2008 {10.0} NON-Compability 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 SQL Server Replication Transparent Data Encryption
  18. 18. #sqlsatMoscow SQL Server 2008 R2 {10.50} NON-Compability SQL Server Utility SQL Server PowerShell Provider Master Data Services SQL Server Management Studio does not support Windows Azure SQL Database in versions prior to SQL Server 2008 R2
  19. 19. #sqlsatMoscow Connection Model When writing applications for Windows Azure SQL Database, 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 or later. • Entity Framework from the .NET Framework 3.5 Service Pack 1 or later. • SQL Server 2008 R2 Native Client ODBC driver. SQL Server 2008 Native Client ODBC driver is also supported, but has less functionality. • SQL Server 2008 Driver for PHP version 1.1 or later. • An updated version of SQL Server JDBC Driver 3.0 that supports SQL Database. Windows Azure SQL Database supports tabular data stream (TDS) protocol client version 7.3 or later. Earlier versions of TDS protocol are not supported. Connecting to Windows Azure SQL Database by using OLE DB or ADO is not supported Support for ASP.NET controls Clients connect directly to a database
  20. 20. #sqlsatMoscow Security Model Uses regular SQL security model Authenticate logins, map to users and roles Authorize users and roles to SQL objects Support for standard SQL Authlogins Username + password Future AD Federation, WLID–Windows Live ID, etcas alternate authentication protocols [admin, administrator, guest, root, sa] Security model is 100% compatible with on-premise SQL
  21. 21. #sqlsatMoscow Scenarios for V1 •Departmental Applications ‒Simple application built by individual or department ‒Need simple deployment, self-management, IT: “Empowerment and Governance” •Web Applications ‒Small business or startup that uses the cloud as their IT ‒Simple deployment, self-management, scale on demand •ISV ‒ISV hosting software on behalf of customer ‒Multi-tenant support for billing and isolation •Data Hub (Shortly After V1) ‒Sharing and aggregating of data across tiers and across enterprises ‒Centralized place for data, high scale, sync with existing data sources
  22. 22. PART ONE: SQL Database Point of Difference On-premise SQL Server Windows Azure SQL Database Where you manage server-level security The Security folder in SQL Server Management Studio'sObject Explorer The master database Server-level security role for creating logins securityadmin fixed server role loginmanager database role in the master database Commands for managing logins CREATE LOGIN CREATE LOGIN ALTER LOGIN ALTER LOGIN DROP LOGIN DROP LOGIN (There are some parameter limitations and you must be connected to the master database) View that shows all logins sys.syslogins (sys.sql_logins for SQL Server authentication logins) sys.sql_logins (You must be connected to the master database) Server-level role for creating databases dbcreator fixed database role dbmanager database role in the master database Command for creating a database CREATE DATABASE CREATE DATABASE (There are some parameter limitations and you must be connected to the master database) Dropping databases DROP DATABASE DROP DATABASE If a user is in the dbmanager role, they have permission to DROP any database, regardless of which user originally created it. View that lists all databases sys.databases sys.databases (view) (You must be connected to the master database) 22 |
  23. 23. #sqlsatMoscow PART ONE: SQL Database Adventure… … of course Adventure Works 2012 for SQL Database Adventure Works for SQL Server 2012 Release date: March 2012 Adventure Works for SQL Azure Release date: April 2012
  24. 24. #sqlsatMoscow PART TWO: WASD Demo
  25. 25. #sqlsatMoscow PART TWO: CloudServices
  26. 26. #sqlsatMoscow PART TWO: CloudServices What is Cloud Services from RedGate? Suite of tools to help managing cloud services Came out of SQL Azure Backup Launched in Feb2012–continually developing Contain different, but integrated features Set up SQL Azure backup/restore Back up/Restoreyour Blob storage Back up/RestoreAzure table Flexible scheduling Receive automated emails after each job Quickly review your job Control how your SQL Azure backups are named
  27. 27. #sqlsatMoscow PART TWO: Backupand Restore Backup to Azure Blob Storage or Amazon S3 Format is a .bacpac Zip file containing xml schema and jsondata Permissions needed for a transactional backup dbmanagerand dbo ( CREATE DATABASE x AS COPY OF y) To export to bacpacfile dbo
  28. 28. #sqlsatMoscow PART TWO: Backup Demo
  29. 29. #sqlsatMoscow PART TWO: Storage Backup Backup between Azure Storage and Amazon S3 Checksum or filename comparison Copies only updated or added files Deleted files are not removed currently New features coming fast Architected to support more storage systems
  30. 30. #sqlsatMoscow PART TWO: Storage Demo
  31. 31. #sqlsatMoscow PART TWO: Future…
  32. 32. #sqlsatMoscow APPENDIX: links& demos
  33. 33. #sqlsatMoscow Most ImportantArticle(in my privateopinion) http://bit.ly/WIHlDL Authors:Conor Cunningham,Tobias Ternström,Silvano Coriani,Ewan Fairweather Contributing Author:Ralph Squillace
  34. 34. #sqlsatMoscow MSDN SQL Database District Windows Azure SQL Database (formerly SQL Azure)| http://bit.ly/H0Wdfx What's New in Windows Azure SQL Database (formerly SQL Azure) Backward Compatibility in Windows Azure SQL Database Known Issues in Windows Azure SQL Database Introducing Windows Azure SQL Database Tutorials Feedback and Community Information Windows Azure Platform Management Portal Windows Azure SQL Database Concepts Administration Development Guidelines and Limitations Management REST API Reference Transact-SQL Reference Errors and Exceptions Reference
  35. 35. #sqlsatMoscow APPENDIX: additionallinks Red Gate Cloud Ready Services http://cloudservices.red-gate.com/ Windows AzureDataCenterVideo http://www.youtube.com/watch?v=JJ44hEr5DFE General Guidelines and Limitations (Windows Azure SQL Database) http://bit.ly/11wB6cK Adventure Works for SQL Database (formerly SQL Azure) http://bit.ly/125s0W0 Federations: Building Scalable, Elastic, and Multi-tenant Database Solutions http://bit.ly/ZxzjmQ| http://bit.ly/15GzIEE Error Messages (Windows Azure SQL Database) http://bit.ly/17tnQtE Compare SQL Server with Windows Azure SQL Database http://bit.ly/15RyB5u
  36. 36. #sqlsatMoscow APPENDIX: additionallinks SQLDatabaseMigrationWizardv3.9.14.1&v4.0.17.1 ProjectDescription SQLDatabaseMigrationWizard(SQLAzureMW)isdesignedtohelpyoumigrateyourSQLServer2005/2008/2012databasestoAzureSQLDatabase. Requirements SQLAzureMWv3xandtoolsrequiresSQLServer2008R2SP1bitstorun. SQLAzureMWv4xandtoolsrequiresSQLServer2012bitstorun. AzureMWBatchBackup: Thisisusedtocreateabackupofadatabaseschemaanddata.ThedataisdownloadedviaBCP.TheTSQLoutputfromSQLAzureMWBatchBackupcanbeusedbySQLAzureMWorSQLAzureMWBatchUpload. SQLAzureMWBatchUpload: TakestheoutputfromSQLAzureMWorSQLAzureMWBatchBackupandrunsitagainstthetargetAzureSQLDatabase(orSQLServer)server.
  37. 37. #sqlsatMoscow
  38. 38. #sqlsatMoscow AFTER SESSION CONTACT: MAIL: KoprowskiT@windowslive.com MSG: KoprowskiT@windowslive.com TWITTER/FACEBOOK/LINKEDIN: KoprowskiT SLIDES FROM SESSION: SQLSatPage: http://www.sqlsaturday.com/290/schedule.aspx SlideShareProfile: http://www.slideshare.net/Anorak BLOGS: ITPRO Anorak’sVision: http://itblogs.pl/notbeautifulanymore/ Volume LicensingSpecialites: http://koprowskit.eu/licensing/ My MVP Blog: http://koprowskit.eu/geek/
  39. 39. #sqlsatMoscow Sponsors
  40. 40. #sqlsatMoscow Дужедякую! Q & A

×