The DBA landscaping and tooling is changing rapidly and the DBA need to keep up with the new technologies related to SQL Azure, Big Data and NoSQL. SQL Server 2016 is brining many new features that will help you become that modern DBA. This sessions will demo the new features help you get ready for the change that is coming in the world of Data.
2. 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
4. • 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
5. • 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
6. What does DBA mean?
• DataBase
• Administrator ?
• Default
• Blame
• Acceptance
7. 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
8. 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
9. 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.
10. DocumentDB NoSQL
• What is Document DB?
• Not for Document but for JSON
• Query language is like TSQL
• It got Stored Procedure, Index…
14. 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
15. Taking advantage of dacpac and bacpac
• dacpac = Data-tier Application (Schema definition)
• bacpac = Data-tier Application with data
16. 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
17. 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, …)
19. • Simple configuration UI
• Easy creation of Azure
credential
• No overhead
Backup to Windows Azure
20. Backup to Windows Azure Tool
? 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
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 status
for local storage and Azure storage
25. Deploy databases to Windows Azure VM
• New wizard to deploy databases to SQL Server
in Windows Azure VM
• Can also create a new Windows Azure VM if
needed
• 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
28. 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?
General T-SQL Tips can be found here: https://www.mssqltips.com/sql-server-developer-resources/
Dynamic SQL : https://www.mssqltips.com/sql-server-tip-category/80/dynamic-sql
Sequence: https://www.mssqltips.com/sqlservertip/2345/sql-server-2012-sequence-numbers
SSB Tips: https://www.mssqltips.com/sqlservertip/2121/event-notifications-in-sql-server-for-tracking-changes
Output :https://www.mssqltips.com/sqlservertip/1381/sql-server-trigger-alternatives-with-the-output-clause
What is JSON: https://en.wikipedia.org/wiki/JSON
JSON in SQL 2015: http://blogs.msdn.com/b/jocapc/archive/2015/05/16/json-support-in-sql-server-2016.aspx
https://www.mssqltips.com/sqlservertip/4046/sql-server-2016-query-store-example/
https://www.mssqltips.com/sqlservertip/4004/sql-server-2016-row-level-security-introduction/
Intro to LINQ to SQL (https://www.mssqltips.com/sqlservertip/1502/introduction-to-language-integrated-query-linq/)
MS Learn: https://msdn.microsoft.com/en-ca/data/ef.aspx
Documentation: https://msdn.microsoft.com/en-US/data/ee712907
Pluralsight: http://www.pluralsight.com/?creative=74686304598&keyword=entity%20framework&matchtype=p&network=g&device=c&gclid=Cj0KEQjwy92wBRCl7trx4PaIo8EBEiQASPhtC8-kdwJmbAZIUgOtlnHdpR895ui314_kM9hmlHpxoOIaArvN8P8HAQ
Not only are we enabling new unique hybrid scenarios, we are also simplify cloud adoption for our customers. With SQL Server 2014 we will also ship a new migration wizard that will help DBAs easily migrate their on-premises SQL Server instance to Windows Azure and again directly through SSMS as you can see in the screen shot there, point and click and you instance will be up and running in Azure in no time.
Once you become familiar with Windows Azure you can start to take advantage of the Windows Azure Virtual Machine to run many scenarios in the cloud including fast dev/test of your SQL Server applications, moving existing applications, doing hybrid scenarios like we talked about, BI scenarios in the cloud because you have full SQL Server functionality including all of the BI services. In addition you have full control over the VM so if you want to put your corporate anti-virus on the VM you can.
Once you have become comfortable with the Windows Azure environment you can take advantage of Windows Azure SQL Database service offering that will speed development of your new database application even faster because you don’t have to manage the database, it is a service, you don’t have to patch the OS or database we take care of that, all you do is develop your application using the service. The SQL Database service also has unique cloud features like dynamic scalability of the database using Federations like Flavorus did to achieve their business goals. In addition this database service also offers an SLA for the database running inside the VM and you don’t have think about setting up high availability because it is built-in to the database service by default. This is where we see cloud applications doing fast development, less maintenance and faster time to market.