SlideShare a Scribd company logo
New Programmability Features
ValinorSQL Server Professional ServicesDatabase Projects end-to-endHigh Availability & Disaster RecoveryUpgradesPerformance Analysis & TuningSecurityTrainingcontact@valinor.co.il
ValinorSQL Server Complementary ToolsSQL diagnostic manager
SQLcompliance manager
SQLsafe backup
SQLchange manager
SQLdefrag manager
SQL comparison toolset
SQLadmin toolsetValinorhttp://www.sqlserver.co.il
AgendaT-SQL enhancementsMERGE StatementTable Valued ParametersGrouping SetsCompound AssignmentsTable value constructorsNew data typesFilestreamHierarchyIDTemporal data typesSpatial data typesSSMS EnhancementsIntellisenseMulti-instances queryRegistered Servers propertiesSSRS EnhancementsMore new featuresData compressionResource Governor
T-SQL EnhancementsMERGE StatementTable Valued ParametersGrouping SetsCompound AssignmentsTable value constructors
MERGE StatementWhat is it?MERGE allows you to compare two tables and apply changes to one of them according to matching and non-matching rowsAllows multiple set operations in a single SQL statementOperations can be INSERT, UPDATE, DELETEANSI SQL 2006 compliant - with extensions
What can I do with it?ETL processes“Update if exists, insert otherwise” stored proceduresData comparison, verification and modificationMERGE Statement
MERGE SyntaxMERGE [INTO] target_table AS targetUSING source_table AS source	(table, view, derived table)	ON <merge_search_conditions>WHEN MATCHED [AND <other predicates>]	UPDATE SET target.col2 = source.col2 	 (or delete)WHEN NOT MATCHED [BY TARGET] [AND <other predicates>]	INSERT [(col_list)] VALUES (col_list)WHEN NOT MATCHED BY SOURCE [AND <other predicates>]	DELETE						(or update)OUTPUT $action, inserted.col, deleted.col, source.col;	Get used to semicolons!
MERGE Statement$action function in OUTPUT clauseMultiple WHEN clauses possible For MATCHED and NOT MATCHED BY SOURCEOnly one WHEN clause for NOT MATCHEDRows affected includes total rows affected by all clauses
MERGE PerformanceMERGE statement is transactionalNo explicit transaction requiredOne pass through tablesAt most a full outer joinMatching rows (inner join) = when matchedLeft-outer join rows = when not matchedRight-outer join rows = when not matched by sourceWhen optimizing, optimize joinsIndex columns used in ON clause (if possible, unique index on source table)
MERGE and DeterminismUPDATE using a JOIN is non-deterministicIf more than one row in source matches ON clause, either/any row can be used for the UPDATE.MERGE is deterministicIf more than one row in source matches ON clause, an exception is thrown.
MERGE & TriggersWhen there are triggers on the target tableTrigger is raised per DML (insert/update/delete)“Inserted” and “deleted” tables are populatedIn much the same way, MERGE is treated by replication as a series of insert, update and delete commands.
Where is MERGE useful?Replace UPDATE … JOIN and DELETE … JOIN statementsETL ProcessesSet comparisonUpdate-if-exists, insert-otherwise proceduresIF EXISTS (SELECT … FROM tbl)	UPDATE tbl …ELSE 	INSERT …
MERGE Statement MERGE usageTable-Valued ParametersBefore SQL Server 2008In order to pass a set of data to SQL Server:Comma-delimited stringsXMLBULK INSERTWhy would I want to do that?Less database round-trip“Array” variableExample: Pass an order + its line detailsTable-valued parameters solve this problem
Table TypesSQL Server has table variables	DECLARE @t TABLE (id int);SQL Server 2008 adds strongly typed table variablesCREATE TYPE mytab AS TABLE (id int);DECLARE @t mytab;Parameters must use strongly typed table variables
Table Variables are Input OnlyDeclare and initialize TABLE variableDECLARE @t mytab;INSERT @t VALUES (1), (2), (3);EXEC myproc @t;Parameter must be declared READONLYCREATE PROCEDURE usetable	( @t mytabREADONLY ...)AS  INSERT INTO lineitems SELECT * FROM @t;  UPDATE @t SET... -- no!
TVP Implementation and PerformanceTable Variables materialized in TEMPDBFaster than parameter arrays, BCP APIs still fastestDuration (ms)Number of rows passed
Table-Valued Parameters Table-Valued Parameters end-to-endGrouping SetsGROUP BYUsed to group rows by values in specified columnsAggregate data sum(), count(*), avg(), min(), max()…)Grouping SetsWhy limit the query to a single grouping?
Grouping SetsGROUP BY ExtensionsGROUPING SETSSpecifies multiple groupings of data in one queryCUBE *All permutations in column setROLLUP*Sub totals, super aggregates and grand total.* don’t confuse with old nonstandard WITH CUBE and WITH ROLLUP options
Grouping_ID()New function that computes the level of groupingTakes a set of columns as parameters and returns the grouping levelHelps identify the grouping set that each result row belongs to.GROUPING(col) function returns 1 bit: 1 if the result is grouped by the column, 0 otherwise.
Grouping SetsHow to use Grouping SetsVariable Initialization & Compound AssignmentT-SQL#Small programming enhancements targeting more convenient and efficient developmentVariable InitializationDECLARE @i AS INT = 0	, @d AS DATETIME = CURRENT_TIMESTAMP	, @j AS INT = (SELECT COUNT(*) FROM sysobjects);select @i,@d, @j;
Table Value ConstructorsUse the VALUES clause to construct a set of rows to insert multiple rows or as a derived tablesINSERT INTO dbo.Customers(custid, companyname, phone, address)  VALUES  (1, 'cust 1', '(111) 111-1111', 'address 1'),  (2, 'cust 2', '(222) 222-2222', 'address 2'),  (3, 'cust 3', '(333) 333-3333', 'address 3');SELECT * FROM( VALUES 	 (CAST('20090730' AS DATE),'TishaB''Av')	,(CAST('20090918' AS DATE),'Erev Rosh HaShana')	,(CAST('20090919' AS DATE),'Rosh HaShana')	) AS holidays (HolidayDate,description)
FILESTREAM StorageTo Blob Or Not To Blob?Cons  LOBS take memory buffers  Updating LOBS causes fragmentation  Poor streaming capabalitiesPros  Transactional consistency  Point-in-time backup & restore  Single storage and query vehicle?
Dedicated BLOB StoreStore BLOBs in DatabaseUse File ServersApplicationApplicationApplicationBLOBsBLOBsBLOBsDBDBDBStreaming Performance
Integrated management
Data-level consistency
Enterprise-scales only
Scalability & ExpandabilityAdvantagesComplex application development & deployment
Separate data management
Integration with structured data
Poor data streaming support
File size limitations
Affects performance of structured data querying
Complex application development & deployment
Separate data management
Enterprise-scales onlyChallengesWindows File Servers
NetAppNetFiler
EMC Centera
Fujitsu Nearline
SQL Server VARBINARY(MAX)Example Blob Storage Options
FILESTREAM combines the best of 2 worlds  Integrates DB engine with NTFS
Stores BLOB data as filesFILESTREAM StorageApplicationBLOBsFEATURES: Uses NT cache for caching file data.
 SQL buffer pool is not used and is available to   query processing
