sql server 2016: just a few of our dba's favorite things

39
SQL Server 2016: Just a Few Of Our DBA’s Favorite Things Rodney Landrum, Senior DBA Consultant for Ntirety, a division of HOSTING

Upload: hosting

Post on 03-Mar-2017

77 views

Category:

Technology


5 download

TRANSCRIPT

Page 1: SQL Server 2016: Just a Few of Our DBA's Favorite Things

SQL Server 2016:Just a Few Of Our DBA’s Favorite ThingsRodney Landrum, Senior DBA Consultant for Ntirety, a division of HOSTING

Page 2: SQL Server 2016: Just a Few of Our DBA's Favorite Things

www.HOSTING.com 2

Housekeeping• This webinar is being recorded and an on-demand version will be available at the same URL at the

conclusion of the webinar• Please submit questions via the button on the bottom left of the viewer

• If we don’t get to your question during the webinar, we will follow up with you via email• Download PowerPoint slides via the “Attachments” button below the viewing panel• On Twitter (@HOSTINGdotcom) or LinkedIn (HOSTING)? Be sure to follow for news, resources

and announcements for future webinars!

Page 3: SQL Server 2016: Just a Few of Our DBA's Favorite Things

Microsoft Has Delivered

Page 4: SQL Server 2016: Just a Few of Our DBA's Favorite Things

Enterprise Comes to Standard

Page 5: SQL Server 2016: Just a Few of Our DBA's Favorite Things

And Not Just SQL Server 2016

Page 6: SQL Server 2016: Just a Few of Our DBA's Favorite Things

A List of Our Favorite New Features We Will Cover

• Query Store – Available in All Editions of SQL Server 2016• Dynamic Data Masking• Database Cloning• Always Encrypted• Fine Grain Auditing

Page 7: SQL Server 2016: Just a Few of Our DBA's Favorite Things

Features Worth Mentioning in SQL Server 2016 Standard (SP1)

PolyBasehttps://msdn.microsoft.com/en-us/library/mt143171.aspx

Row Level Securityhttps://msdn.microsoft.com/en-us/library/dn765131.aspx

Basic Availability Groupshttps://msdn.microsoft.com/en-us/library/mt614935.aspx

Columnstore Indexeshttps://msdn.microsoft.com/en-us/library/dn934994.aspx

Page 8: SQL Server 2016: Just a Few of Our DBA's Favorite Things

Query StoreNo, it is not a place to buy queries.

• New to SQL Server 2016• Used at the database level to track query execution statistics• Is persisted in the database over time (not lost from the plan cache via

DMVs)• Is used to identify poor performing queries and plans

Page 9: SQL Server 2016: Just a Few of Our DBA's Favorite Things

Simple to Enable

ALTER DATABASE [Audit] SET QUERY_STORE = ONGOALTER DATABASE [Audit] SET QUERY_STORE (OPERATION_MODE = READ_WRITE)GO

Page 10: SQL Server 2016: Just a Few of Our DBA's Favorite Things
Page 11: SQL Server 2016: Just a Few of Our DBA's Favorite Things
Page 12: SQL Server 2016: Just a Few of Our DBA's Favorite Things
Page 13: SQL Server 2016: Just a Few of Our DBA's Favorite Things

Database Cloning

• Added to SQL Server 2016 SP1 and SQL Server 2014 SP2• Does not include data and uses the file properties of Model• Used primarily for diagnostics and troubleshooting query performance• Can copy schema, statistics and query store

Page 14: SQL Server 2016: Just a Few of Our DBA's Favorite Things
Page 15: SQL Server 2016: Just a Few of Our DBA's Favorite Things
Page 16: SQL Server 2016: Just a Few of Our DBA's Favorite Things
Page 17: SQL Server 2016: Just a Few of Our DBA's Favorite Things

Fine Grain Auditing

Prior to SP1 Only Server Level Audit For Standard EditionCapture Update/Insert/Delete activity at the object levelFilter audit events with log viewer or programmatically

Page 18: SQL Server 2016: Just a Few of Our DBA's Favorite Things

• Create Audit• Set File Location• Set Max File Size and Rollover• Don’t Check “Shut Down Server”• Next Assign Server or Database

Audit Specification to this Audit

