Your SlideShare is downloading. ×
0
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
KoprowskiT_SQLSoton_WADBforbeginners
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

KoprowskiT_SQLSoton_WADBforbeginners

314

Published on

The special edition of Microsoft's SQL Database - The Cloud Edition. The special edition of this session - presenting first time for SQL Soton Event. Even this session is dedicated for beginners, we …

The special edition of Microsoft's SQL Database - The Cloud Edition. The special edition of this session - presenting first time for SQL Soton Event. Even this session is dedicated for beginners, we going a little deeper than You expected. In a first part of my session we executing a short version of SWOT analyze, in a second we trying touch the sky, and at the end we discuss about our (the SQL DBA's), future.

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
314
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Windows Azure SQL Database Tips and Tricks for Beginners Tobiasz Janusz Koprowski SQL Server MVP, FORG+
  • 2. ABOUT ME  Leader of Polish SQL Server User Group  Microsoft Certified Trainer (MCP, MCSA, MLSS, MLSBS, MCTS, MCITP)  SQL Server MVP (five years)  MVP Mentor Program Member  active blogger, influencer, technical writer  last 9 years living in Data Processing Center  last 14 years banking and ICT  NOW going into Independent Consultancy  frequently speaker at several conferences: SQL Server Community Launch, Time for SharePoint, CodeCamps, InfoMEET, SharePoint Community Launch, CISSP Day, SQL in the City, InfoTRAMS, SQL Bits, IT Camp, SQL Saturday, CareerCon, Sharepoint & SQL Connection, Kariera IT, SQL Rally, SQL Relay, InfoTech…  Microsoft Terminology Community / translations for Wndows 7/8 and Visual Studio 2010/2012  co-author of SQL Server MVP Deep Dives: High availability of SQL Server in the context of Service Level Agreements (Chapter 18th)  technical reviewer: Exploring MDX for SQL Server 2012 @KoprowskiT SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 2
  • 3. AGENDA  PART ONE: SQL Azure Analysis  Introduction  Security and errors  Compability  Scenarios  PART TWO: Demo in Azure Mode  Easy create  Easy manage  PART THREE: The Future of DBA’a  SQL Server on Premise  New horizons, new skills  Automation behind our business  PART FOUR: Extras  additional links  Q&A SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 3
  • 4. PART ONE: SQL Azure Analysis
  • 5. ShortIntroduction • 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 SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 5
  • 6. ShortIntroduction SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 6
  • 7. SecurityRequirements forAzurePlatform As a Service Provider Microsoft has an obligation to passing the several rules for security: • ISO/IEC 27001:2005 • SAS 70 Type 1 and II Also they passing (continuisly) several data securing audits: • PCI DSS • SOX compliance • HIPAA compliance And of course requirements for Data Centers: • 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 SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 7
  • 8. SecurityRequirements forAzurePlatform • ISO/IEC 27001:2005 Audit and Certification ISO Scope: The following Azure features are in scope for the current ISO audit: Cloud Services (including Fabric and RDFE), Storage (Tables, Blobs, Queues), Virtual Machines (including with SQL Server), Virtual Network, Traffic Manager, Web Sites, BizTalk Services, Media Services, Mobile Services, Service Bus, Workflow, Multi-Factor Authentication, Active Directory, Right Management Service, SQL Database, and HDInsight. This includes the Information Security Management System (ISMS) for Azure, encompassing infrastructure, development, operations, and support for these features. Also included are Power BI for Office 365 and Power Query Service. • SOC 1 and SOC 2 SSAE 16/ISAE 3402 Attestations Scope: The following Azure features are in scope for the current SOC 1 Type 2 and SOC 2 Type 2 attestations: Cloud Services (includes stateless Web, and Worker roles), Storage (Tables, Blobs, Queues), Virtual Machines (includes persistent virtual machines for use with supported operating systems) and Virtual Network (includes Traffic Manager). • United Kingdom G-Cloud Impact Level 2 Accreditation Scope: The following Azure features are in scope for the IL2 accreditation: Virtual Machines, Cloud Services, Storage (Tables, Blobs, Queues, Drives), and Virtual Network. • Cloud Security Alliance Cloud Controls Matrix • Federal Risk and Authorization Management Program (FedRAMP) • Payment Card Industry (PCI) Data Security Standards (DSS) Level 1 • HIPAA Business Associate Agreement (BAA) • Family Educational Rights and Privacy Act (FERPA) SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 8
  • 9. SecurityRequirements forAzurePlatform 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) Australia - Sydney, New South Wales Australia - Melbourne, Victoria South America (preview) Brasil - Sao Paulo, SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 9
  • 10. PARTONE:SQLAzure We want to work with SQL Azure (oops SQL Database)  Size does it matter?  Personal: 1GB, 5GB  Business: 10GB, 20 GB, 30 GB, 40 GB, 50 GB, 100 GB, 150 GB (3x50)  “Private”: less than 100 MB ($4.995 / month)  Version does it matter?  10.25 my first experience, but after July 2011 Service Release…  11.0.9214.51 now > close to SQL Server 2012  RowVersioning-Based Isolation Levels  Both the READ_COMMITTED_SNAPSHOT and ALLOW_SNAPSHOT_ISOLATION database options are set toON in Microsoft Azure SQL Database.  Because SET <snapshot_option> in theALTER DATABASETransact-SQL statement is not supported, these database options cannot be changed. error msg 40544: The database has reached its size quota. Partition or delete data, drop indexes, or consult the documentation for possible resolutions. SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 10
  • 11. PARTONE:SQLAzure  Collation does it matter?  default database collation used by Microsoft Azure SQL Database is SQL_LATIN1_GENERAL_CP1_CI_AS, where LATIN1_GENERAL is English (United States), CP1 is code page 1252,CI is case-insensitive, and AS is accent-sensitive SQL_Latin1_General_CP1_CI_AS  When using an on-premise SQL Server, you can set collations at server, database, column, and expression levels.  Microsoft Azure SQL Database does not allow setting the collation at the server level.  To use the non-default collation with Microsoft Azure SQL Database, set the collation with the Create Database Collate option, or at the column level or the expression level.  SQL Database does not support the Collate option with theAlter Database command.  By default, in SQL Database, temporary data will have the same collation as the database SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 11
  • 12. PARTONE:SQLDatabase  Naming, Logins, Users  Admin, administrator, guest, root, sa  Data Migration Support  You can use:  SQL Server 2008 Integration Services (SSIS)  The bulk copy utility (BCP.exe)  System.Data.SqlClient.SqlBulkCopy class  Scripts that use INSERT statements to load data into the database  SQL Data Compare from Red Gate  You can't use:  The RESTORE statement.  Attaching a database to the SQL Database server.  No SQL Server Agent (almost)  No SQL Server jobs  No SQL Server Browser  No Cross Database queries SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 12
  • 13. PARTONE:SQLDatabase Indexes, of course indexes  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. CREATE TABLE Source (Id int NOT NULL IDENTITY, [Name] nvarchar(max), CONSTRAINT [PK_Source] PRIMARY KEY CLUSTERED ( [Id] ASC )) SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 13
  • 14. PARTONE:SQLDatabase Closed connections to the service… by the service Because of 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, 40613 SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 14
  • 15. SharedEnvironment Hardware Boundary Hardware Boundary Hardware Boundary Hardware Boundary BC D A A B B C CD D A SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 15
  • 16. SampleofSQLCompability 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 SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 16
  • 17. SQLServer2005{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. SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 17
  • 18. SQLServer2008{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 SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 18
  • 19. SQLServer2008R2{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 SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 19
  • 20. ConnectionModel 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 SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 20
  • 21. SecurityModel  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  AD Federation, WLID – Windows Live ID, etc as alternate authentication protocols [admin, administrator, guest, root, sa] Security model is 100% compatible with on-premise SQL SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 21
  • 22. ScenariosforV1 • 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 SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 22
  • 23. PARTONE:SQLDatabase 23 | 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) SQLSoton | Southampton, July 12th 2014 | WASD for Beginners
  • 24. PARTONE: SQLDatabaseFederations  One or more tables within a database are split by row and portioned across multiple databases (federation members) /sharding/  A federation is a collection of database partitions that are:  defined by a federation distribution scheme, known as the federation scheme.  federation scheme defines a federation distribution key, (which determines the distribution of data to partitions within the federation)  federation distribution key must be an INT, BIGINT, UNIQUEIDENTIFIER, or VARBINARY  only one federation scheme and one federation distribution key for a federation. SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 24
  • 25. PARTONE: SQLDatabasescaleup/down  Scale up and out  10K records > 1DB >> INSERT, INSERT > 10M records  10K records > 10K max / DB >> INSERT, INSERT >> 100DB each 10K  Partitioning:  Horizontal / per row SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 25
  • 26. PARTONE: AdventurewithWASD 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 SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 26
  • 27. PART TWO: Demo in Azure mode
  • 28. PARTTWO: WASDdemo Windows Azure SQL Database SQL Server Virtual Machine SQL Server Management Studio Azure Storage Metrics Azure Storage Explorer RedGate Cloud Ready Services RedGate Cerabrata Cloudberry Drive, Explorer, OnlineBackup SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 28
  • 29. PART THREE: The Future of DBA’s
  • 30. PARTTHREE: FutureoftheDBA’s SQL Server on Premise  same job (almost like always)  same tasks, planning, architecture  same problems  same fun especially with new versions every… two years? SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 30
  • 31. PARTTHREE: FutureoftheDBA’s New horizons, new skills  SQL as a servis (SQL Azure Database)  not very new but still new concepto of work  some restriction (in minus)  some improvements (such a security) SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 31
  • 32. PARTTHREE: FutureoftheDBA’s Automation behind our business  someone (in MS DC) making half of our job  we can forget about few important features/tasks:  tempdb  mirroring  auditing  backup & restore  what is our role? SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 32
  • 33. PART FOUR: extras, links, demos
  • 34. MostImportantArticle(inmy privateopinion) http://bit.ly/WIHlDL Authors: Conor Cunningham, Tobias Ternström, Silvano Coriani, Ewan Fairweather Contributing Author: Ralph Squillace SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 34
  • 35. MSDN SQLDatabaseDistrict 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 SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 35
  • 36. APPENDIX: additionallinks  Red Gate Cloud Ready Services  http://cloudservices.red-gate.com/  Windows Azure DataCenter Video 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 SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 36
  • 37. APPENDIX: additionallinks  Trust Center: Security, Privacy and Compliance Information for Office 365 and Microsoft Dynamics CRM Online  http://bit.ly/1q4i8bY  Announcing PCI DSS compliance and expanded ISO certification for Windows Azure  http://bit.ly/1tyt7vE  Windows Azure cloud services achieve critical federal security milestone  http://bit.ly/1osDHfi  INFOSYS – Microsoft DataAccessTechnologies SWOT  http://infy.com/1kgujKC  One year in, and the use cases for Microsoft's SQLAzure are becoming clear  http://bit.ly/TYWRRV SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 37
  • 38. APPENDIX: additionallinks SQL Database MigrationWizard v3.9.14.1 & v4.0.17.1 Project Description  SQL Database Migration Wizard (SQLAzureMW) is designed to help you migrate your SQL Server 2005/2008/2012 databases to Azure SQL Database. Requirements  SQLAzureMW v3x and tools requires SQL Server 2008 R2 SP1 bits to run.  SQLAzureMW v4x and tools requires SQL Server 2012 bits to run.  AzureMWBatchBackup:  This is used to create a backup of a database schema and data. The data is downloaded via BCP. The TSQL output from SQLAzureMWBatchBackup can be used by SQLAzureMW or SQLAzureMWBatchUpload.  SQLAzureMWBatchUpload:  Takes the output from SQLAzureMW or SQLAzureMWBatchBackup and runs it against the target Azure SQL Database (or SQL Server) server. SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 38
  • 39. SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 39
  • 40. AFTERSESSION CONTACT:  MAIL: KoprowskiT@windowslive.com  MSG: KoprowskiT@windowslive.com  TWITTER/FACEBOOK/LINKEDIN: KoprowskiT SLIDES FROM SESSION:  SQLSoton Page: http://somewhere-in-the-net/  SlideShare Profile: http://www.slideshare.net/Anorak BLOGS:  ITPRO Anorak’s Vision: http://itblogs.pl/notbeautifulanymore/  Volume Licensing Specialites: http://koprowskit.eu/licensing/  My MVP Blog:http://koprowskit.eu/geek/ SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 40
  • 41. DON’TMISS!!! 15:00 | Session Five | Andre Kamman Running SQL Server 2014 On A Scale Out File Server 16:15 | Session Six | Mladen Prajdic SQL Server and Application Security for Developers 17:15 | Prize Draw SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 41
  • 42. Q & A SQLSoton | Southampton, July 12th 2014 | WASD for Beginners 42

×