Windows file system interface provides streaming access to data
 Compressed volumes are supported
 File access is part of DB transaction.DB
It’s not only about storing but also about working with BLOBS: Image analysis
Voice interpretation
Mixing satellite feeds & Spatial Data type for weather reports
and more…FILESTREAM Storage
FILESTREAM ProgrammingDual Programming ModelTSQL (Same as SQL BLOB)Win32 Streaming File IO APIsBegin a SQL Server TransactionObtain a symbolic PATH NAME & TRANSACTION CONTEXTOpen a handle using sqlncli10.dll - OpenSqlFilestreamUse Handle Within System.IO ClassesCommit Transaction
// 1. Start up a database transaction – SqlTransactiontxn = cxn.BeginTransaction();// 2. Insert a row to create a handle for streaming.newSqlCommand("INSERT <Table> VALUES ( @mediaId, @fileName, @contentType);",cxn, txn);// 3. Get a filestreamPathName & transaction context.newSqlCommand("SELECT PathName(), GET_FILESTREAM_TRANSACTION_CONTEXT() FROM <Table>", cxn, txn);// 4. Get a Win32 file handle using SQL Native Client call.SafeFileHandle handle = SqlNativeClient.OpenSqlFilestream(...);// 5. Open up a new stream to write the file to the blob.FileStreamdestBlob= newFileStream(handle, FileAccess.Write);// 6. Loop through source file and write to FileStream handlewhile ((bytesRead = sourceFile.Read(buffer, 0, buffer.Length)) > 0)   {destBlob.Write(buffer, 0, bytesRead);}// 7. Commit transaction, cleanup connection. –txn.Commit();FILESTREAM Programming
FILESTREAM ImplementationServer & Instance levelEnable filestream (in setup or configuration manager)Make sure port 445 (SMB) is open if remote access is usedExec sp_configure'filestream_access_level', [0/1/2]At Database LevelCreate a filestreamfilegroup & map to directoryAt Table LevelDefine VARBINARY(MAX) FILESTREAM column(s)Must have UNIQUEIDENTIFIER column (and file extension column if FTS is used)
FILESTREAM ImplementationIntegrated securityACLs (NT permissions) granted only to SQL Server service account.Permissions to access files implied by granting read/write permissions on FILESTREAM column in SQL Server.Naturally, only Windows authentication is supported.Integrated managementBACKUP and RESTORE (for both database and log) also backup and restore FILESTREAM data.Note that in the FULL RECOVERY MODEL, “deleted” files are not deleted until log is backed up.
FILESTREAM LimitationsNot supported Remote FILESTREAM storageDatabase snapshot and MirroringSupported:Replication (with SQL Server 2008 subscribers)Log shipping (with SQL Server 2008 secondaries)SQL Server Express Edition (4gb size limit does not apply to FILESTREAM data container)Features not integratedSQL EncryptionTable Value Parameters
HierarchyID
HierarchyIDWhen should I use it?List forum threads
Business organization charts
Product categories
Files/Folders management
Anything hierarchicalFeatures:  Compact - 100,000 nodes in 6 levels ~ 5 bytes / node
  Available to CLR clients as the Sqlhierarchyid data typeEach node holds its parent’s name/IDPros:Understandable
Managable
2005 – CTEs can beused for recursive queriesCons: Queries are more complex
 Bad performance with large trees.2005 Alternatives - Adjacency Model
2005 Alternatives – Path EnumerationEach node holds a path to the root, as a string concatenationPros: Logical representation
 Easy tree traversalCons:  Difficult to maintain
 Searches are done with string functions (LIKE, string split)"Left“ and "Right“ columns represent edges Pros: Easy to query with >,
 Easy to indexCons: Difficult to maintain(try to add another underboss…)2005 Alternatives – Nested Sets