Page 19: SQL Server 2016: Just a Few of Our DBA's Favorite Things

• Create an optional filter

Page 20: SQL Server 2016: Just a Few of Our DBA's Favorite Things
Page 21: SQL Server 2016: Just a Few of Our DBA's Favorite Things

Standard Log File Reader

Page 22: SQL Server 2016: Just a Few of Our DBA's Favorite Things
Page 23: SQL Server 2016: Just a Few of Our DBA's Favorite Things

Dynamic Data Masking• For masking or obfuscating specific columns of data from users• Easy to implement• Can be used for production and test environments

Page 24: SQL Server 2016: Just a Few of Our DBA's Favorite Things

CREATE TABLE [dbo].[Confidential](

[ID] [int] NULL,

[Name] [nvarchar](70)NULL,

[CreditCard] [varchar](9)NULL,

[Salary] [int] NULL,

[Email] [nvarchar](60)NULL

)ON [PRIMARY]

ALTER Table Confidential

ALTER COLUMN SALARY ADD MASKED WITH (FUNCTION='default()')

ALTER Table Confidential

ALTER COLUMN creditcard ADD MASKED WITH (FUNCTION='partial(2,"XXXX",2)')

ALTER Table Confidential

ALTER COLUMN email ADD MASKED WITH (FUNCTION='email()')

Page 25: SQL Server 2016: Just a Few of Our DBA's Favorite Things

CREATE USER Randy WITHOUT LOGIN;

GRANT SELECT ON Confidential TO Randy;

--Execute a select statement as Randy.

EXECUTE AS USER='Randy';

SELECT * FROM Confidential;

REVERT;

--Execute as administrator or a user with UNMASK permission

SELECT * FROM Confidential;

REVERT;

Page 26: SQL Server 2016: Just a Few of Our DBA's Favorite Things

Always Encrypted• Encrypts columns of data in transit and at rest• Relies on the client to encrypt and decrypt the data• Key store should not be SQL Server itself• Companies can more easily implement segregation of duties

• Disallow DBAs and Sysadmins to see confidential data

https://msdn.microsoft.com/en-us/library/mt163865.aspx

Page 27: SQL Server 2016: Just a Few of Our DBA's Favorite Things
Page 28: SQL Server 2016: Just a Few of Our DBA's Favorite Things

Normal connection to SQL Server via SSMS

Page 29: SQL Server 2016: Just a Few of Our DBA's Favorite Things
Page 30: SQL Server 2016: Just a Few of Our DBA's Favorite Things

CREATE or ALTERProbably one of the most requested T-SQL additionsAdded in SQL Server 2016 SP1

Page 31: SQL Server 2016: Just a Few of Our DBA's Favorite Things
Page 32: SQL Server 2016: Just a Few of Our DBA's Favorite Things

New DMV Information

Lock Pages in MemoryInstant File Initialization

To find whether or not SQL Server was using these features you had to scan through error logs or look up local security policy assignments for arcane permissions like “Perform Volume Maintenance Tasks”.

Page 33: SQL Server 2016: Just a Few of Our DBA's Favorite Things

SELECT sql_memory_model , sql_memory_model_descFROM sys.dm_os_sys_info;

Page 34: SQL Server 2016: Just a Few of Our DBA's Favorite Things

SELECT servicename , startup_type , startup_type_desc , status_desc , last_startup_time , instant_file_initialization_enabledFROM sys.dm_server_services;

Page 35: SQL Server 2016: Just a Few of Our DBA's Favorite Things

Trace Flags

All the newly introduced Trace flags with SQL Server 2016 SP1 are documented and can be found at http://aka.ms/traceflags.

Page 36: SQL Server 2016: Just a Few of Our DBA's Favorite Things

And Our Favorite New Feature

Reporting Services 2016With

Power BI Integration on Premises(not technically SQL Server 2016)

Page 37: SQL Server 2016: Just a Few of Our DBA's Favorite Things

My Local SSRS 2016 Instance – Pretty Boring

Page 38: SQL Server 2016: Just a Few of Our DBA's Favorite Things
Page 39: SQL Server 2016: Just a Few of Our DBA's Favorite Things

For more information on how HOSTING can help guide your business to the cloud, go to www.HOSTING.com

Q&A