Date post: | 17-Jan-2018 |
Category: |
Documents |
Upload: | felicia-ellis |
View: | 222 times |
Download: | 0 times |
SQL Server 2012The Grand Tour
Brian Garraty@NULLgarity
Who I am
SQL Server DBA
Virginia Beach Public Schools
MCITP DBA
HRSSUG Leadership Team
Prior Life: C++/VB Developer
Itinerary – Part 1
Functional yet Elegant
The Workshop
Modern Luxuries
Home Security
Itinerary – Part 2
Available Now
Bells & Whistles
Negotiations
The Small Print
My Promise
I will aim to Refrain from any marketing babble Refrain from use of unneeded buzzwords Not use any of the following expressions:▪ Mission Critical Confidence▪ Breakthrough Insight▪ Cloud on Your Terms
Disclaimers
Not yet running 2012 in Production High Level No demos We won’t cover everything Very light on
BI Cloud
Historical Perspective
7.5 (1998) Architecture Improvements Scalability
2000 Rewrite from Sybase OLAP, ETL Clustering XML
Historical Perspective
2005 Manageability (DMVs) Performance (CLR, Partitioning) High Availability (Mirroring)
2008 (continue prior momentum) Manageability (PBM) Performance (Compression)
Historical Perspective
2008 R2 PowerPivot Report Builder 3.0 Master Data Services
Azure (2010) SQL as a Service
Historical Perspective
2012 (My Take) Customer Feedback Driven Showstopper Breakthroughs Azure into the Fold
Functional EleganceYour T-SQL can T-Sizzle...
Logical Functions
CHOOSE ( index, val_1, val_2 [, val_n ] )
IIF ( boolean_expression, true_value,
false_value )
String Functions
CONCAT ( string_value1, string_value2 [,
string_valueN ] )
FORMAT ( value, format [, culture ] )
Conversion Functions PARSE
( string_value AS data_type [ USING culture ] )
TRY_CAST ( expression AS data_type [ ( length ) ] )
TRY_CONVERT ( data_type [ ( length ) ], expression [, style ] )
TRY_PARSE
Date and Time Functions
DateFromParts ( year, month, day )
DateTime2FromParts ( year, month, day, hour, minute,
seconds, fractions, precision )
EOMonth ( start_date [, month_to_add ] )
EXECUTE … WITH RESULTS UNDEFINED – any or none
NONE –abort if results returned
<result_sets_definition> Describes explicit result set(s) A step towards contract or interface Useful in SSIS OLEDB source
EXECUTE … WITH RESULTSEXEC uspGetEmployeeManagers 16WITH RESULT SETS( ([Reporting Level] int NOT NULL, [ID of Employee] int NOT NULL, [Employee First Name] nvarchar(50 ) NOT NULL, [Employee Last Name] nvarchar(50 ) NOT NULL, [Employee ID of Manager] nvarchar(50 ) NOT NULL, [Manager First Name] nvarchar(50 ) NOT NULL, [Manager Last Name] nvarchar(50 ) NOT NULL ));
Sequence Numbers
Similar to IDENTITY
Not tied to table
Controlled by application NEXT VALUE FOR
Sequence Use Cases
Default value for columns
Concatenated value identity
Cross statement ROW_NUMBER()
THROW
Raises exception, invokes CATCH block
If outside TRY…CATCH, ends session with severity 16
Simpler than RAISEERROR
Useful inside CATCH blocks
Metadata Discovery
SET FMTONLY Deprecated
sp_describe_first_result_set @tsql = N'Transact-SQL_batch @params = N'parameters' @browse_information_mode =
<tinyint>
Also via similar DMFs
The WorkshopEverything you need to get ‘er done...
SSMS Changes
“Powered by” Visual Studio 2010
F5 is the new Ctrl-E (aargh!)
Result grid columns rearrangable
Editor windows are draggable
More SSMS Changes
Restore GUI enhancements
Page Restore GUI
Database Engine Tuning Advisor Query Plan Cache Workload Top 1,000 events by default
Most Unsettling SSMS Change No Support for Legacy File
Extensions .PRC .TAB .UDF etc
IntelliSense Improvements Code Snippets
Templates integrated with IntelliSense Customizable
Surround With BEGIN…END IF WHILE
Documentation Changes
Menu reads SQL Server Documentation
Defaults to Online help
Local installs separately
Same viewer as Visual Studio 2010 SP1
LocalDB
Dev-targeted Edition of Express
Runs in User Mode
“SQL Express-Lite”
Fast, zero-config install
Fewer pre-requisites
Automatic LocalDB Instances Public
Created and managed automatically
Usable by any app
Exists if LocalDB exists
Named LocalDB Instances Private
Created, owned, managed by app
Isolated, dedicated
Shared LocalDB Instances Support multiple users
Created by administrator
Either automatic or named
SSIS Changes
“Largest investment in SSIS to date”
SSIS Paradigm Shift 2.0
Project Concept Buildable Deployable Manageable
Best practice acknowledgement
SSIS Projects
Shared Connection Managers
Project scoped variables
Optional
SSIS Parameters
Replace configurations
Project or Package Level
Package-scoped recognized by EPT
SSIS Dev Changes
SQL Server Data Tools is the new BIDS
Undo
Consistency in XML
Modern LuxuriesGranite countertops coated in PowerShell...
Columnstore Index
Turbo button for typical DW queries Columnar (versus row based) data format Speed from
Less data read, only columns Columns are heavily compressed Typical query uses few columns Columns are processed in chunks
Limitations Read only One per table
Extended Events
Wizard-driven Creation
GUI-driven Editor
Customizable Data Viewer
PowerShell
Increasingly used for SQL Management AlwaysOn SSIS
No longer installed by SQL Setup
SQLPS Now Deprecated Stick with SQLPSX & straight up
PowerShell
Home SecurityFor that peaceful, easy feeling...
More Secure by Default
No auto provisioning to sysadmin BUILTIN\Administrators Local System
Managed Service Accounts Created & managed by Domain
Controller Passwords SPNs
Domain\Accountname$ Windows Server 2008 R2 only
Virtual Accounts
Automatically managed local accounts
No Passwords NT SERVICE\<SERVICENAME> Access to network via computer
account <domain_name>\<computer_name>$
Windows Server 2008 R2 only
Contained Databases
Little or no server dependencies
Contained vs. uncontained objects
Useful for Failover SQL Azure Non sysadmin Administration
Audit Improvements
Server level supported in all editions (database level still Enterprise-only)
Recoverable audit log failures
User defined audits
Audit log filters (WHERE clause)
Other Security
User-defined server roles
Default schema for Windows Groups
New encryption algorithm support SHA2_256 SHA2_512
Stronger Server & Database Master Key Encryption (3DES to AES)
Available NowMove in ready!!!
High Availability
AlwaysOn – umbrella term Failover Cluster Instances Availability Groups
Online Operations Indexes with LOBs Adding Columns with Default Values
Failover Cluster Instances Multi-subnet Failover Clusters
Inter-datacenter No single, shared storage Data replication Disaster recovery + HA
FCI Flexible Failover Policy Upgrade from “SELECT @@SERVERNAME”
Windows uses dedicated connection
Health monitored via sp_server_diagnostics
Configurable Health Check Timeout
Configurable Failover Condition Level
FCI Failover Condition Level
0 – No automatic failover or restart 1 – On server down 2 – On server unresp0nsive 3 – On critical server errors 4 – On moderate server errors 5 – On qualified failure conditions,
e.g. SQL Service is down SQL Instance unresponsive etc
FCI Indirect Checkpoints
Checkpoints flush mods to disk
Impact recovery time on unexpected shutdown or failover
Normally target is server configuration
Database specific target
Tempdb on Local Disk
Move tempdb to SSD
People have been doing it for years
Now fully supported
AlwaysOn Availability Groups
Layman’s definition: DB mirroring for groups of databases
Components: Availability Groups Primary Replicas Multiple Secondary Replicas
Availability Group Wins
Secondary replicas Read only access Backup ops Automatic page repair Resource Utilization
Flexible Commit Modes
Flexible Failover Modes
Bells? Whistles?Ding dong. Whoot-hoot.
FileTable
Built on FILESTREAM SQL storing unstructured data on file system
File data exposed via Windows API
Simplified transition from file server
Supports files and directories
Access is non-transactional
Data Quality Services
“Knowledge driven data quality product”
Consists of Knowledge Bases Data Quality Projects
DQS Knowledge Bases
Knowledge of your data
Types Out of the box System Generated User Specified
DQS Data Domains
Building Block of Knowledge Base
Data Field Specific Knowledge
Tracks Valid/Invalid Values Synonym Associations Business Rules Matching Policies
DQS Data Quality Projects Facilitates use of Knowledge Base
Cleansing Projects DQS analyzes data, suggests what to do Human actually decides what to do Done by SSIS
Matching Projects Feeds on Cleansed Data Implements Matching Policy
DQS Under the Hood
Implemented by SQL Server DBs Stand-alone Client SSIS Cleansing Component Master Data Services Data Quality
Components
Let’s NegotiateMotivated Seller!!!
Editions
Enterprise
Business Intelligence
Standard
Developer, Express, & Compact
Retired Editions
Datacenter
Workgroup
Small Business
Licensing Changes
Options Core-based Server+CAL
Enterprise Edition – Core-based only Minimum Four
Licensing Changes
BI Edition – Server + CAL Only
Standard Either Model
HW Purchasing Decisions Impacted
Virtual Licensing
Virtual Machine Level Server + CAL Virtual Core Licensing
Host Server Level Physical Server Cores Unlimited VMs with EE & SA Without SA, limits on VM Moves
When to Upgrade?
High Availability Scenarios
Online Operation Scenario
New Data Quality Project
New Installs (when supported)
Others???
How to Upgrade
In-place Pros – no copying, same name Cons – all at once, error = disaster
recovery
Side-by-side Pros – piecemeal Cons – more work copying, configuring
Upgrade Advisor
Can analyze Data Objects T-SQL Scripts Workload Traces
Reports on Issues
Links to More Info
Upgrade Assistant
Replay 2005/2008/R2 activity on test server
Requires 4 Servers Production Baseline – same version as Production,
isolates activity Test – SQL Server 2012 Report – Saves Comparison Results
Small PrintPlease initial the bottom of each page...
Deprecations of Note
SQL Trace/SQL Profiler in favor of: xEvents
Not ending T-SQL statements with semi-colon
Slipstreaming in favor of: Product Updates
Deprecations of Note
SET FMTONLY See Metadata Discovery Slide
Osql.exe in favor of: sqlcmd.exe
90 Compatibility
Deprecations of Note
SET ROWCOUNT TOP
sysobjects, etc Compatibility views
text, ntext, image varchar(max), nvarchar(max),
varbinary(max)
RIP
8.0 Compatibilty
*= and =*
DTS
32-bit Address Windowing Extensions (AWE)
Resources & Reference (R&R) Data Quality Services Blog
Mike Walsh on User-defined Server Roles
Denny Cherry on Sequence Objects
James Rowland-Jones on EXECUTE WITH RESULT SETS
R&R Page 2
Aaron Bertrand on LocalDB
Aaron Bertrand on Columnstore Index
Jamie Thomson on SSIS
The Baker’s Dozen, 26 New Features in SQL Server Integration Services 2012, Kevin Goff, Code Magazine
R&R Page 3
Ashish Kumar Mehta on Data Type Conversion Functions
MSDN Blog on IntelliSense Improvements
History of SQL Server on YouTube
Pinal Dave on sp_describe_first_result_set
R&R Page 4
Conor Cunningham on Contained DBs
Michael Otey on Licensing
Grant Fritchey on Extended Events
Thanks!NULLgarity.wordpress.com