sql server 2008 r2 sp1 for developers
DESCRIPTION
Deck for presentation at TechEd NZTRANSCRIPT
![Page 1: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/1.jpg)
SQL Server 2008 R2 for DevelopersDBI209
Lynn LangitSr. Developer EvangelistMicrosoft
![Page 2: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/2.jpg)
SQL Server 2008 R2 – So Many New Features…
DACPACs (Data Tier Applications) T-SQL enhancements Geospatial data types XML data enhancements Filestreams (BLOBS) Sparse Columns Filtered indices and full-text search Entity Framework 4.1
For Developers
![Page 3: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/3.jpg)
Database Development Pain Points
DevelopersSQL expertiseMaintain script librariesVersioned deploymentsKeeping development/test/production synchronized
Database administrators (DBAs)Hand reconcile upgrade scriptsSchema/data portabilitySecurity/containmentManagement at scale
![Page 4: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/4.jpg)
Data Tier Applications (DAC)
• Defines all of the Database Engine schema and instance objects
• A single unit of management • Simplifies development, deployment, and management
lifecycle• Contains policies that define the deployment
prerequisite
![Page 5: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/5.jpg)
Data-tier Application Lifecycle
• CREATE TABLE Orders• (• id INT,• ordTime DATETIME,• .• .• .
• ) -- ON OrdPS(ordTime)
• CREATE TABLE OrderEntr• (
• CREATE TABLE Orders• (• id INT,• ordTime DATETIME,• .• .• .
• ) -- ON OrdPS(ordTime)
• CREATE TABLE OrderEntr
DevelopSource code
Contained database
DefinitionDeployment
artifact
RuntimeContainer
DACPAC
Build
Reverse
Engineer Extract
Deploy
Upgrade
DACFx Services
![Page 6: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/6.jpg)
The Database Model
The logical database model is the centerpieceServices are provided on around the model
Deploy
Upgrade
Import
Build
Extract
Export
DACPAC
DAC database
model
![Page 7: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/7.jpg)
DACPAC
![Page 8: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/8.jpg)
DACPAC project in Visual Studio 2010
![Page 9: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/9.jpg)
Creating DACPAC
(c) 2011 Microsoft. All rights reserved.
![Page 10: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/10.jpg)
Working with DACPACsFor developers in Visual Studio 2010For DBAs in SQL Server Management StudioSupports SQL ServerSupports SQL Azure
(c) 2011 Microsoft. All rights reserved.
![Page 11: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/11.jpg)
DACPAC
![Page 12: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/12.jpg)
Monitoring DACPACs via UCPs
![Page 13: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/13.jpg)
DACPAC SQL Server Database Project
(c) 2011 Microsoft. All rights reserved.
![Page 14: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/14.jpg)
Utilizing SQL Server “data types”
“Smart T-SQL”
Geospatial types
XML or Filestream
Full-text
Sparse Columns
![Page 15: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/15.jpg)
Key T-SQL EnhancementsTable-Valued Parameters
T-SQL Assign and Increment Operators
Row Constructors
Grouping Sets
MERGE statement
Dependency Views
Performance Enhancements
![Page 16: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/16.jpg)
T-SQL Performance Enhancements
MERGE and GROUPING SETS improvementsLess scans through table
Table-valued parameters improvementsLess round trips to database
Improvements for data warehouse queriesEarlier predicate filteringMultiple bitmap iterators per query
Plan Guide ImprovementsEasier to create plan guidesPlan guides on DML statements
Also: Object reference tracking makes schema and procedural code versioning less error-prone
![Page 17: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/17.jpg)
Better T-SQL
![Page 18: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/18.jpg)
Other Data type enhancements
Sparse Column enhancementsXML enhancementsGeospatial enhancementsFilestream enhancementsFull-text enhancements
![Page 19: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/19.jpg)
Better Data types
![Page 20: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/20.jpg)
Entity Framework
What is EF?Object/Relational Mapping (ORM) framework
How to use EFissue queries using LINQthen retrieve and manipulate data as strongly typed objectsLINQ to Entities provides IntelliSense and compile-time syntax validation for writing queries against a conceptual model
Why use EF?enables you to work with relational data as domain-specific objects eliminates the need for most of the data access plumbing code that you previously wrote
![Page 21: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/21.jpg)
EF Stack & Development Process Types
(c) 2011 Microsoft. All rights reserved.
• Database first• Model first• Code first (new in 4.1)
![Page 22: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/22.jpg)
EF Templates
![Page 23: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/23.jpg)
Entity Framework(profiling)
![Page 24: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/24.jpg)
Code to expose WCF service from EF
![Page 25: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/25.jpg)
Sample code to access EF data
![Page 26: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/26.jpg)
Entity Framework Profiling• Visual Studio Ultimate
• Intellitrace• VS Profiler - article here
• SQL Server Profiler• 3rd party tools • Article on Tracing - here
![Page 27: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/27.jpg)
You can use raw T-SQL
![Page 28: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/28.jpg)
New Items with SP1
(c) 2011 Microsoft. All rights reserved.
•New or Improved Dynamic Management Views --sys.dm_exec_query_stats --additional columns (long-running queries)--new DMVs and XEvents on select performance counters are introduced to monitor OS configurations/resource conditions related to the SQL Server instance
•Improved FORCESEEK index hint & New FORCESCAN query hint --syntax modified w/optional parameters allowing it to control the access method on the index even further--FORCESCAN complements the FORCESEEK hint allowing specifying ‘scan’ as the access method to the index
•Improved DACPAC - (DAC Fx) improved database upgrades: --(DAC) Framework v1.1 and DAC upgrade wizard enable the new in-place upgrade service --New in-place upgrade service will upgrade the schema for an existing database in SQL Azure and the versions of SQL Server supported by DAC
•New Disk space control for PowerPivot: --Introduces two new configuration settings that let you determine how long cached data stays in the system
![Page 29: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/29.jpg)
SQL Server 2008 R2 – So Many New Features…
DACPACs (Data Tier Applications) T-SQL enhancements Geospatial data types XML data enhancements Filestreams (BLOBS) Sparse Columns Filtered indices and full-text search Entity Framework 4.1
For Developers
![Page 30: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/30.jpg)
Next Steps
LEARN MORE ABOUT SQL SERVER 2008 R2
http://www.microsoft.com/sqlserver/2008/en/us/whats-new.aspx
DOWNLOAD SQL SERVER 2008 R2
http://www.microsoft.com/sqlserver/2008/en/us/r2.aspx
UPGRADE TO SQL SERVER 2008 R2
http://www.microsoft.com/sqlserver/2008/en/us/how-to-buy.aspx
![Page 31: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/31.jpg)
Related Content
MSDN Webcast: New T-SQL Programmability Features in SQL Server 2008 (Event ID: 1032357753)
![Page 32: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/32.jpg)
Team Content – SQL Server
• SQL CAT (Dev) blog - here• SQL Programmability blog - here• SQL Query Processing blog - here
![Page 33: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/33.jpg)
Other Related Content
Lynn’s Resourceshttp://blogs.msdn.com/SoCalDevGalTwitter - @llangithttp://www.slideshare.net/lynnlangit
![Page 34: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/34.jpg)
www.TeachingKidsProgramming.org• Do a Recipe Teach a Kid (Ages 10 ++)• Microsoft SmallBasic Free Courseware (recipes)
![Page 35: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/35.jpg)
Resources
Microsoft Certification & Training Resources
Resources for IT Professionals Resources for Developers
www.microsoft.com/learning
http://microsoft.com/technet http://microsoft.com/msdn
Learning
http://newzealand.msteched.com
Connect. Share. Discuss.
![Page 36: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/36.jpg)
Evaluate your sessionson CommNet and go inthe draw to win instantprizes
![Page 37: SQL Server 2008 R2 SP1 for Developers](https://reader035.vdocuments.mx/reader035/viewer/2022062319/55423a30b4c90586518b45f7/html5/thumbnails/37.jpg)
© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to
be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS
PRESENTATION.