Presentation is loading. Please wait.

Presentation is loading. Please wait.

DBI318. SQL Server RDBMS Team Connectivity App Platform T-SQL Language, Data-Tier Application Model, Types, Libraries SQL Engine High Availability Mirroring,

Similar presentations


Presentation on theme: "DBI318. SQL Server RDBMS Team Connectivity App Platform T-SQL Language, Data-Tier Application Model, Types, Libraries SQL Engine High Availability Mirroring,"— Presentation transcript:

1 DBI318

2 SQL Server RDBMS Team Connectivity App Platform T-SQL Language, Data-Tier Application Model, Types, Libraries SQL Engine High Availability Mirroring, Clustering, etc. Data Processing Query Processor Applications and Components SNAC ODBC, OLE-DB MDAC ODBC, OLE-DB Ado.Net SQL Client SQL Management Tools SQL Analysis Services SQL Integration Services SQL Reporting Services SQL Replication EDM Sharepoint Exchange Outlook Visual Studio Oslo Commerce Server Biztalk Server External Apps Excel MS CRM Dynamics Content Management Server DPM LCS Project Server MOM JDBC Where do I work? Storage & Admin Storage Engine, DR etc.

3

4

5

6

7 CREATE SEQUENCE MySchema.IdSequence AS INT START WITH 10000 INCREMENT BY 1; GO INSERT INTO Employees (EmployeeId, Name) VALUES (NEXT VALUE FOR MySchema.IdSequence, 'Jane'); INSERT INTO Contractors (ContractorId, Name) VALUES (NEXT VALUE FOR MySchema.IdSequence, 'John'); CREATE SEQUENCE MySchema.IdSequence AS INT START WITH 10000 INCREMENT BY 1; GO INSERT INTO Employees (EmployeeId, Name) VALUES (NEXT VALUE FOR MySchema.IdSequence, 'Jane'); INSERT INTO Contractors (ContractorId, Name) VALUES (NEXT VALUE FOR MySchema.IdSequence, 'John');

8 CREATE SEQUENCE [ schema_name. ] sequence_name [ AS { | } ] [ START WITH ] [ INCREMENT BY ] [ MINVALUE | NO MINVALUE ] [ MAXVALUE | NO MAXVALUE ] [ CYCLE | NO CYCLE ] [ CACHE [ ] | NO CACHE ]

9 SELECT NEXT VALUE FOR MySequence,…. FROM MyTable; Generates a Predictable number of values Achieved by restricting where in a statement (and in which statements) NEXT VALUE FOR can be used Semantically correct support for generating values based on an order through the OVER-clause (extension to ANSI) SELECT NEXT VALUE FOR MySeq OVER (ORDER BY OrderDate ASC) AS OrderId,OrderDate,CustomerId FROM Orders; Supported in DEFAULT constraints Supports fetching a range using sp_sequence_get_range

10

11

12

13 Introducing THROW which… always THROWs is even spelled correctly! THROW THROW,, ; Batch aborts if not in SET XACT_ABORT ON where it Transaction-aborts Does not automatically use sys.messages And re-THROW BEGIN CATCH … ; THROW; END CATCH

14

15 Improvements to Dynamic SQL Support for defining a contract for returned result set(s) EXECUTE [WITH [,...n ]] { RESULT SETS {UNDEFINED|NONE|( )} } ::= { |AS OBJECT [.]{table_name| view_name | tvf} |AS TYPE [schema_name.]table_type_name | AS FOR XML | (…) [,...n ]} EXEC(@SQL) WITH RESULT SETS ( (ObjectID BIGINT, Name NVARCHAR(100)) ); EXEC(@SQL) WITH RESULT SETS NONE; EXEC(@SQL) WITH RESULT SETS ( (ObjectID BIGINT, Name NVARCHAR(100)) ); EXEC(@SQL) WITH RESULT SETS NONE;

16 BatchMetadata Discovery Runtime EXEC('SELECT a:int FROM t1') WITH RESULT SETS ((b int)); b:int EXEC('SELECT a:tinyint FROM t1') WITH RESULT SETS ((b int)); b:int EXEC('SELECT a:datetime2 FROM t1') WITH RESULT SETS ((b int)); b:intERROR: Msg 206, Operand type clash… EXEC('SELECT a:int, b:int FROM t1') WITH RESULT SETS ((b int)); b:intERROR: Number of columns mismatch

17

18

19

20 New Query & Schema Constructs Improved Error Handling Improvements to Dynamic SQL Additional Scalar Functions Robust Result set Metadata Discovery

21 SET FMTONLY ON; IF(…) /*Q1*/ SELECT a{int} FROM t1; ELSE /*Q2*/ SELECT b{int} FROM t2; SET FMTONLY OFF; EXEC sp_describe_first_result_set @tsql = N' IF(…) /*Q1*/ SELECT a{int} FROM t1; ELSE /*Q2*/ SELECT b{int} FROM t2;'; What is the big difference??

22

23

24

25

26 BatchFMTONLYMetadata Discovery IF(…) SELECT a:int, b:int FROM t1; ELSE SELECT d:int AS a, e:int AS b FROM t2; SELECT a:nvarchar(max) FROM t3; a:int, b:int IF(…) SELECT a:int FROM t1; ELSE SELECT d:int + g:smallint FROM t2; a:int :int IF(…) SELECT a:nvarchar(50) FROM t1; ELSE SELECT a:nvarchar(120) FROM t2; a:nvarchar(50)a:nvarchar(120) IF(…) SELECT a:int, b:int FROM t1; ELSE SELECT a:varchar(50), b:int FROM t2; a:int, b:intERROR: Type mismatch

27

28 Required Slide Speakers, please list the Breakout Sessions, Interactive Discussions, Labs, Demo Stations and Certification Exam that relate to your session. Also indicate when they can find you staffing in the TLC.

29 Required Slide Track PMs will supply the content for this slide, which will be inserted during the final scrub. Try the new SQL Server Mission Critical BareMetal Hand’s on-Labs Visit the updated website for SQL Server® Code Name “Denali” on www.microsoft.com/sqlserver and sign to be notified when the next CTP is available www.microsoft.com/sqlserver Follow the @SQLServer Twitter account to watch for updates Visit the SQL Server Product Demo Stations in the DBI Track section of the Expo/TLC Hall. Bring your questions, ideas and conversations! Microsoft® SQL Server® Security & ManagementMicrosoft® SQL Server® Optimization and Scalability Microsoft® SQL Server® ProgrammabilityMicrosoft® SQL Server® Data Warehousing Microsoft® SQL Server® Mission Critical Microsoft® SQL Server® Data Integration

30 Resources www.microsoft.com/teched Sessions On-Demand & CommunityMicrosoft Certification & Training Resources Resources for IT ProfessionalsResources for Developers www.microsoft.com/learning http://microsoft.com/technet http://microsoft.com/msdn http://northamerica.msteched.com Connect. Share. Discuss.

31

32 To access more details on this session, capture this TAG

33

34


Download ppt "DBI318. SQL Server RDBMS Team Connectivity App Platform T-SQL Language, Data-Tier Application Model, Types, Libraries SQL Engine High Availability Mirroring,"

Similar presentations


Ads by Google