SQL Server 2008 for Developers John

Slides:



Advertisements
Similar presentations
Your Data Any Place, Any Time Manageability. SQL Server 2008 Manageability Challenges Challenges face database administrators today : Managing complex.
Advertisements

By: Jose Chinchilla July 31, Jose Chinchilla MCITP: SQL Server 2008, Database Administrator MCTS: SQL Server 2005/2008, Business Intelligence DBA.
Chapter 9: Advanced SQL and PL/SQL Topics Guide to Oracle 10g.
A Guide to Oracle9i1 Advanced SQL And PL/SQL Topics Chapter 9.
Fundamentals, Design, and Implementation, 9/e Chapter 7 Using SQL in Applications.
Best People. Best Technology. SQL Server 2008 What’s New for Developers June 15 1 Speaker: Aviel Iluz | Database Consultant Contact:
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management.
January 15, Tips for using SQL Server Change Data Capture (Introduction) The Baker’s Dozen Business Intelligence Webcast Radio 13 SQL Server -Business.
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
Discover, Master, InfluenceSlide 1 SQL Server Compact Edition and the Entity Framework Rob Sanders Readify.
SQL Server 2005 SP2 Israeli SQL Server User Group March 2005 Ami Levin
Chapter 10.
From VS C# 2010 Programming, John Allwork 1 VS2010 C# Programming - DB intro 1 Topics – Database Relational - linked tables SQL ADO.NET objects Referencing.
Overview SQL Server 2008 Overview Presented by Tarek Ghazali IT Technical Specialist Microsoft SQL Server MVP, MCTS Microsoft Web Development MCP ITIL.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 7-1 David M. Kroenke’s Chapter Seven: SQL for Database Construction and.
How a little code can help with support.. Chris Barba – Developer at Cimarex Energy Blog:
An Investigation of Oracle and SQL Server with respect to Integrity, and SQL Language standards Presented by: Paul Tarwireyi Supervisor: John Ebden Date:
2 An Overview of SQL Server 2008 New Features Jeremy Boyd Mindscape MSDN Regional Director & MVP – SQL Server DAT302.
Eurotrace Hands-On The Eurotrace File System. 2 The Eurotrace file system Under MS ACCESS EUROTRACE generates several different files when you create.
Module 7 Reading SQL Server® 2008 R2 Execution Plans.
Informix IDS Administration with the New Server Studio 4.0 By Lester Knutsen My experience with the beta of Server Studio and the new Informix database.
Company LOGO 1 Database Creation and Maintenance Jorge G. Martinez.
TSQL Improvements & Data Types SQL Server 2008 TSQL Improvements & Data Types Presented by Tarek Ghazali IT Technical Specialist Microsoft SQL Server MVP,
WHAT’S NEW IN SQL SERVER 2008: T-SQL Martin Bell SQL Server MVP.
IT 456 Seminar 5 Dr Jeffrey A Robinson. Overview of Course Week 1 – Introduction Week 2 – Installation of SQL and management Tools Week 3 - Creating and.
By: Matt Batalon, MCITP  Another form of temporary storage that can be queried or joined against, much like a table variable, temp.
Triggers A Quick Reference and Summary BIT 275. Triggers SQL code permits you to access only one table for an INSERT, UPDATE, or DELETE statement. The.
Siebel 8.0 Module 5: EIM Processing Integrating Siebel Applications.
Understanding SQL Server 2008 Change Data Capture Bret Stateham Training Manager Vortex Learning Solutions blogs.netconnex.com.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Data Driven Designs 99% of enterprise applications operate on database data or at least interface databases. Most common DBMS are Microsoft SQL Server,
What is a Package? A package is an Oracle object, which holds other objects within it. Objects commonly held within a package are procedures, functions,
Visual Programing SQL Overview Section 1.
02 | Data Flow – Extract Data Richard Currey | Senior Technical Trainer–New Horizons United George Squillace | Senior Technical Trainer–New Horizons Great.
IT System Administration Lesson 3 Dr Jeffrey A Robinson.
Transactions, Roles & Privileges Oracle and ANSI Standard SQL Lecture 11.
Learningcomputer.com SQL Server 2008 –Views, Functions and Stored Procedures.
Introduction to Table Value Parameters with SQL Server 2008 and.NET John Sterrett
Virtual techdays INDIA │ august 2010 Data-tier Applications in Visual Studio 2010 Abhishek Kala │ Partner Technical Consultant, Microsoft Global.
IMS 4212: Application Architecture and Intro to Stored Procedures 1 Dr. Lawrence West, Management Dept., University of Central Florida
SQL Query Analyzer. Graphical tool that allows you to:  Create queries and other SQL scripts and execute them against SQL Server databases. (Query window)
Manipulating Data Lesson 3. Objectives Queries The SELECT query to retrieve or extract data from one table, how to retrieve or extract data by using.
Microsoft Confidential Jon Jahren Produktsjef Applikasjonsplattform Microsoft.
Module 10 Merging Data and Passing Tables. Module Overview Using the MERGE Statement Implementing Table Types Using Table Types As Parameters.
SSMS SQL Server Management System. SQL Server Microsoft SQL Server is a Relational Database Management System (RDBMS) Relational Database Management System.
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
Jeremy Kingry, eBECS | ADVANCED SQL SERVER FOR ADMINS AND ANALYSTS.
Understanding Core Database Concepts Lesson 1. Objectives.
SQL Database Management
Creating Database Objects
With Temporal Tables and More
SQL Server Statistics and its relationship with Query Optimizer
ASP.NET Programming with C# and SQL Server First Edition
Relational Database Design
© 2016, Mike Murach & Associates, Inc.
Database Systems: Design, Implementation, and Management Tenth Edition
Example of a page header
Optimizing Microsoft SQL Server 2008 Applications Using Table Valued Parameters, XML, and MERGE
Auditing in SQL Server 2008 DBA-364-M
Transactional Replication A Deeper Dive Drew Furgiuele, Senior DBA IGS
SQL Fundamentals in Three Hours
Chapter 8 Advanced SQL.
Database Systems: Design, Implementation, and Management Tenth Edition
Governing Your Enterprise with Policy-Based Management
Understanding Core Database Concepts
Creating Database Objects
Implementing ETL solution for Incremental Data Load in Microsoft SQL Server Ganesh Lohani SR. Data Analyst Lockheed Martin
Presentation transcript:

SQL Server 2008 for Developers John

Session Code Session Title About Me! Working with SQL Server since 2006 Production DBA for 2 Years Responsible for 50 Production instances with 1250 Databases.NET Developer for 3 Years Built a few Data Marts Reside in Wheeling, WV (Pittsburgh, PA) Syndicated Blogger on SQLServerPedia Writer for MSSQLTIPS.com

Session Code Session Title Topics to Cover….. Management Studio (SSMS) Enhancements T-SQL Delighters Filtered Indexes New Date and Time Data Types Table-Valued Parameters MERGE statement Policy Based Management Change Data Capture

Session Code Session Title Management Studio Enhancements IntelliSense Debugging Error List Object Explorer Details Viewer Template Explorer Activity Monitor

Session Code Session Title Transact-SQL Delighters Declare and Initialize Variables Compound assignment Operators Table Value Constructor Support through the VALUES Clause

Session Code Session Title DEMO!!! Demo covering The following topics IntelliSense Debugging Error Lists Object Explorer Details Template Explorer Activity Monitor

Session Code Session Title Filtered Indexes! Have you ever wanted to create an index that filters between a static search criteria? CREATE INDEX idxName ON Schema.Table (Column) WHERE ……

Session Code Session Title Filtered Indexes! Improved query performance and plan quality if used correctly! Reduced index maintenance costs Reduced index storage costs

Session Code Session Title DEMO Filtered Indexes Demo….

Session Code Session Title New Date & Time Types SQL Server 2008 extends date/time support Larger Value Space –Current DATETIME Years –Current DATETIME Second Accuracy –New Date Types Years –New Date/Time Types - Precisions to 100 nanoseconds Variable Precision Saves Space Separate Date and Time Saves Space ANSI Compatible

Session Code Session Title Date and Time DATE Data Type Date Only to Gregorian Calendar TIME Data Type Time Only Variable Precision - 0 to 7 decimal places for seconds To 100 nanoseconds

Session Code Session Title DATETIME2 & DATETIMEOFFSET DATETIME2 Data Type to Gregorian Calendar Variable Precision - to 100 nanoseconds DATETIMEOFFSET to Gregorian Calendar Variable Precision - to 100 nanoseconds Time Zone Offset (From UTCTime) Preserved Not Time Zone Aware - No Daylight Saving Time Support