HierarchyID New data type in SQL Server 2008 Uses path enumeration, but in a much more efficient binary representation. Exposes methods to query the tree and set relations between nodes. Remember that it’s just data It’s up to the application to assign correct hierarchyID values to the nodes to represent the relations (using HierarchyID methods) It’s up to the developer/DBA to create a unique constraint on the hierarchyID column
HierarchyIDNodes are orderedRoot:  /First child: /1/Second Child: /2/First grandchild: /1/1/Second: /1/2/If you want to insert another grandchild between them - /1/1.1/
HierarchyID Methodshierarchyid::GetRoot() – get root of hierarchy treeHierarchyid::Parse() – same as cast(@str as hierarchyid)node.ToString() - Logical string representation of node’s hIDparent.GetDescendant(c1,c2)- returns a child node of parent between c1 and c2node.GetAncestor(n) - hierarchyid of the nth ancestor of nodenode.IsDescendantOf(pID) - true if node is a descendant of pIDnode.GetLevel() – integer representing  depth of nodenode.GetReparentedValue(oldRoot,newRoot) – get path to newRoot for node who is descendant of oldRoot (use to move subt-trees within tree)
Depth-first IndexBreadth-first IndexOrder by level, then pathUseful for querying immediate childrenOrdered by pathUseful for querying sub-treese.g. all files in a subfolderHierarchyID Indexes
Insert RootInsert 1st SubordinateInsert rest of treeQuery Hierarchical DataDemo Structure
HierarchyIDHierarchyID Basics
Trees and HierarchiesTemporal Data TypesPrior to SQL Server 2008DATETIMERange: 01-01-1753 to 31-12-9999Accuracy: Rounded increments of 3.333msStorage: 8 bytesSMALLDATETIMERange: 01-01-1900 to 06-06-2079Accuracy: 1 minuteStorage: 4 bytes
Date/Time TypesSQL Server 2008Save date and time in separate columns.	Query all logins that occurred 18:00-7:00 during weekdaysHigher precision Scientific dataTimezone offset	Global applications
DATE and TIMEDATE Data Type - Date Only01-01-0001 to 31-12-9999 Gregorian CalendarTakes only 3 bytesTIME Data Type -  Time OnlyVariable Precision - 0 to 7 decimal places for secondsUp to 100 nanosecondsTakes 3-5 bytes, depending on precision
DATETIME2 and DATETIMEOFFSETDATETIME2 Data Type01-01-0001 to 31-12-9999 Gregorian CalendarVariable Precision - to 100 nanosecondsTakes 6-8 bytes (same or less than DATETIME!)DATETIMEOFFSET01-01-0001 to 31-12-9999 Gregorian CalendarVariable Precision - to 100 nanosecondsTime Zone Offset (From UTCTime) PreservedNo Daylight Saving Time SupportTakes 8-10 bytes
Date/Time Types CompatibilityNew Data Types Use Same T-SQL FunctionsDATENAME (datepart, date)DATEPART (datepart,date)DATEDIFF (datepart, startdate, enddate)DATEADD (datepart, number, date)Datepart can also be microsecond, nanosecond, TZoffsetMONTHDAYYEARCONVERT
Date Time Library ExtensionsCurrent date/time in higher precision SYSDATETIMESYSUTCDATETIMESYSDATETIMEOFFSETOriginal date/time usesGETDATE, GETUTCDATE, CURRENT_TIMESTAMPISDATE(datetime/smalldatetime)Special functions for DATETIMEOFFSETSWITCHOFFSET(datetimeoffset, timezone)TODATETIMEOFFSET(datetime, timezone)
Temporal Data TypesNew date and time featuresSpatial Data TypeSpatial data provides answers to location-based queriesWhich roads intersect the Microsoft campus?Does my land claim overlap yours?List all of the Italian restaurants within 5 kilometersSpatial data is part of almost every databaseIf your database includes an address
Spatial Data TypeRepresent geometric data:PointLinesPolygonsMulti-point/line/polygon
Spatial Data TypeSQL Server supports two spatial data typesGEOMETRY - flat earth modelGEOGRAPHY - round earth modelBoth types support all of the instanciable OGC typesInstanceOf method can distinguish between them
Spatial Data Type - InputSpatial data is stored in a proprietary binary formatInstance of the type can be NULLCan be input asWell Known binary - ST[Type]FromWKBWell Known text - ST[Type]FromTextGeography Markup Language (GML) - GeomFromGmlCan also use SQLCLR functionsParsePoint - extension functionInput from SQLCLR Type - SqlGeometry, SqlGeography
Spatial Data Type - OutputSpatial Data Can Be Output AsWell Known binary - STAsBinaryWell Known text - STAsTextGML - AsGmlText with Z and M values - AsTextZMSQLCLR standard methodToString - returns Well Known textAs SQLCLR object - SqlGeometry, SqlGeographyOther useful formats are GeoRSS, KMLNot Directly Supported
Useful Spatial Methods & Properties
Spatial Data TypesNew spatial featuresManagement Studio EnhancementsIntellisenseFinally built in!Only available when querying 2008 instancesWord CompletionQuick InfoSyntax errorsDoesn’t work in SQLCMD mode!Can be turned offCode Collapse&Expand
Management Studio EnhancementsMulti Instance QueriesQuickly run SQL statements on multiple instancesDownside if you wish to insert the dataset to a single table, you better find some other tool.Useful for ad-hoc queries,  not more than that…Custom status bar color (per server)Quick traceNew Activity Monitor
Reporting Services 2008 EnhancementsArchitectureReporting engine no longer requires IISBetter memory managementReacts better to memory pressureBetter ProcessingOn-demand processing redesigned for scalability
Page to page response time is constantProcessing ImprovementsBenefits
Tablix ControlWhat is it?Best of both table data-region and matrix data-regionAllows fixed and dynamic columns and rowsEnables Arbitrary nesting on each axisEnables multiple parallel row/column members at each levelIntroduces optional omission of row/column headers

More Related Content

PDF
Oracle 21c: New Features and Enhancements of Data Pump & TTS
DOCX
Oracle Database 12c "New features"
PPTX
Oracle Database 12c - New Features for Developers and DBAs
PPSX
Oracle database 12c new features
PPTX
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
PDF
Oracle 12c New Features for Developers
PPTX
Best New Features of Oracle Database 12c
PDF
GLOC 2014 NEOOUG - Oracle Database 12c New Features
Oracle 21c: New Features and Enhancements of Data Pump & TTS
Oracle Database 12c "New features"
Oracle Database 12c - New Features for Developers and DBAs
Oracle database 12c new features
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
Oracle 12c New Features for Developers
Best New Features of Oracle Database 12c
GLOC 2014 NEOOUG - Oracle Database 12c New Features

What's hot (19)

PPTX
Oracle 12c Multi Tenant
PPTX
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
PPTX
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
PPTX
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...
PPTX
Oracle Basics and Architecture
PDF
oracle upgradation
PPTX
Dan Hotka's Top 10 Oracle 12c New Features
DOCX
Oracle dba interview questions with answer
PPT
Less17 flashback tb3
PPT
Less18 moving data
PPT
Less08 managing data and concurrency
PPT
Oracle 10g Introduction 1
PDF
Crating a Robust Performance Strategy
PPT
Oracle-L11 using Oracle flashback technology-Mazenet solution
PDF
Major features postgres 11
 
