29
The modern DBA Presented by Jean-René Roy SQL Server MVP

Jean-René Roy : The Modern DBA

Embed Size (px)

Citation preview

Page 1: Jean-René Roy : The Modern DBA

The modern DBA

Presented byJean-René Roy SQL Server MVP

Page 2: Jean-René Roy : The Modern DBA

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

Page 3: Jean-René Roy : The Modern DBA

DevTeach Rebate Code:OT00NETUGCGood for $100 off the main conference

48 speakers 85 sessions presented in 3 days

Page 4: Jean-René Roy : The Modern DBA

• 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

Page 5: Jean-René Roy : The 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

Page 6: Jean-René Roy : The Modern DBA

What does DBA mean?

• DataBase• Administrator ?

• Default• Blame• Acceptance

Page 7: Jean-René Roy : The Modern DBA

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

Page 8: Jean-René Roy : The Modern DBA

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

Page 9: Jean-René Roy : The Modern DBA

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.

Page 10: Jean-René Roy : The Modern DBA

DocumentDB NoSQL

• What is Document DB?

• Not for Document but for JSON

• Query language is like TSQL

• It got Stored Procedure, Index…

Page 11: Jean-René Roy : The Modern DBA

What is IoT?

• Internet of Things

Page 12: Jean-René Roy : The Modern DBA

Azure Data Lake and Data Factory

Page 13: Jean-René Roy : The Modern DBA

Get started with U-SQL

Page 14: Jean-René Roy : The Modern DBA

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

Page 15: Jean-René Roy : The Modern DBA

Taking advantage of dacpac and bacpac

• dacpac = Data-tier Application (Schema definition)• bacpac = Data-tier Application with data

Page 16: Jean-René Roy : The Modern DBA

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

Page 17: Jean-René Roy : The Modern DBA

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, …)

Page 18: Jean-René Roy : The Modern DBA

R Integration in SQL Server will be Revolutionary

Page 19: Jean-René Roy : The Modern DBA

• Simple configuration UI• Easy creation of Azure

credential• No overhead

Backup to Windows Azure

Restore GUI Backup GUI

Page 20: Jean-René Roy : The Modern DBA

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

Page 21: Jean-René Roy : The Modern DBA

• http://www.microsoft.com/en-us/download/details.aspx?id=40740

Get it from this link:

Page 22: Jean-René Roy : The Modern DBA

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

Page 23: Jean-René Roy : The Modern DBA

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

Page 24: Jean-René Roy : The Modern DBA

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

Page 25: Jean-René Roy : The Modern DBA

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

Page 26: Jean-René Roy : The Modern DBA

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

Page 27: Jean-René Roy : The Modern DBA

SQL Server Data Files in Windows Azure

Create database syntax does not change:

Restore is simply an attach operation:

Page 28: Jean-René Roy : The Modern DBA

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?

Page 29: Jean-René Roy : The Modern DBA

Questions ?