Session Code Session Title DATETIMEOFFSET SWITCHOFFSET (DATETIMEOFFSET, time_zone) Allows you to change time zones SqlDbType.DateTimeOffset

Session Code Session Title Demo!! T-SQL Date and Time DATETIMEOFFSET with.NET

Session Code Session Title Table-Value Parameters Have you wished that you could send a table into a stored procedure? Do you wish you could send all parent-child relationship data in one round-trip?

Session Code Session Title Table Types SQL Server has table variables TABLE (id int); SQL Server 2008 adds strongly typed table variables CREATE TYPE mytab AS TABLE (id int); mytab; Table-Value Parameters must use strongly typed table variables

Session Code Session Title Things to know about TVP ADO.NET 3.5 Supports Table Value Parameters You can populate TVP from the following.NET objects DataTable DbDataReader System.Collections.Generic.IList Recommended for 1000 or less records

Session Code Session Title TVP with.NET SqlParameter tvpParam = new SqlParameter(); tvpParam.ParameterName = tvpParam.Value = dtList; //DataTable in this example tvpParam.SqlDbType = SqlDbType.Structured; // This data type allows us to pass a table into DB Objects tvpParam.TypeName = "TVPComponentType"; // Name of strong typed (table type)

Session Code Session Title Demo!! Table-Value Parameters with T-SQL Table-Value Parameters with ASP.NET (C#)

Session Code Session Title MERGE!!! TRUNCATE TABLE db1.dbo.fool INSERT INTO db1.dbo.fool SELECT * FROM db2.dbo.fool

Session Code Session Title Merge Statement Multiple set operations in a single SQL statement Uses multiple sets as input MERGE target USING source ON... Operations can be INSERT, UPDATE, DELETE Operations based on WHEN MATCHED WHEN [TARGET] NOT MATCHED WHEN SOURCE NOT MATCHED ANSI SQL 2006 compliant - with extensions

Session Code Session Title More on MERGE Multiple WHEN clauses possible For MATCHED and SOURCE NOT MATCHED Only one WHEN clause for TARGET NOT MATCHED MERGE can be used with any table source A MERGE statement causes triggers to be fired once Rows affected includes total rows affected by all clauses

Session Code Session Title MERGE Performance MERGE statement is transactional No explicit transaction required One Pass Through Tables At most a full outer join Matching rows = when matched Left-outer join rows = when target not matched Right-outer join rows = when source not matched

Session Code Session Title DEMO!! Demo Merge with T-SQL!

Session Code Session Title Central Management System (CMS) & Policy Based Management Have you ever wanted to run a script against all production databases? Have you ever wanted to enforce naming conventions in SQL Programming?

Session Code Session Title CMS and PBM Central Management System Needs only 1 instance of SQL 2008 Reactive not proactive great tool for updating objects on multiple servers Policy Based Management proactive tool prevents stuff from happening great tool to enforce compliance on SQL servers

Session Code Session Title Policy Based Management Facets Conditions Policies

Session Code Session Title DEMO! Demo monitoring and enforcing naming standards with Policy Based Management

Session Code Session Title Change Data Capture Have you ever wanted to get row deltas on a table without using triggers on the source table?

Session Code Session Title Enable Change Data Capture Must have Enterprise Edition Uses transaction log to pull deltas Enable on database (req sysadmin) sys.sp_cdc_enable_db_change_data_capture creates cdc schema creates cdc user creates system tables with cdc schema Enable on table(s) (req db_owner) sys.sp_cdc_enable_table creates sql agent jobs creates table cdc.schema_tablename_CT

Session Code Session Title Change Data Capture data Changes stored in cdc.schema_tablename_CT _$operation column specifies change type 1 = DELETE 2 = INSERT 3 = BEFORE UPDATE 4 = AFTER UPDATE

Session Code Session Title Querying Change data cdc.fn_cdc_get_all_changes gets all changes during specific range cdc.fn_cdc_get_net_changes returns final (net change) for each row in the specific range

Session Code Session Title SSIS with CDC

Session Code Session Title DEMO! Enable and use Change Data Capture

Session Code Session Title How do you get started? Using the Transact-SQL Debugger SQL 2008 JumpStart MSDN – SQL 2008 Virtual Labs Developer Fundamentals Part 1: Uncovering T-SQL on SQL Server 2008

Thank you for attending this session and the 2010 PASS Summit in Seattle