• Save
SQL Server 2008 Overview
Upcoming SlideShare
Loading in...5

SQL Server 2008 Overview



Presentation at Microsoft Architect Council in November 2007 - by Steve Muise, Neudesic

Presentation at Microsoft Architect Council in November 2007 - by Steve Muise, Neudesic



Total Views
Views on SlideShare
Embed Views



3 Embeds 10

http://blogs.msdn.com 6
http://static.slidesharecdn.com 2
http://www.slideshare.net 2



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

SQL Server 2008 Overview SQL Server 2008 Overview Presentation Transcript

  • Steve Muise Technology Strategist – SQL/BI Neudesic LLC Steve.muise@Neudesic.com 949.315.5888
  • Your Data Any Place, Any Time Services Integration Reporting Analysis Synch FILE RDBMS OLAP Query Search XML Mobile and Cloud Desktop Server
  • Relational Data Documents & Multimedia Applications XML Spatial
  • Application Tier BI Analysis Compliance Application Integration Reporting Increasing complexity Data Model Tier Object Mapping Search & Indexing Rich Query Capability Caching & Synch Storage Tier Large Data Sets Reliability and Scale Transactions & Security Referential Integrity Relational Documents & XML Data Spatial Multimedia Growth of the types of data to be hosted
  • SQL Server 2008 SQL Server 2005 • XML Data Type and • XML Upgrades Functions XML • Remote BLOB Store API Documents & • FILESTREAM • Full Text Indexing • Integrated FTS Multimedia • Fully supported Geometry and Geography data types Spatial and Functions • Large UDTs • Flexible Columns • Wide Tables • User Defined Types Relational • Filtered Indices Data • HierarchyID
  • • Storage Attribute on VARBINARY(MAX) • Unstructured data stored directly in the Store BLOBs in file system (requires NTFS) DB + File System • Dual Programming Model – TSQL (Same as SQL BLOB) Application – Win32 Streaming APIs with T-SQL BLOB transactional semantics • Data Consistency • Integrated Manageability – Back Up / Restore DB – Administration • Size limit is the file system volume size • SQL Server Security Stack
  • • Full-Text Indexes fully integrated into SQL Server • Make mixed queries perform and scale SELECT * FROM RealEstate WHERE CONTAINS(Type, ’”New Home”’) AND ZipCode = ‘92648’
  • Geometry Geography • Geometry can store instances of • Very similar interface to various types geometry – Points, Line strings, Polygons – Some methods have different semantics – Collections of the above • Most data commonly available • Methods for computing user data is geodetic – Spatial relationships: intersects, disjoint, etc. – Spatial constructions: intersection, union, etc. – Metric functions: distance, area – Planar is conceptually simpler, but more specialized Spatial Indexing supported for both data types
  • • Storage and retrieval of spatial data using standard SQL syntax – New Spatial Data Types (geometry, geography) – New Spatial Methods (intersects, buffer, etc.) – New Spatial Indexes • Offers full set of Open Geospatial Consortium components (OGC/SQL MM, ISO 19125) • Query speed (spatial index) • Integration with Virtual Earth
  • Spatial Data
  • • Improved XML Schema Validation – Full support for storing & validating Office 12 Document formats – Support for lax validation – Full xs:dateTime support • Support for no timezone values • timezone preservation – Support for lists and union types • Added support for let-clause in XQuery • Added support insert sql:variable(“@xml”) into /a/b
  • • New data type: HierarchyId • Rich built-in methods for manipulating hierarchies – Simplifies storage and querying of hierarchical data • Supports depth-first and breadth-first indexes
  • HierarchyID
  • • Scenarios – Semi-structured Data: Property Set Storage • Databases with heterogeneous data • Distinct properties associated with subsets of data • Large Number of sparsely populated properties • Examples – Product Catalogs • Distinct Product specific properties – Document Management Systems • Document specific/user-defined properties – GPS/Mapping Systems • Location/Business specific Properties
  • pk c1 sc1 sc2 sc3 sc4 sc5 sc6 sc7 sc8 sc9 1 A 1 9 2 B 2 4 3 C 6 7 4 D 1 5 5 E 4 8 6 F 3 9 7 G 5 7 8 H 2 8 9 I 3 6
  • NULL values: 0 bytes. Non-NULL: +(2-4)b. Slightly slower to access pk c1 sc1 sc2 sc3 sc4 sc5 sc6 sc7 sc8 sc9 1 A (sc1, sc9) (1,9) 2 B (sc2, sc4) (2,4) 3 C (sc6, sc7) (6, 7) 4 D (sc1, sc5) (1,5) 5 E (sc4, sc8) (4, 8) 6 F (sc3, sc9) (3,9) 7 G (sc5, sc7) (5, 7) 8 H (sc2, sc8) (2, 8) 9 I (sc3, sc6) (3, 6)
  • • Column Set – A logical grouping for all sparse columns in a table Create Table Products(Id int, Type nvarchar(16), ProductProperties XML COLUMN_SET FOR ALL_SPARSE_COLUMNS); – Updateable, computed XML column – Select * returns all non-sparse-columns, sparse column set – Allows generic retrieval/update of sparse columns as a set • Limits are maintained throughout the system
  • pk c1 sc1 sc2 sc3 sc4 sc5 sc6 sc7 sc8 sc9 1 A 1 9 2 B 2 4 3 C 6 7 4 D 1 5 5 E 4 8 6 F 3 9 7 G 5 7 8 H 2 8 9 I 3 6 • Create index i1 on T(sc1) where C1=A or C1=D; select sc1 from T where c1=A and sc1>5 • Create index i2 on T(sc7) where sc7 IS NOT NULL; select sc1 from T where sc7=5
  • Data Any Place, Any Time FILESTREAMS - Gives data consistency and integrated manageability REMOTE STORE BLOB API – simple API’s for fetch, create, enumerate, Garbage collection, delete Returns reference that is stored in the db Full-Text Indexing - Mixed query performance Spatial Data – Integration with Virtual Earth Relational Data - HierarchyID - store arbitrary hierarchies of data and efficiently query them. New UDT to implement hierarchies. - Large UDTs - no more 8k limit - Sparse columns - optimized storage for sparsely populated columns. - Wide tables - support for hundreds of thousands of sparse columns. - Filtered indexes - define indexes over subsets of data. Index on rows in a table with a particular value.
  • Scalability and Performance SQL 2008 Key Benefits Effective Memory Balanced Workload Efficient Data storage Optimal Concurrency Utilization Performance • Store relational and • Automatic, dynamic • Use Resource Governor • Proactive lock non-relational data memory management to: management through types efficiently the LOCK_ESCALATION • Reduce disk I/O by • Differentiate table option • Data and backup maintaining buffer workloads compression reduce pool • Isolation levels to suit • Allocate hardware storage requirements all concurrency • Release memory to resources by and improve I/O scenarios system as required workload performance • Granular locking to • Support for large • Achieve predictable • Sparse columns reduce maximize concurrent memory allocation performance NULL overhead access: • 64 GB on Windows • Row Server Datacenter Edition (using AWE) • Partition • Up to 8 TB on 64-bit • Table hardware • Database
  • High Availability Key Benefits Database Mirroring Failover Clustering Replication Online Operations • Reliable data • Full server • Enterprise-wide • Online index availability protection data availability management and restore operations • Automatic • Integration with • Easy to configure failover with Windows Server and manage • Hot-add memory transparent 2008 and CPUs • Configuration client • No “1drive wizard redirection letter per • Visual • Suspect page instance! management recovery from limitation interface mirror • Supports up to • Add nodes • Optimal 16 nodes without stopping performance • Cluster validation services • Synchronous or to help you asynchronous choose the right mode hardware • Log stream compression
  • Security Key Benefits Authentication and Reduced Surface Full Event Auditing Native Encryption Authorization Area • Enforce password • Secure by default • Audit all actions • Granular policies for all across the encryption of data • Minimize attack users enterprise exposure • Transparent • Comprehensive, • Consolidate audit cryptography – no • Enable only the yet easy to reporting custom client services and manage development features you hierarchical required require security model • Consolidated key management that supports 3rd party providers and hardware security modules
  • Manageability Key Benefits Centralized Automated Policy-Based Consolidated Administration Operations Management Monitoring • SQL Server • Scheduled • Declarative • Performance Management database Management Studio Studio – a single maintenance Framework (DMF) • Monitor, tune, administration operations • Define policies and interface for all • Automated alert for servers, troubleshoot services and management databases, SQL Server instances tables, etc. instances throughout the • Check and enterprise enforce policies: • Collect • Proactively performance • After changes data from • On a multiple scheduled sources basis • Store • Using ad-hoc performance checks data centrally
  • CTP 5 • Encryption with application transparency – Expands the SQL Server 2005 encryption offering • Database level scope – Introduces Database Encryption Key (DEK) • Data at rest protection – Backups are encrypted (by default?) CREATE DATABASE ENCRYPTION KEY WITH ALGORITHM = AES_128 ENCRYPTION BY SERVER CERTIFICATE ent_cert ALTER DATABASE <database_name> SET ENCRYPTION {ON | OFF}
  • CTP 5 • Smooth Upgrade • Disallow plan changes for critical plans • Troubleshooting queries (cardinality tuner) • Plan fixing for ISV applications • Stability between test and production systems
  • CTP 4 • High performance lightweight tracing infrastructure – Easier to instrument – Suitable for production environments – Reduced troubleshooting time • Integrated with ETW (Event Tracing for Windows) – Enables activity correlation at unprecedented levels Provides the foundation for other high performance tracing subsystems in SQL Server (e.g. Audit) Lays the foundation for key diagnostic and supportability enhancements for troubleshooting SQL Server
  • CTP 6 • From building blocks in SQL Server 2005 to out-of-the- box solution in SQL Server 2008 • AUDIT is a first Class Server Object • Granular audit actions on database objects and/or users • Multiple outputs (File, Windows Application Log, Security Event Log)
  • CTP 6 • High performance – Based on Extended Events • Built in tools for consolidation of Audit Logs across enterprise – Function provided to help pull in logs to a table • Full Analysis Services and Reporting Services support on consolidated data
  •  Declarative Management Framework  Import/Export Surface Area Configuration  Enforce Naming Convention  Scalability/Security Policies  Configuration Server  Single Server configured to manage a group of servers  Mass Query across all servers simultaneously  Enforce DMF Policies  Data Collector  Collect data from multiple servers to a single MDW  Collects from multiple sources (unlike Trace)  Uses SSIS and Agent to move data  Out of the box: T-SQL, Trace, Perf Counters
  • SQL Server • Single resource pool Backup • Database engine OLTP Activity doesn’t differentiate Admin Tasks workloads Executive Reports Ad-hoc Reports • Best effort resource sharing Workloads Memory, CPU, Threads, … Resources
  • SQL Server Executive • Ability to differentiate Backup OLTP Reports workloads Activity – e.g. app_name, Admin Tasks Ad-hoc Reports login • Per-request limits OLTP Workload Admin Workload Report Workload – Max memory % – Max CPU time – Grant timeout Memory, CPU, Threads, … – Max Requests • Resource monitoring Resources
  • Database Engine SQL Server Putting it all together Executive • Workloads are mapped to Backup OLTP Reports Resource Pools (n : 1) Activity • Online changes of Admin Tasks Ad-hoc groups/pools Reports • SQL Server 2005 = default High group + default pool OLTP Workload Admin Workload Report Workload Main Benefit • Prevent run-away queries Min Memory 10% Max CPU 90% Max Memory 20% Max CPU 20% Application Pool Admin Pool
  • • Mirroring is now V2 – no fear • Replication just got way easier, don’t get carried away though • Locking down consistently across the enterprise is now easy • Managing resources on the server just got way easier • xEvents and Audits will be terribly useful, take the time to figure out how to use them • Service Broker (arguably one of the greatest things in SQL 05) is getting easier to setup and manage
  • Connect To Your Data From Any Device SQL Server Change Tracking  Access your data from anywhere  Store your data locally while disconnected from server Synchronized Programming Model  Synchronize Incremental changes between client and server Visual Studio Support  Detect conflicts during synchronization including deletes  Add disconnected scenarios without SQL Server Conflict Detection re-writing existing applications
  • T-SQL “Delighters” • T-SQL Enhancements DECLARE @t int = 5; INSERT dbo.myT VALUES (‘WA’, @t), (‘FL’, @t+1); UPDATE dbo.myT SET instances+=1; • Continued investment and innovation in T-SQL
  • INSERT over DML • Ability to have INSERT statement consume results of DML – Enhancement over OUTPUT INTO <table> clause • DML OUTPUT can be filtered with a WHERE clause – Data accessing predicates not allowed (sub-queries, data accessing UDFs and full-text) • Why? – History tracking of slowly changing dimensions – Dumping DML data stream to a secondary table for post-processing
  • INSERT over DML INSERT INTO Books (ISBN, Price, Shelf, EndValidDate) SELECT ISBN, Price, Shelf, GetDate() FROM ( MERGE Books T USING WeeklyChanges AS S ON T.ISBN = S.ISBN AND T.EndValidDate IS NULL WHEN MATCHED AND (T.Price <> S.Price OR T.Shelf <> S.Shelf) THEN UPDATE SET Price = S.Price, Shelf = S.Shelf WHEN NOT MATCHED THEN INSERT VALUES(S.ISBN, S.Price, S.Shelf, NULL) OUTPUT $action, S.ISBN, Deleted.Price, Deleted.Shelf ) Changes(Action, ISBN, Price, Shelf) WHERE Action = 'UPDATE’;
  • MERGE statement • New DML statement that combines multiple DML operations – Building block for more efficient ETL – SQL-2006 compliant implementation Source Target XXXXX XXX XXX XXXXX X XX XXX If source matches target, XXXX XXX XXXX XXX UPDATE XXXXXXXXXX If no match, XXX XXX X XXX XXXX XX INSERT XX XXXX If source not matched, XXXXX XXX XX DELETE
  • MERGE statement MERGE Stock S USING Trades T ON S.Stock = T.Stock WHEN MATCHED AND (Qty + Delta = 0) THEN DELETE -- delete stock if Qty reaches 0 WHEN MATCHED THEN -- delete takes precedence on update UPDATE SET Qty += Delta WHEN NOT MATCHED THEN INSERT VALUES (Stock, Delta) OUTPUT $action, T.Stock, inserted.Delta;
  • Date & Time Enhancements • 4 new data types • SQL Standard compatible • 3 Byte Fixed Storage Size • Date only Date • From 0001-01-01 to 9999-01-01 in Gregorian calendar • Time only Time (n) • Optional user specifiable fractional precisions up to 100 nanoseconds • Time-zone aware/preserved UTC datetime DateTimeOffset(n) • Optional user specifiable fractional precisions up to 100 nanoseconds • Large date range • Optional user specifiable fractional precisions up to DateTime2 (n) 100 nanoseconds (Default) • Time-zone NOT aware
  • Date & Time Data Types CREATE TABLE t1 (c1 DATE, c2 TIME(3), c3 DATETIME2(7) NOT NULL DEFAULT GETDATE(), c4 DATETIMEOFFSET CHECK (c4<CAST(GETDATE() AS DATETIMEOFFSET(0))) ); INSERT INTO t1 VALUES ('0001-01-01', '23:59:59', '0001-12-21 23:59:59.1234567', '0001-10-21 23:59:59.1234567 -07:00'); INSERT INTO t1 VALUES ('9999-12-31', '23:59:59', '9999-12-31 23:59:59.1234567', '1111-10-21 23:59:59.1234567 -07:00'); SELECT c4, DATEPART(TZOFFSET, c4), DATEPART(ISO_WEEK, c4), DATEPART(MICROSECOND, c4) FROM t1;
  • Table Types • User-defined Table Types – A new user defined type – Aligned with inlined table definition for table variables – Can be used for declaring table variables – Can define indexes and constraints – New Catalog view for table types Sys.table_types • Benefits – Usability, Type Matching, Precise Typing • In 2000/5 we had UDF that returned TVF – These were populated with hardcoded queries – Couldn’t SELECT … INTO
  • Table-Valued Parameters (TVP) • Parameters of type “Table Type” • Input parameters on SPs/Functions • New “ReadOnly” keyword is needed. • TVPs are scoped within the SP/function body • Optimized to scale and perform better for large data • Behaves like BCP inside server
  • Table Valued Parameters And Merge
  • Grouping Sets • Extension to the GROUP BY clause • Lets you define multiple groupings in the same query • Produces a single result set that is equivalent to a UNION ALL of differently grouped rows. Makes aggregation querying and reporting easier and faster
  • Grouping Sets
  • Top Take-Aways • Moving to a paradigm shift from “application centric” to “data centric” • LINQ is coming – the app dev guys are going to want to use, better learn it • Separate Date and Time data types will reduce the duct tape solutions • INSERT over DML – track changes for compliance or for warehousing (replace those triggers!) • Table Type/TVP – get rid of temp tables • Grouping Sets – stop building aggregation tables
  • Pervasive Insight Enterprise Data Warehouse • Scale and Manage large number of Partitioned Table Parallelism users and data – Improve Query performance on large tables – Optimize Queries for data warehousing Star Join scenarios – Increase I/O performance with efficient and cost effective data storage Data Compression – Manage concurrent workloads of ad-hoc queries, reporting and analysis • Integrate growing volumes of data Persistent Lookups – Optimize ETL performance by identifying data in your largest tables – Reduce the data load volumes by capturing Change Data Capture (CDC) operational changes in data – Simplify the insert and update data processing – Profile your information to identify dirty data Data Profiling
  • Pervasive Reach All Your Users With Insight Scalable BI Platform • Deliver insights throughout your Scalable Report Engine organization – Deliver reports of any size at enterprise scale Scale out Analysis – Scale out through read-only Analysis Services storage Subspace Computations – Enhance analytical capabilities with more complex computations and aggregations • Deploy and manage your BI infrastructure New Cube Design Tools – Streamline development of the analysis infrastructure with new cube design tools Best Practice Design Alerts – Optimize cube design with real time best practice alerts Scalable Backup Tools – Backup cubes with enhanced scalability – Deploy Reporting Services without IIS dependency IIS Agnostic Report Deployment
  • Pervasive Empower Every User With Insight Actionable Insights • Deliver information via Microsoft Office New Word Rendering – Render reports to Microsoft Word – Enjoy improved rendering to Microsoft Excel Improved Excel Rendering – Bring data mining to new, much broader Data Mining Add-Ins for Excel audience • Enable users to create powerful reports Report Builder Enhancements – Build powerful ad-hoc reports – Create reports with any structure using Tablix More Flexible Report Layout – Add rich text regions your reports – Embed powerful graphical data visualizations Rich-Text Support into reports (Dundas) Enhanced Data Visualization • Empower users with enhanced analysis – Empower users with enhanced write back MOLAP Enabled Write Back scenarios – Accelerate end user prediction capabilities Data Mining Engine Improvements through enhanced Data Mining structures
  • Change Tracking • Tracks the PK of a changed record • Doesn’t track changed values • Tracks RowVersion, including Deleted rows • Tracks at Transaction Commit – insure accuracy • Used in Applications with multiple clients • “Retention Period” defines archive depth • Fast, Lightweight, Accurate way to determine if a record has been changed since loaded into app.
  • Pervasive Insight Change Tracking
  • Pervasive Insight Change Data Capture (CDC) • Mechanism to easily track changes on a table – Changes captured from the log asynchronously – Information on what changed at the source • Feature only available in Enterprise and Developer Edition • Table-Valued Functions (TVF) to query change data – Easily consumable from Integration Services XXXXX XXX XXX Capture XXXXX XXX XXX XXXX XXX XXXXXXXXXX X XXX XXXX XX XXXX XXX Process Transaction XXXXXXXXXX X XXX XXXX XX XX XXXX Log XXXXX XXX XX Source Table XXX XXX XXXXXX XXX CDC CDC Functions Table
  • Pervasive Insight Change Data Capture (CDC) • Mechanism to easily track changes on a table – Changes captured from the log asynchronously – Information on what changed at the source • Feature only available in Enterprise and Developer Edition • Table-Valued Functions (TVF) to query change data – Easily consumable from Integration Services EXEC sys.sp_cdc_enable_db_change_data_capture EXEC sys.sp_cdc_enable_table_change_data_capture EXEC cdc.fn_cdc_get_all_changes_<instance> EXEC cdc.fn_cdc_get_net_changes_<instance>
  • Pervasive Insight Integration Services New Threading Architecture New Tasks/Components/Enumerators Enhanced Lookup
  • Pervasive Insight Reporting Services • Light Version For Novice Users Stand-Alone Report Designer • Non-Visual Studio Windows Based Tool On Demand Processing Model • Memory Footprint of large reports much smaller • No longer dependent to IIS • Uses HTTP.sys Self Hosting • Uses SQL Server’s networking stack Manage Server from Management Studio • Reports are no longer managed in browser Unified Pagination Across Output Formats • Same number of pages should render with Excel, PDF, Word, etc… New Visualization • Charts and Gauges (Dundas acquistion) Tablix • Table + Matrix
  • SSRS „08 Performance Response Time (Large Table with Constant Row Visibility) 900 800 RS2005 SP1 Response Time [ms] 700 RS2008 CTP6 600 500 400 300 200 100 0 0 50 100 150 200 Page Number Response Time (Table With Grouping) 1200 RS2005 SP1 1000 RS 2008 CTP6 Respnse Time [ms] 800 600 400 200 0 0 50 100 150 200 250 300 350 400 450 500 Page Number
  • Pervasive Insight Tablix = Table + Matrix Table Matrix Customer Growth Retail 2001 2002 Total Acme 19% Retail Acme 1,115 1,331 2,446 Nadir, Inc. 322% Nadir, Inc. 152 642 794 Wholesale Wholesale ABC Corp. 11,156 13,312 24,468 ABC Corp. 19% XYZ, Ltd. 1,523 6,421 7,944 Grand Total 13,946 21,706 35,653 XYZ, Ltd. 322% Grand Total 56%
  • Pervasive Insight Hierarchal Rows with Dynamic Headers Matrix Tablix 2005 2006 2005 2006 Washington Seattle 50 60 Washington 80 100 Spokane 30 40 Seattle 50 60 Total 80 100 Spokane 30 40 Oregon Portland 40 50 Oregon 60 80 Eugene 20 30 Portland 40 50 Total 60 80 Eugene 20 30
  • Pervasive Insight Mixing Dynamic and Static Columns 2005 2006 Pop Area WA Seattle 50 60 WA Seattle 20 30 Matrix Spokane 30 40 Spokane 10 20 OR Portland 40 50 OR Portland 10 10 Eugene 20 30 Eugene 25 5 2005 2006 Pop Area WA Seattle 50 60 20 30 Tablix Spokane 30 40 10 20 OR Portland 40 50 10 10 Eugene 20 30 25 5
  • Pervasive Insight Parallel Dynamic Groups 2005 2006 Table Chair WA Seattle 50 60 WA Seattle 20 30 Matrix Spokane 30 40 Spokane 10 20 OR Portland 40 50 OR Portland 10 10 Eugene 20 30 Eugene 25 5 Year Product 2005 2006 Pop Area Tablix WA Seattle 50 60 20 30 Spokane 30 40 10 20 OR Portland 40 50 10 10 Eugene 20 30 25 5
  • Chart Examples
  • Chart Examples
  • Gauge Examples
  • Pervasive Analysis Services - Best Insight Practice Design Alerts • Over 40 best practices integrated into real time designer checks • Blue Squiggly lines serving as build time warnings • Enable/Disable Alert Checks
  • Pervasive Insight Dimension Design • Attribute Relationship Designer – New Designer for viewing and editing attribute relationships – Multiple built-in validations for support of ideal dimension design • Dimension Wizard • Dimension Editor
  • Pervasive Insight Dimension Design
  • SQL 2008 Summary • Performance Enhancements • Across the board – all things faster • Make it easier to stay up • Security Enhancements • Encryption made easy • Administration Enhancements • Manage from single point • Enforce rules/best practices • Development • Make hard tasks easier • Business Intelligence • Scale Improvements • Design Improvements • Sexy is easy now