PPTX
Ensuring Data Protection Using Oracle Flashback Features - Presentation
DOCX
Dba 3+ exp qus
PDF
Oracle10g New Features I
PDF
Oracle SQL Tuning
Oracle 12c Multi Tenant
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...
Oracle Basics and Architecture
oracle upgradation
Dan Hotka's Top 10 Oracle 12c New Features
Oracle dba interview questions with answer
Less17 flashback tb3
Less18 moving data
Less08 managing data and concurrency
Oracle 10g Introduction 1
Crating a Robust Performance Strategy
Oracle-L11 using Oracle flashback technology-Mazenet solution
Major features postgres 11
 
Ensuring Data Protection Using Oracle Flashback Features - Presentation
Dba 3+ exp qus
Oracle10g New Features I
Oracle SQL Tuning
Ad

Similar to Sql Server 2008 New Programmability Features (20)

PPT
SQL Server 2008 for .NET Developers
PPT
Tech Days09 Sqldev
PPT
SQL Server 2008 for Developers
PPT
SQL Server 2008 Overview
PPT
What's New for Developers in SQL Server 2008?
PPTX
SQL Server 2012 Best Practices
PPT
New Features Sql 2008
PPT
SQL Server 2008 Performance Enhancements
PPT
Greg Lewis SQL Portfolio
PDF
Sql Server2008
PDF
Difference between sql server 2008 and sql server 2012
PDF
Chris Bull's Bi Portfolio
PPTX
SQL Windowing
PPTX
New Features of SQL Server 2016
PPTX
Dev Sql Beyond Relational
PPT
Using New Data Types In2008
PDF
Using sql server 2008's merge statement tech republic
PPT
Sql Portfolio(March 31)
PPTX
Exciting Features for SQL Devs in SQL 2012
PPTX
New T-SQL Features in SQL Server 2012
SQL Server 2008 for .NET Developers
Tech Days09 Sqldev
SQL Server 2008 for Developers
SQL Server 2008 Overview
What's New for Developers in SQL Server 2008?
SQL Server 2012 Best Practices
New Features Sql 2008
SQL Server 2008 Performance Enhancements
Greg Lewis SQL Portfolio
Sql Server2008
Difference between sql server 2008 and sql server 2012
Chris Bull's Bi Portfolio
SQL Windowing
New Features of SQL Server 2016
Dev Sql Beyond Relational
Using New Data Types In2008
Using sql server 2008's merge statement tech republic
Sql Portfolio(March 31)
Exciting Features for SQL Devs in SQL 2012
New T-SQL Features in SQL Server 2012
Ad

More from sqlserver.co.il (20)

PDF
Windows azure sql_database_security_isug012013
PPTX
Things you can find in the plan cache
PPTX
Sql server user group news january 2013
PPTX
DAC 2012
PPTX
Query handlingbytheserver
PPTX
Adi Sapir ISUG 123 11/10/2012
PPTX
Products.intro.forum version
PPTX
SQL Explore 2012: P&T Part 3
PPTX
SQL Explore 2012: P&T Part 2
PPTX
SQL Explore 2012: P&T Part 1
PPTX
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
PPTX
SQL Explore 2012 - Michael Zilberstein: ColumnStore
PPTX
SQL Explore 2012 - Meir Dudai: DAC
PPTX
SQL Explore 2012 - Aviad Deri: Spatial
PPTX
מיכאל
PPTX
נועם
PPTX
PPTX
מיכאל
PDF
Bi303 data warehousing with fast track and pdw - Assaf Fraenkel
PPTX
DBCC - Dubi Lebel
Windows azure sql_database_security_isug012013
Things you can find in the plan cache
Sql server user group news january 2013
DAC 2012
Query handlingbytheserver
Adi Sapir ISUG 123 11/10/2012
Products.intro.forum version
SQL Explore 2012: P&T Part 3
SQL Explore 2012: P&T Part 2
SQL Explore 2012: P&T Part 1
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
SQL Explore 2012 - Michael Zilberstein: ColumnStore
SQL Explore 2012 - Meir Dudai: DAC
SQL Explore 2012 - Aviad Deri: Spatial
מיכאל
נועם
מיכאל
Bi303 data warehousing with fast track and pdw - Assaf Fraenkel
DBCC - Dubi Lebel

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Cloud computing and distributed systems.
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPT
Teaching material agriculture food technology
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
KodekX | Application Modernization Development
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Machine learning based COVID-19 study performance prediction
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
cuic standard and advanced reporting.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Cloud computing and distributed systems.
Agricultural_Statistics_at_a_Glance_2022_0.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Teaching material agriculture food technology
Spectral efficient network and resource selection model in 5G networks
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
KodekX | Application Modernization Development
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Machine learning based COVID-19 study performance prediction
Review of recent advances in non-invasive hemoglobin estimation
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Understanding_Digital_Forensics_Presentation.pptx
Big Data Technologies - Introduction.pptx
NewMind AI Weekly Chronicles - August'25 Week I

