* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Introducing SQL Server 2012 Integration Services
Serializability wikipedia , lookup
Entity–attribute–value model wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Functional Database Model wikipedia , lookup
Oracle Database wikipedia , lookup
Microsoft Access wikipedia , lookup
Team Foundation Server wikipedia , lookup
Ingres (database) wikipedia , lookup
Concurrency control wikipedia , lookup
Open Database Connectivity wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Relational model wikipedia , lookup
Microsoft SQL Server wikipedia , lookup
Database model wikipedia , lookup
MICROSOFT SQL SERVER 2012 - MANAGING DATABASE APPLICATIONS Last Updated: Monday, May 22, 2017 MODULE OUTLINE • Database Development Enhancements • Database Manageability Enhancements • Database Availability Enhancements 2 LESSON 1: DATABASE DEVELOPMENT ENHANCEMENTS • • • • Transact-SQL Enhancements New Functions Spatial Data Enhancements Storing and Querying Documents 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 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 IIF(@i % 2 = 0, 'Even', 'Odd') String Functions CONCAT CONCAT(Firstname, ' ', LastName) FORMAT FORMAT(UnitPrice, 'C', 'en-GB') SPATIAL DATA ENHANCEMENTS • New Spatial Shapes CIRCULARSTRING COMPOUNDCURVE • Shapes larger than a Hemisphere • New FULLGLOBE Shape CURVEPOLYGON 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)') LESSON 2: DATABASE MANAGEABILITY ENHANCEMENTS • Management Tool Enhancements • Security Enhancements POLLS MANAGEMENT TOOL ENHANCEMENTS • Code Snippets • Enhanced Debugging 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' GO LESSON 3: DATABASE AVAILABILITY ENHANCEMENTS • Backup and Restore Enhancements • AlwaysOn Availability Groups BACKUP AND RESTORE ENHANCEMENTS • Point-In-Time Restore • Page Restore ALWAYSON AVAILABILITY GROUPS Node3 Windows Cluster Async Node1 (Primary) Listener Node2 (Read-Only) MODULE REVIEW • Database Development Enhancements • Database Manageability Enhancements • 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