Feb 11, 2016
What’s new in SQL Server 2008Thavash GovenderBI Consultant iSolve Business Solutions
GameGameChangersChangers
• Transparent Data Encryption• External Key Management• Data Auditing• Pluggable CPU• Transparent Failover for
Database Mirroring• Declarative Management
Framework• Server Group Management• Streamlined Installation• Enterprise System
Management• Performance Data Collection• System Analysis• Data Compression• Query Optimization Modes• Resource Governor• Entity Data Model• LINQ• Visual Entity Designer• Entity Aware Adapters
SQL Server Change TrackingSynchronized Programming ModelVisual Studio SupportSQL Server Conflict DetectionFILESTREAM data typeIntegrated Full Text SearchSparse ColumnsLarge User Defined TypesDate/Time Data TypeLOCATION data typeSPATIAL data typeVirtual Earth IntegrationPartitioned Table ParallelismQuery OptimizationsPersistent Lookups Change Data Capture Backup CompressionMERGE SQL StatementData ProfilingStar Join
Enterprise Reporting EngineInternet Report DeploymentBlock ComputationsScale out AnalysisBI Platform ManagementExport to Word and ExcelAuthor reports in Word and ExcelReport Builder EnhancementsTABLIXRich Formatted DataPersonalized Perspectives… and many more
Beyond Relational
• FILESTREAM Data Type• Integrated Full Text Search• Sparse Columns• Large User Defined Types• Date/Time Data Type
• Location Data Type• Spatial Data Type• Virtual Earth Integration
BeyondBeyondRelationalRelational
Beyond Relational
• FILESTREAM Data Type• Integrated Full Text Search• Sparse Columns• Large User Defined Types• Date/Time Data Type
• Location Data Type• Spatial Data Type• Virtual Earth Integration
BeyondBeyondRelationalRelational
Store and Consume Store and Consume Any Type of DataAny Type of Data
Beyond Relational
• FILESTREAM Data Type• Integrated Full Text Search• Sparse Columns• Large User Defined Types• Date/Time Data Type
• Location Data Type• Spatial Data Type• Virtual Earth Integration
BeyondBeyondRelationalRelational
Store and Consume Store and Consume Any Type of DataAny Type of Data
Deliver Location Deliver Location IntelligenceIntelligence
Dynamic Development
• Entity Data Model• LINQ• Visual Entity Designer• Entity Aware Adapters• SQL Server Change Tracking• Merge SQL Statement
• Synchronized Programming Model• Visual Studio Support• SQL Server Conflict Detection
DynamicDynamicDevelopmentDevelopment
Comparison – Beyond Relational
• XML Data Type and Functions
• XML UpgradesXML
SQL Server SQL Server 20052005
SQL Server SQL Server 20082008
• Large UDTs• Flexible Columns• Wide Tables• Filtered Indices• HierarchyID
Relational Data
• User Defined Types
Spatial
• Fully supported Geometry and Geography data types and Functions
• Full Text IndexingDocuments & Multimedia
• Remote BLOB Store API• FILESTREAM• Integrated FTS
FileStreams
• Storage Attribute on VARBINARY(MAX)• Unstructured data stored on file system• Dual Programming Model
• TSQL (Same as SQL BLOB)• Win32 Streaming APIs with T-SQL
transactional semantics• Data Consistency and Transactions• Integrated Manageability• SQL Server Security Stack
Spatial Data• Spatial Data is about mapping …. • Many applications make very direct use of
mapping.• The map may very well be the primary output
of these applications• Examples:
– Consumer mapping products (Virtual Earth, etc.)– Cadastral mapping– Utility (electrical / water / gas) grid layouts– Business geographics
Beyond Mapping
• Many applications may make use of spatial data, even if they do not explicitly make maps.
• Examples:– Send warehouse pickers on efficient runs– Predict bus arrival times– Applying for building variances– Your favorite LOB app here
What is Spatial Data ?
• Vector– Points– LineStrings– Polygons (Areas, Regions)
• Raster– Satellite Imagery– Digitized Aerial Photos
Example
SELECT *FROM roads WHERE roads.geom.Intersects(@ms)=1
Which roads intersect Microsoft’s main campus?
Example Code
• Create an instance:declare @g geographyset @g = geography::Parse(‘POINT(47.6456 -122.12551)’)
• Create a table:create table T(id int, region geography)
• Select some dataselect *from Twhere region.STIntersects(@g) = 1
What’s new for developers ?
• ADO.NET Data Entities• New T-SQL statement : MERGE• Table-Valued-Parameters• GROUPING SETS• New data types / storage options :
– HierarchyID– User-Defined-Types (CLR) (Unlimited size)– DATE / TIME / DATETIME2 /
DATETIMEOFFSET
Enhanced Date and Time Types• Problems with existing types1.Application Complexity and storage cost
when only date or time is used. 2.Narrow Ranges 3.Lack of time zone awareness limit
scenarios. Existing Type Accuracy Date / Time Range
SmallDateTime 1 Minute 1900-1-1 to 2079-6-6
DateTime 3.33 milliseconds 1753-1-1 to 9999-12-31
DATE / TIME • DATE
– January 1st, 0001 A.D. December 31st, 9999– Precision : 1 day– Storage : 3 bytes
• TIME– 00:00:00.0000000 (midnight)
23:59:59.9999999– Precision : default is 7 decimal places (100 ns)– Storage : 3 – 5 bytes, depending on precision
DateTime2• January 1st, 1 A.D. December 31st, 9999
23:59:59.9999999• Precision : 100 ns, up to 7 decimal places (default)• Storage : 6 – 8 bytes, depending on precision• New system functions that return DATETIME2
values:– SYSDATETIME()– SYSUTCDATETIME()
• New arguments for DATEPART, DATEDIFF:– MICROSECOND– NANOSECOND
DateTimeOffset• Jan. 1st, 1 A.D.
Dec. 31st, 9999 23:59:59.9999999 +- 14:00• Precision : like others, 100 ns (7 decimal places)• Storage : 8 – 10 bytes, depending on precision• New system functions / arguments:
– SYSDATETIMEOFFSET()– SWITCHOFFSET()– TODATETIMEOFFSET()– DATENAME(TZOffset, <value>)
• Now we can centrally store local time information and still report using UTC, without any elaborate schema changes
Enhanced Date and Time Types
•DateTimeOffset additionally stores time zone offset from UTC.
HierachyID• System data type,variable
length– CLR UDT– Microsoft.SqlServer.Types– Compact Varbinary
encoding• Represent position in
hierarchy• Logically encodes
information about a single node in a hierarchy tree by encoding the path from the root of the tree to the node
• Rich built-in methods for manipulating hierarchies
• Simplifies storage and querying of hierarchical data
• Support for arbitrary insertions and deletions
Table Valued ParametersExisting solutions to an old problem• Pivoting large numbers of stored procedure
parameters– Complex application and stored procedure code
• Bulk inserting to temporary tables out-of-band– Limited ability to apply business logic
• Leveraging parameter arrays in client applications– Non-optimal performance for large data volumes
Demo – Table Valued Demo – Table Valued ParametersParameters
Merge• UPSERT and then some (also supports
DELETE)• Allows you to process multiple changes (e.g.
from a staging table) in a single statementMERGE <target> USING <source>ON (<join condition>)WHEN MATCHED [AND…] THEN…WHEN NOT MATCHED THEN…WHEN SOURCE NOT MATCHED THEN…
Demo – The Merge Demo – The Merge StatementStatement
Management Challenges• Huge number of features with each new
release• Data Centre and Server Consolidation –
more apps per server , more mission critical apps per data centre.
• Remote Management• You want to “lock down” SQL just like any
other environment, according to your company policies.
Declarative Management• What is Declarative Management:
• A new policy-based management framework for the SQL Server Database Engine
• Declarative Management Benefits:• Ensure compliance with policies for
system configuration• Prevent/monitor changes to the system
by authoring policies for the desired configuration• Scale management across multiple servers• Reduce total cost of ownership by simplifying
administration tasks
Demo – Declarative Demo – Declarative ManagementManagement
Reporting Services• New Tool – Report Designer• Improved Data Pane• Enhanced design experience – snap to
lines , zoom etc. • Dundas gauges and maps for charting ! • No need for IIS • Performance improvements• Report Builder improved too !
Simplified SQL 2005 Reporting Services Architecture
Windows Server OS
Internet Information Server Service Manager
ASP.Net
Report Processor
Report Models
Extensions
ReportMgr Web
AnotherWeb
Report Proc
Report Models
Extensions
Scheduling
Subscrip / Deliv
DB Maint
Report Server Web
Report Server Service
Simplified SQL 2008Reporting Services Architecture
Windows Server OS
IIS Service Manager
ASP.Net
AnotherWeb
“On Demand”Report Proc
Report Models
Extensions
Scheduling
Subscrip / Deliv
DB Maint
SQL OS – Network, CLR, ASP.Net
Memory Management
Report Mgr UI
Extensions
Report Manager Report Web Service Background Processing
Single Reporting Services Process Boundary
Paging
Demo – Report DesignerDemo – Report Designer
What’s new in SSIS ?
• New Script environment - VS shell • C# as a language !!! • Can reference all .NET assemblies• Enhanced SQL statements eg. Merge• New Data Types eg. Date, Time ,
DateTime2• New Wizards are much smarter !
What’s new in Analysis Services• New Attribute Relationship Designer• Cube – improved Auto Build algorithm• Simplified and Enhanced Dimension Wizard• Backup and Restore Improvements• Core Engine Performance Improvements• New Server Infrastructure for Resource
Monitoring and Stats Collecting• MOLAP writeback• And many more.......!!!!
Resources
• My blog • http://thavash.spaces.live.com/blo
g
• Microsoft • www.microsoft.com/sql/2008/learni
ng/webcasts.mspx
Thank you
http://www.microsoft.com/southafrica/ucs/2007