Sql Server 2008 New Programmability Features

  • 2. ValinorSQL Server Professional ServicesDatabase Projects end-to-endHigh Availability & Disaster RecoveryUpgradesPerformance Analysis & TuningSecurityTrainingcontact@valinor.co.il
  • 3. ValinorSQL Server Complementary ToolsSQL diagnostic manager
  • 10. AgendaT-SQL enhancementsMERGE StatementTable Valued ParametersGrouping SetsCompound AssignmentsTable value constructorsNew data typesFilestreamHierarchyIDTemporal data typesSpatial data typesSSMS EnhancementsIntellisenseMulti-instances queryRegistered Servers propertiesSSRS EnhancementsMore new featuresData compressionResource Governor
  • 11. T-SQL EnhancementsMERGE StatementTable Valued ParametersGrouping SetsCompound AssignmentsTable value constructors
  • 12. MERGE StatementWhat is it?MERGE allows you to compare two tables and apply changes to one of them according to matching and non-matching rowsAllows multiple set operations in a single SQL statementOperations can be INSERT, UPDATE, DELETEANSI SQL 2006 compliant - with extensions
  • 13. What can I do with it?ETL processes“Update if exists, insert otherwise” stored proceduresData comparison, verification and modificationMERGE Statement
  • 14. MERGE SyntaxMERGE [INTO] target_table AS targetUSING source_table AS source (table, view, derived table) ON <merge_search_conditions>WHEN MATCHED [AND <other predicates>] UPDATE SET target.col2 = source.col2 (or delete)WHEN NOT MATCHED [BY TARGET] [AND <other predicates>] INSERT [(col_list)] VALUES (col_list)WHEN NOT MATCHED BY SOURCE [AND <other predicates>] DELETE (or update)OUTPUT $action, inserted.col, deleted.col, source.col; Get used to semicolons!
  • 15. MERGE Statement$action function in OUTPUT clauseMultiple WHEN clauses possible For MATCHED and NOT MATCHED BY SOURCEOnly one WHEN clause for NOT MATCHEDRows affected includes total rows affected by all clauses
  • 16. MERGE PerformanceMERGE statement is transactionalNo explicit transaction requiredOne pass through tablesAt most a full outer joinMatching rows (inner join) = when matchedLeft-outer join rows = when not matchedRight-outer join rows = when not matched by sourceWhen optimizing, optimize joinsIndex columns used in ON clause (if possible, unique index on source table)
  • 17. MERGE and DeterminismUPDATE using a JOIN is non-deterministicIf more than one row in source matches ON clause, either/any row can be used for the UPDATE.MERGE is deterministicIf more than one row in source matches ON clause, an exception is thrown.
  • 18. MERGE & TriggersWhen there are triggers on the target tableTrigger is raised per DML (insert/update/delete)“Inserted” and “deleted” tables are populatedIn much the same way, MERGE is treated by replication as a series of insert, update and delete commands.
  • 19. Where is MERGE useful?Replace UPDATE … JOIN and DELETE … JOIN statementsETL ProcessesSet comparisonUpdate-if-exists, insert-otherwise proceduresIF EXISTS (SELECT … FROM tbl) UPDATE tbl …ELSE INSERT …
  • 20. MERGE Statement MERGE usageTable-Valued ParametersBefore SQL Server 2008In order to pass a set of data to SQL Server:Comma-delimited stringsXMLBULK INSERTWhy would I want to do that?Less database round-trip“Array” variableExample: Pass an order + its line detailsTable-valued parameters solve this problem
  • 21. Table TypesSQL Server has table variables DECLARE @t TABLE (id int);SQL Server 2008 adds strongly typed table variablesCREATE TYPE mytab AS TABLE (id int);DECLARE @t mytab;Parameters must use strongly typed table variables
  • 22. Table Variables are Input OnlyDeclare and initialize TABLE variableDECLARE @t mytab;INSERT @t VALUES (1), (2), (3);EXEC myproc @t;Parameter must be declared READONLYCREATE PROCEDURE usetable ( @t mytabREADONLY ...)AS INSERT INTO lineitems SELECT * FROM @t; UPDATE @t SET... -- no!
  • 23. TVP Implementation and PerformanceTable Variables materialized in TEMPDBFaster than parameter arrays, BCP APIs still fastestDuration (ms)Number of rows passed
  • 24. Table-Valued Parameters Table-Valued Parameters end-to-endGrouping SetsGROUP BYUsed to group rows by values in specified columnsAggregate data sum(), count(*), avg(), min(), max()…)Grouping SetsWhy limit the query to a single grouping?
  • 25. Grouping SetsGROUP BY ExtensionsGROUPING SETSSpecifies multiple groupings of data in one queryCUBE *All permutations in column setROLLUP*Sub totals, super aggregates and grand total.* don’t confuse with old nonstandard WITH CUBE and WITH ROLLUP options
  • 26. Grouping_ID()New function that computes the level of groupingTakes a set of columns as parameters and returns the grouping levelHelps identify the grouping set that each result row belongs to.GROUPING(col) function returns 1 bit: 1 if the result is grouped by the column, 0 otherwise.
  • 27. Grouping SetsHow to use Grouping SetsVariable Initialization & Compound AssignmentT-SQL#Small programming enhancements targeting more convenient and efficient developmentVariable InitializationDECLARE @i AS INT = 0 , @d AS DATETIME = CURRENT_TIMESTAMP , @j AS INT = (SELECT COUNT(*) FROM sysobjects);select @i,@d, @j;
  • 28. Table Value ConstructorsUse the VALUES clause to construct a set of rows to insert multiple rows or as a derived tablesINSERT INTO dbo.Customers(custid, companyname, phone, address)  VALUES  (1, 'cust 1', '(111) 111-1111', 'address 1'),  (2, 'cust 2', '(222) 222-2222', 'address 2'),  (3, 'cust 3', '(333) 333-3333', 'address 3');SELECT * FROM( VALUES (CAST('20090730' AS DATE),'TishaB''Av') ,(CAST('20090918' AS DATE),'Erev Rosh HaShana') ,(CAST('20090919' AS DATE),'Rosh HaShana') ) AS holidays (HolidayDate,description)
  • 29. FILESTREAM StorageTo Blob Or Not To Blob?Cons LOBS take memory buffers Updating LOBS causes fragmentation Poor streaming capabalitiesPros Transactional consistency Point-in-time backup & restore Single storage and query vehicle?
  • 30. Dedicated BLOB StoreStore BLOBs in DatabaseUse File ServersApplicationApplicationApplicationBLOBsBLOBsBLOBsDBDBDBStreaming Performance
  • 34. Scalability & ExpandabilityAdvantagesComplex application development & deployment
  • 39. Affects performance of structured data querying
  • 46. SQL Server VARBINARY(MAX)Example Blob Storage Options
  • 47. FILESTREAM combines the best of 2 worlds Integrates DB engine with NTFS
  • 48. Stores BLOB data as filesFILESTREAM StorageApplicationBLOBsFEATURES: Uses NT cache for caching file data.
  • 49. SQL buffer pool is not used and is available to query processing
  • 50. Windows file system interface provides streaming access to data
  • 51. Compressed volumes are supported
  • 52. File access is part of DB transaction.DB
  • 53. It’s not only about storing but also about working with BLOBS: Image analysis
  • 55. Mixing satellite feeds & Spatial Data type for weather reports
  • 57. FILESTREAM ProgrammingDual Programming ModelTSQL (Same as SQL BLOB)Win32 Streaming File IO APIsBegin a SQL Server TransactionObtain a symbolic PATH NAME & TRANSACTION CONTEXTOpen a handle using sqlncli10.dll - OpenSqlFilestreamUse Handle Within System.IO ClassesCommit Transaction
  • 58. // 1. Start up a database transaction – SqlTransactiontxn = cxn.BeginTransaction();// 2. Insert a row to create a handle for streaming.newSqlCommand("INSERT <Table> VALUES ( @mediaId, @fileName, @contentType);",cxn, txn);// 3. Get a filestreamPathName & transaction context.newSqlCommand("SELECT PathName(), GET_FILESTREAM_TRANSACTION_CONTEXT() FROM <Table>", cxn, txn);// 4. Get a Win32 file handle using SQL Native Client call.SafeFileHandle handle = SqlNativeClient.OpenSqlFilestream(...);// 5. Open up a new stream to write the file to the blob.FileStreamdestBlob= newFileStream(handle, FileAccess.Write);// 6. Loop through source file and write to FileStream handlewhile ((bytesRead = sourceFile.Read(buffer, 0, buffer.Length)) > 0) {destBlob.Write(buffer, 0, bytesRead);}// 7. Commit transaction, cleanup connection. –txn.Commit();FILESTREAM Programming
  • 59. FILESTREAM ImplementationServer & Instance levelEnable filestream (in setup or configuration manager)Make sure port 445 (SMB) is open if remote access is usedExec sp_configure'filestream_access_level', [0/1/2]At Database LevelCreate a filestreamfilegroup & map to directoryAt Table LevelDefine VARBINARY(MAX) FILESTREAM column(s)Must have UNIQUEIDENTIFIER column (and file extension column if FTS is used)
  • 60. FILESTREAM ImplementationIntegrated securityACLs (NT permissions) granted only to SQL Server service account.Permissions to access files implied by granting read/write permissions on FILESTREAM column in SQL Server.Naturally, only Windows authentication is supported.Integrated managementBACKUP and RESTORE (for both database and log) also backup and restore FILESTREAM data.Note that in the FULL RECOVERY MODEL, “deleted” files are not deleted until log is backed up.
  • 61. FILESTREAM LimitationsNot supported Remote FILESTREAM storageDatabase snapshot and MirroringSupported:Replication (with SQL Server 2008 subscribers)Log shipping (with SQL Server 2008 secondaries)SQL Server Express Edition (4gb size limit does not apply to FILESTREAM data container)Features not integratedSQL EncryptionTable Value Parameters
  • 63. HierarchyIDWhen should I use it?List forum threads
  • 67. Anything hierarchicalFeatures: Compact - 100,000 nodes in 6 levels ~ 5 bytes / node
  • 68. Available to CLR clients as the Sqlhierarchyid data typeEach node holds its parent’s name/IDPros:Understandable
  • 70. 2005 – CTEs can beused for recursive queriesCons: Queries are more complex
  • 71. Bad performance with large trees.2005 Alternatives - Adjacency Model
  • 72. 2005 Alternatives – Path EnumerationEach node holds a path to the root, as a string concatenationPros: Logical representation
  • 73. Easy tree traversalCons: Difficult to maintain
  • 74. Searches are done with string functions (LIKE, string split)"Left“ and "Right“ columns represent edges Pros: Easy to query with >,
  • 75. Easy to indexCons: Difficult to maintain(try to add another underboss…)2005 Alternatives – Nested Sets
  • 76. HierarchyID New data type in SQL Server 2008 Uses path enumeration, but in a much more efficient binary representation. Exposes methods to query the tree and set relations between nodes. Remember that it’s just data It’s up to the application to assign correct hierarchyID values to the nodes to represent the relations (using HierarchyID methods) It’s up to the developer/DBA to create a unique constraint on the hierarchyID column
  • 77. HierarchyIDNodes are orderedRoot: /First child: /1/Second Child: /2/First grandchild: /1/1/Second: /1/2/If you want to insert another grandchild between them - /1/1.1/
  • 78. HierarchyID Methodshierarchyid::GetRoot() – get root of hierarchy treeHierarchyid::Parse() – same as cast(@str as hierarchyid)node.ToString() - Logical string representation of node’s hIDparent.GetDescendant(c1,c2)- returns a child node of parent between c1 and c2node.GetAncestor(n) - hierarchyid of the nth ancestor of nodenode.IsDescendantOf(pID) - true if node is a descendant of pIDnode.GetLevel() – integer representing depth of nodenode.GetReparentedValue(oldRoot,newRoot) – get path to newRoot for node who is descendant of oldRoot (use to move subt-trees within tree)
  • 79. Depth-first IndexBreadth-first IndexOrder by level, then pathUseful for querying immediate childrenOrdered by pathUseful for querying sub-treese.g. all files in a subfolderHierarchyID Indexes
  • 80. Insert RootInsert 1st SubordinateInsert rest of treeQuery Hierarchical DataDemo Structure
  • 82. Trees and HierarchiesTemporal Data TypesPrior to SQL Server 2008DATETIMERange: 01-01-1753 to 31-12-9999Accuracy: Rounded increments of 3.333msStorage: 8 bytesSMALLDATETIMERange: 01-01-1900 to 06-06-2079Accuracy: 1 minuteStorage: 4 bytes
  • 83. Date/Time TypesSQL Server 2008Save date and time in separate columns. Query all logins that occurred 18:00-7:00 during weekdaysHigher precision Scientific dataTimezone offset Global applications
  • 84. DATE and TIMEDATE Data Type - Date Only01-01-0001 to 31-12-9999 Gregorian CalendarTakes only 3 bytesTIME Data Type - Time OnlyVariable Precision - 0 to 7 decimal places for secondsUp to 100 nanosecondsTakes 3-5 bytes, depending on precision
  • 85. DATETIME2 and DATETIMEOFFSETDATETIME2 Data Type01-01-0001 to 31-12-9999 Gregorian CalendarVariable Precision - to 100 nanosecondsTakes 6-8 bytes (same or less than DATETIME!)DATETIMEOFFSET01-01-0001 to 31-12-9999 Gregorian CalendarVariable Precision - to 100 nanosecondsTime Zone Offset (From UTCTime) PreservedNo Daylight Saving Time SupportTakes 8-10 bytes
  • 86. Date/Time Types CompatibilityNew Data Types Use Same T-SQL FunctionsDATENAME (datepart, date)DATEPART (datepart,date)DATEDIFF (datepart, startdate, enddate)DATEADD (datepart, number, date)Datepart can also be microsecond, nanosecond, TZoffsetMONTHDAYYEARCONVERT
  • 87. Date Time Library ExtensionsCurrent date/time in higher precision SYSDATETIMESYSUTCDATETIMESYSDATETIMEOFFSETOriginal date/time usesGETDATE, GETUTCDATE, CURRENT_TIMESTAMPISDATE(datetime/smalldatetime)Special functions for DATETIMEOFFSETSWITCHOFFSET(datetimeoffset, timezone)TODATETIMEOFFSET(datetime, timezone)
  • 88. Temporal Data TypesNew date and time featuresSpatial Data TypeSpatial data provides answers to location-based queriesWhich roads intersect the Microsoft campus?Does my land claim overlap yours?List all of the Italian restaurants within 5 kilometersSpatial data is part of almost every databaseIf your database includes an address
  • 89. Spatial Data TypeRepresent geometric data:PointLinesPolygonsMulti-point/line/polygon
  • 90. Spatial Data TypeSQL Server supports two spatial data typesGEOMETRY - flat earth modelGEOGRAPHY - round earth modelBoth types support all of the instanciable OGC typesInstanceOf method can distinguish between them
  • 91. Spatial Data Type - InputSpatial data is stored in a proprietary binary formatInstance of the type can be NULLCan be input asWell Known binary - ST[Type]FromWKBWell Known text - ST[Type]FromTextGeography Markup Language (GML) - GeomFromGmlCan also use SQLCLR functionsParsePoint - extension functionInput from SQLCLR Type - SqlGeometry, SqlGeography
  • 92. Spatial Data Type - OutputSpatial Data Can Be Output AsWell Known binary - STAsBinaryWell Known text - STAsTextGML - AsGmlText with Z and M values - AsTextZMSQLCLR standard methodToString - returns Well Known textAs SQLCLR object - SqlGeometry, SqlGeographyOther useful formats are GeoRSS, KMLNot Directly Supported
  • 93. Useful Spatial Methods & Properties
  • 94. Spatial Data TypesNew spatial featuresManagement Studio EnhancementsIntellisenseFinally built in!Only available when querying 2008 instancesWord CompletionQuick InfoSyntax errorsDoesn’t work in SQLCMD mode!Can be turned offCode Collapse&Expand
  • 95. Management Studio EnhancementsMulti Instance QueriesQuickly run SQL statements on multiple instancesDownside if you wish to insert the dataset to a single table, you better find some other tool.Useful for ad-hoc queries, not more than that…Custom status bar color (per server)Quick traceNew Activity Monitor
  • 96. Reporting Services 2008 EnhancementsArchitectureReporting engine no longer requires IISBetter memory managementReacts better to memory pressureBetter ProcessingOn-demand processing redesigned for scalability
  • 97. Page to page response time is constantProcessing ImprovementsBenefits
  • 98. Tablix ControlWhat is it?Best of both table data-region and matrix data-regionAllows fixed and dynamic columns and rowsEnables Arbitrary nesting on each axisEnables multiple parallel row/column members at each levelIntroduces optional omission of row/column headers
  • 100. Mixed Dynamic & Static columns 20052008
  • 104. Report Builder 2Reporting Services 2008 Usability features
  • 105. Why?Cost of storage rises with database size
  • 106. High-end disks are expensive
  • 107. Multiple copies required – test, HA, backups
  • 108. Cost of managing storage rises with database size
  • 109. Time taken for backups and maintenance operations (IO bound)
  • 110. Time taken to restore backups in a disaster
  • 111. Migration from other platforms (Oracle or DB2) that support compression is not possible
  • 112. Compressing data leads to better memory utilization
  • 113. SQL Server needs data compression!! (But only in Enterprise edition…)Data Compression
  • 114. Data CompressionBefore SQL Server 2008(n)varchar, varbinary – no trailing spaces or zeroes saved (unlike char, binary)
  • 115. SQL Server 2005 SP2 introduces vardecimal
  • 116. Same solution – variable length column, empty bytes are not stored
  • 117. But on a smaller scale:
  • 119. Decimal’s maximum capacity is 17 bytes (percision 29-38)
  • 120. (but if you have millions of decimal cells in a fact table, you can benefit from compression)Data CompressionNew in SQL Server 2008Row Compression
  • 121. Compresses fixed-length data types by turning them into variable-length (a step up from vardecimal).
  • 122. Row meta data (row header, null bitmap) is also saved in a new variable-length format.
  • 126. Dictionary compressionRow CompressionRow compressionCREATE TABLE Countries (ID INT, Name CHAR(50))
  • 127. Row CompressionRow compressionCREATE TABLE Countries (ID INT, Name CHAR(50))4 bytes50 bytes(4b + 50b) * 3 rows = 162 bytes (not including row overhead)
  • 128. Row CompressionRow compressionCREATE TABLE Countries (ID INT, Name CHAR(50))50 bytes4 bytesRow Compression1 byte7 bytes1 byte11 bytes1 byte6 bytes
  • 129. Row CompressionRow compressionCREATE TABLE Countries (ID INT, Name CHAR(50))1 byte7 bytes1 byte11 bytes1 byte6 bytes162 bytes reduced to:1+7+1+11+1+6 = 27 bytes (not including row overhead and 4 bits per column for offsets)
  • 130. Page Compression1st phase: Row compression2nd phase: Prefix compressionThe general idea is to look for repeating patterns at the beginning of each value in each column.
  • 131. The largest value for each column is stored in the compression information structure (CI).
  • 132. The in-row values are replaced with indicators of full or partial matches with the value in the CI.
  • 133. The process uses byte-level comparisons across all data types.2nd phase: Prefix compression examplePrefix compressionPage Compression
  • 134. 2nd phase: Prefix compression examplePrefix compressionPage Compression
  • 135. Page Compression3rd phase: Dictionary compressionThe whole page is scanned looking for common values, which are stored in the CI area on the page.
  • 136. The in-row values are replaced with pointers to the CI area.Dictionary compression
  • 137. Estimating space savingsEXEC sp_estimate_data_compression_savingsReturns current size and estimated compressed size for a table, an index or a partition of them, according to selected compression type (row or page).
  • 138. It creates a sampled subset of the data in tempdb and compresses it using the requested compression mechanism to get the estimate.Enabling and Disabling Data CompressionData compression can be set on heaps, clustered indexes, non-clustered indexes and their partitions (including indexes on views).
  • 139. Setting data compression on a table (CREATE/ALTER TABLE ) only affects the heap or the clustered index.
  • 140. Data compression has to be set for each non-clustered index individually.Enabling and Disabling Data CompressionSyntax:CREATE/ALTER TABLE … REBUILD WITH ([PARTITION = ALL/partition_number,] DATA_COMPRESSION = NONE/ROW/PAGE)CREATE/ALTER INDEX … REBUILD WITH (DATA_COMPRESSION = NONE/ROW/PAGE [ON PARTITIONS (partition_number/range])
  • 141. When is data compressed?With ROW compression, compression occurs row by row, whenever a row is inserted or updated.With PAGE compression, it gets complicated.In heaps, PAGE compression only occurs in the following ways:On table REBUILD When data is inserted with BULK INSERTWhen data is inserted with INSERT INTO … WITH(TABLOCK)
  • 142. When is data compressed?In indexes, pages are only ROW compressed until they fill up. When the next insert occurs, it triggers PAGE compression.If there’s space left for the new row after PAGE compression, the row is compressed and inserted into the newly compressed page.If there’s no space, the page is not compressed and the row will be inserted on a new page
  • 143. Monitoring data compressionCompression states:data_compression column in sys.partitionssys.dm_db_index_operational_statspage_compression_attempt_count/page_compression_success_countsys.dm_db_index_physical_statscompressed_page_countNew System Monitor counters for the whole server Page compression attempts/sec Pages compressed/sec
  • 144. Data Compression: LimitationsData compression is Enterprise Edition onlyData compression cannot be used in conjunction with sparse columnsData compression doesn’t increase the capacity per row. You can’t insert more data per row with data compression.This ensures that disabling compression will always succeed
  • 145. Data Compression: LimitationsNon-leaf level pages in indexes are only compressed using ROW compressionHeap pages are not PAGE compressed during regular DMLLOB values out-of-row are not compressedData exported using BCP is always uncompressed.Data imported using BCP will be compressed causing increased CPU usage.
  • 150. Data Compression PerformanceGeneralizationNo noticeable impact on INDEX SEEKsNoticeable impact on large data modification operations.Lower IO, higher CPU on index/table scans. Duration depends on overall system configuration.Data compression should be tested thoroughly before setting up in production
  • 151. So when should I use it?Read-intensive databases with low CPU usageSystems with small Buffer cache (relative to data size)Databases queried for few rows at a time (i.e. index seeks).There’s always a trade-off. Remember the equation:Data compression = Less IO = Smaller memory footprintBut alsoData compression = Higher CPU usage
  • 152. Data Compression - NumbersTypical results: your mileage may vary Business cost reduction: SQL Server 2005 Resource managementBackupOLTP ActivityAdmin TasksExecutive ReportsAd-hoc ReportsWorkloadsSQL ServerSingle resource pool
  • 153. No workload differentiationMemory, CPU, Threads, …Resources
  • 154. ExecutiveReportsBackupOLTP ActivityAdmin TasksAd-hocReportsHighOLTP WorkloadAdmin WorkloadReport WorkloadMin Memory 10%Max Memory 20%Max CPU 20%Max CPU 90%Application PoolAdmin PoolBusiness cost reduction: SQL Server 2008 Resource managementSQL ServerHelps differentiate workloads (e.g. by application name/user name)
  • 155. Limit resource usage (e.g. CPU, memory, simultaneous requests)
  • 157. Limit resource usage of administrative tasks
  • 158. Resource monitoring (dmvs, performance monitor, trace events)What else is new?SQL Server Change TrackingSynchronized Programming ModelSQL Server Conflict DetectionFILESTREAM data typeIntegrated Full Text SearchSparse ColumnsLarge User Defined TypesDate/Time Data TypeSPATIAL data typeVirtual Earth IntegrationPartitioned Table ParallelismQuery OptimizationsPersistent Lookups Change Data Capture Policy Based ManagementBackup CompressionMERGE SQL StatementData ProfilingStar Join OptimizationEnterprise Reporting EngineInternet Report DeploymentBlock ComputationsScale out AnalysisBI Platform ManagementExport to Word and ExcelAuthor reports in Word and ExcelReport Builder EnhancementsTABLIXRich Formatted DataPersonalized PerspectivesFiltered IndexesFiltered Statistics… and many moreTransparent Data EncryptionExternal Key ManagementData AuditingPluggable CPUTransparent Failover for Database MirroringDeclarative Management FrameworkServer Group ManagementStreamlined InstallationEnterprise System ManagementPerformance Data CollectionSystem AnalysisData CompressionQuery Optimization ModesResource GovernorEntity Data ModelLINQVisual Entity DesignerEntity Aware Adapters
  • 160. ReferencesSQL Server 2008 Developer Training KitIntroduction to New T-SQL Programmability Features in SQL Server 2008 / Itzik Ben GanUsing The Resource Governor / Aaron BertrandReporting Services in SQL Server 2008 / Ann Weber Data Compression: Strategy, Capacity Planning and Best Practices / Sanjay Mishra