SQL Server 2016: Just a Few of Our DBA's Favorite Things
-
Upload
hosting -
Category
Technology
-
view
77 -
download
5
Transcript of 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
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!
Microsoft Has Delivered
Enterprise Comes to Standard
And Not Just SQL Server 2016
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
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
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
Simple to Enable
ALTER DATABASE [Audit] SET QUERY_STORE = ONGOALTER DATABASE [Audit] SET QUERY_STORE (OPERATION_MODE = READ_WRITE)GO
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
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
• 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
• Create an optional filter
Standard Log File Reader
Dynamic Data Masking• For masking or obfuscating specific columns of data from users• Easy to implement• Can be used for production and test environments
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()')
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;
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
Normal connection to SQL Server via SSMS
CREATE or ALTERProbably one of the most requested T-SQL additionsAdded in SQL Server 2016 SP1
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”.
SELECT sql_memory_model , sql_memory_model_descFROM sys.dm_os_sys_info;
SELECT servicename , startup_type , startup_type_desc , status_desc , last_startup_time , instant_file_initialization_enabledFROM sys.dm_server_services;
Trace Flags
All the newly introduced Trace flags with SQL Server 2016 SP1 are documented and can be found at http://aka.ms/traceflags.
And Our Favorite New Feature
Reporting Services 2016With
Power BI Integration on Premises(not technically SQL Server 2016)
My Local SSRS 2016 Instance – Pretty Boring
For more information on how HOSTING can help guide your business to the cloud, go to www.HOSTING.com
Q&A