Upload
msdevmtl
View
277
Download
0
Embed Size (px)
Citation preview
The modern DBA
Presented byJean-René Roy SQL Server MVP
Who is Jean-Rene Roy?
• Independent Consultant for 25 years• SQL Server MVP• Software , DB Architect and team lead for many enterprises• Program Lead for OttawaSQL.Net and .NET Ottawa
Community• Founder of SQLTeach and DevTeach• SQL Server / CRM Dev / TFS Specialist• System Architect for TBS, HoC, CCA, Justice.ca
DevTeach Rebate Code:OT00NETUGCGood for $100 off the main conference
48 speakers 85 sessions presented in 3 days
• Disclaimer
• Tools that help the Modern DBA
• SQL Server Tips and Tricks
• What the Modern DBA need to know about EF
• What the Modern DBA need to know about SQL Azure
• What the Modern DBA need to know about SQL Server Project
Agenda
Modern DBA
• Opinions of the Modern DBA come from my 25 years of experiences not MS.
• The Presentation is more for DBA supporting Development team not Operational DBA
• These subjects are open for Debate if you pay the Beer!• The presentation focus on the WHY not the how.• Links to Code samples, Articles and blog will be provided in
this presentation material.
Disclaimer
Modern DBA
What does DBA mean?
• DataBase• Administrator ?
• Default• Blame• Acceptance
Tools that help the Modern DBA
• Searching in the Database Use sys Object and sp_help Code and Code T-SQL
Use Red-gate Free search SSMS add-on
SQL Server Tips and Tricks Use FOR XML with Path(“”)
Use XML Schema when possible
Dynamic SQL vs simulate dynamic SQL
Show the new CREATE SEQUENCE
Using SSB for tracking Change
Using Output command in Insert and Updates
Using Temporal Table in SQL Server 2016
Using For JSON in SQL Server 2016
Query Store in SQL Server 20016
SQL Server 2016 Row Level Security
What is NoSQL?DBA thinks NoSQL is just for the Dev guy’s and it will go away like the Harper government.
You may be right about the Harper government but NoSQL is here to stay and it’s something that is more related to the DBA role.
DocumentDB NoSQL
• What is Document DB?
• Not for Document but for JSON
• Query language is like TSQL
• It got Stored Procedure, Index…
What is IoT?
• Internet of Things
Azure Data Lake and Data Factory
Get started with U-SQL
What the Modern DBA need to know about Entity Framework (EF)
• Do you have application that use EF in production?
• EF use Dynamic Query
• LINQ to Entity and LINQ to SQL
• Can be use for OData
Taking advantage of dacpac and bacpac
• dacpac = Data-tier Application (Schema definition)• bacpac = Data-tier Application with data
What new in SSMS 2016 for SQL Azure• Open in Management Portal• Reports• Properties• Design• Select Top 1000 Rows• Edit Top 200 Rows• Full-Text Indexes
What the Modern DBA need to know about SQL Azure• How to Deploy your local DB to SQL Azure
Using SSMS Deploy Using bacpac file Using a generated script Using a SQL Server Database Project (Publish)
• Using SQL Azure mean some restrictions No KEY features (SSB, Agent, …)
R Integration in SQL Server will be Revolutionary
• Simple configuration UI• Easy creation of Azure
credential• No overhead
Backup to Windows Azure
Restore GUI Backup GUI
Backup to Windows Azure Tool
• What is it? http://www.microsoft.com/en-us/download/details.aspx?id=40740 • Stand-alone Tool that adds backup to Windows Azure capabilities and backup encryption to
prior versions of SQL Server
• Benefits One Cloud Backup strategy across prior versions of SQL Server including 2005, 2008,
and 2008 R2
Adds backup encryption to prior versions, locally or in the cloud
Takes advantage of backup to Azure
Easy configuration
SSMS reports single backup completion statusfor local storage and Azure storage
• http://www.microsoft.com/en-us/download/details.aspx?id=40740
Get it from this link:
Hybrid cloud solutions
Fast disaster recovery (low RTO)Easy to deploy and manage
Cloud burstingGreater global reachBetter isolation of internal assets
On-premises network
Domain controller
VPN tunnel (Windows Azure Virtual Network)Asynchronous
commit
Primary replica
Secondary replica
Synchronous commit
Run backups
Run BI reports
Manual or automaticAt an instance level with point-in-time restoreMeasures database usage patterns to set backup frequency
redmond.corp.microsoft.com
uswest.internal.cloudapp.net
AD / DNS VPN Device
VPN tunnel
Windows Cluster
Availability Group
P
S1
S2
CSNB2252109-TA
VPN Gateway
VirtualNetwork
CSNB2252108-TA
On-PremisesWindows Azure
AGHybrid2
Example of Availability Group Spanning On-premises and Windows Azure
28
Easy on-ramp to cloud
Easily migrate on-premises SQL Server to a Windows Azure VMDesigned for users unfamiliar with Windows Azure
Ideal for existing apps and dev/test new appsFull SQL Server functionalityFull VM control
Ideal for new variable-demand appsDynamic scale-out of databaseNo patching of OS or DBBuilt-in HA with 99.9-percent SLA
DB
Deploy databases to Windows Azure VM
What’s being delivered• New wizard to deploy databases to
SQL Server in Windows Azure VM• Can also create a new Windows Azure
VM if needed
Main benefits• Easy to use
• Perfect for database administrators new to Azure and for ad hoc scenarios
• Complexity hidden• Detailed Azure knowledge not needed• Almost no overhead: defining factor for
time-to-transfer is database size
Scenarios: SQL Server Data Files in Windows Azure
Windows Azure Storage
Node2
Node1
DB1
DB1
DB1
sp_attach_db
Migrate Database to another machine
Basic Disaster Recovery
Separation of Compute and Storage
For Azure VM, expand drive and size of Xdrive
Better together: IaaS VM per minute billing
SQL Server Data Files in Windows Azure
Create database syntax does not change:
Restore is simply an attach operation:
Using Visual Studio SQL Server Project
• Where is the source of your Database?
• How do you update SP and Function?
• How do you update your environment Dev, UAT , Prod?
Questions ?