Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microsoft SQL Server Managing Database Applications

Similar presentations


Presentation on theme: "Microsoft SQL Server Managing Database Applications"— Presentation transcript:

1 Microsoft SQL Server 2012 - Managing Database Applications

2 MODULE OUTLINE Database Development Enhancements
Database Manageability Enhancements Database Availability Enhancements

3 Lesson 1: Database Development Enhancements
2: SQL Server 2012 as a Platform for Mission-Critical data Lesson 1: Database Development Enhancements Storing and Querying Documents

4 Transact-SQL Enhancements
2: SQL Server 2012 as a Platform for Mission-Critical data Transact-SQL Enhancements The WITH RESULT SETS Clause EXECUTE GetOrderPickList 'SO59384' WITH RESULT SETS ( ([SalesOrder] nvarchar(20) NOT NULL,[LineItem] int, [Product] int, [Quantity] int) ) The THROW Statement THROW 50001, 'Customer doers not exist', 1 Paging with the OFFSET and FETCH Keywords SELECT SalesOrderNumber, OrderDate, CustomerName FROM SalesOrders ORDER BY SalesOrderNumber ASC OFFSET 20 ROWS FETCH NEXT 10 ROWS ONLY Sequence Objects CREATE SEQUENCE OrderNumbers START WITH 1000 INCREMENT BY 10 ... CREATE TABLE Orders (OrderNumber int PRIMARY KEY DEFAULT(NEXT VALUE FOR OrderNumbers), CustomerKey int, ProductKey int, Quantity int) The OVER Clause SELECT City, OrderYear, OrderQuantity, SUM(OrderQuantity) OVER (PARTITION BY City ORDER BY OrderYear ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS RunningQty FROM CitySalesByYear

5 40007A 2: SQL Server 2012 as a Platform for Mission-Critical data New Functions Conversion Functions PARSE PARSE('£345.98' AS money USING 'en-GB') TRY_PARSE TRY_PARSE('£345.98' AS money USING 'en-US') TRY_CONVERT TRY_CONVERT(int, 'One') Date and Time Functions DATEFROMPARTS DATEFROMPARTS (2010, 12, 31) DATETIMEFROMPARTS DATETIMEFROMPARTS ( 2010, 12, 31, 23, 59, 59, 0 ) SMALLDATETIMEFROMPARTS SMALLDATETIMEFROMPARTS ( 2010, 12, 31, 23, 59 ) DATETIME2FROMPARTS DATETIME2FROMPARTS ( 2010, 12, 31, 23, 59, 59, 1, 7 ) TIMEFROMPARTS TIMEFROMPARTS ( 23, 59, 59, 1, 5 ) DATETIMEOFFSETFROMPARTS DATETIMEOFFSETFROMPARTS(2010,12,31,14,23,23,1,8,0,7) EOMONTH EOMONTH (GETDATE(), 1) Logical Functions CHOOSE CHOOSE (3,'Cash','Credit Card','Debit Card','Invoice') IIF % 2 = 0, 'Even', 'Odd') String Functions CONCAT CONCAT(Firstname, ' ', LastName) FORMAT FORMAT(UnitPrice, 'C', 'en-GB')

6 Spatial Data Enhancements
2: SQL Server 2012 as a Platform for Mission-Critical data Spatial Data Enhancements New Spatial Shapes Shapes larger than a Hemisphere New FULLGLOBE Shape CIRCULARSTRING COMPOUNDCURVE CURVEPOLYGON

7 Storing and Querying Documents
2: SQL Server 2012 as a Platform for Mission-Critical data Storing and Querying Documents CREATE TABLE FileStore AS FileTable WITH (FileTable_Directory = 'Documents') SELECT [name] As FileName FROM FileStore WHERE CONTAINS(PROPERTY(file_stream,'Title'),'Bike OR Cycling') SELECT [name] As FileName FROM FileStore WHERE CONTAINS(file_stream, 'NEAR((bicycle, race), 15)')

8 Lesson 2: Database Manageability Enhancements
2: SQL Server 2012 as a Platform for Mission-Critical data Lesson 2: Database Manageability Enhancements Security Enhancements

9 Polls

10 Management Tool Enhancements
2: SQL Server 2012 as a Platform for Mission-Critical data Management Tool Enhancements Code Snippets Enhanced Debugging

11 Security Enhancements
2: SQL Server 2012 as a Platform for Mission-Critical data Security Enhancements User-Defined Server Roles CREATE SERVER ROLE [AGAdmins] AUTHORIZATION [sa]; GRANT ALTER ANY AVAILABILITY GROUP TO [AGAdmins]; GRANT ALTER ANY ENDPOINT TO [AGAdmins]; GRANT CREATE AVAILABILITY GROUP TO [AGAdmins]; GRANT CREATE ENDPOINT TO [AGAdmins]; ALTER SERVER ROLE [AGAdmins] ADD MEMBER [JohnDoe]; Contained Databases CREATE DATABASE [MyContainedDB] CONTAINMENT = PARTIAL GO USE [MyContainedDB] CREATE USER [SalesAppUser] WITH PASSWORD = 'Pa$$w0rd'

12 Lesson 3: Database Availability Enhancements
2: SQL Server 2012 as a Platform for Mission-Critical data Lesson 3: Database Availability Enhancements AlwaysOn Availability Groups

13 Backup and Restore Enhancements
2: SQL Server 2012 as a Platform for Mission-Critical data Backup and Restore Enhancements Point-In-Time Restore Page Restore

14 AlwaysOn Availability Groups
2: SQL Server 2012 as a Platform for Mission-Critical data AlwaysOn Availability Groups Sync Node3 Windows Cluster Async Node1 (Primary) Node2 (Read-Only) Listener

15 Module Review Database Availability Enhancements
Course xxxxy 2: SQL Server 2012 as a Platform for Mission-Critical data Module Review Database Availability Enhancements For more information, attend the following courses: 10774A: Querying Microsoft® SQL Server® 2012 10775A: Administering Microsoft® SQL Server® 2012 Databases 10776A: Developing Microsoft® SQL Server® 2012 Databases 40008A: Updating your Database Skills to Microsoft® SQL Server® 2012


Download ppt "Microsoft SQL Server Managing Database Applications"

Similar presentations


Ads by Google