Tuesday, August 30, 2011

What’s new in Denali CTP3? -- SQL Server DB

1. New DB default size increased by 1 MB

2. Now Integration Service connection introduced in SSMS:
Click right mouse button to create SSIS catalog with some password. If we see there is no database related to SSIS in Database folder as well as in Integration Services folder so now when we create a SSIS catalog and that SSIS catalog DB will be created in Databases folder as well.
3. New Functions in SQL Server:

--String
Select Concat ('Vinod ', 'K', ' Sharma ') as FullName

DECLARE @d DATETIME = GETDATE();
SELECT FORMAT( @d, 'dd/MMM/yyyy', 'en-US' ) AS Result

SELECT FORMAT (25.456, '0.00') as MyAmount

--Logical
SELECT Choose (4,'Red','Blue','Greeen', 'Gray','White','Orange') as MyColor
SELECT IIF(1<0,'-ve','+ve') as Result

--Conversion
SELECT Case When Try_Convert(Float,'Vinod') IS NULL
Then 'Cast Failed'
Else 'Cast Succeeded'
End as TryConvert

SELECT Try_Parse('1234' as money using'fr-FR') as Result
SELECT Try_Parse('01/01/2011' as datetime2) as Result
SELECT PARSE('Monday, 13 December 2010' as DateTime2) as Result

--Date and Time
SELECT Eomonth('08/29/2011') as LastDayofMonth
SELECT Eomonth('08/29/2011',3) as LastDayofMonth
SELECT TIMEFROMPARTS(23,59,59,0,0) as Result
SELECT SMALLDATETIMEFROMPARTS(2011,7,4,00,00) AS Result
SELECT DATEFROMPARTS(2011,12,31) as Date
SELECT DATETIMEFROMPARTS(2011,12,31,23,59,59,0) as DateTime
SELECT DATETIME2FROMPARTS (2010, 12, 31, 23, 59, 59, 0, 0) AS DateTime
SELECT DATETIMEOFFSETFROMPARTS (2010, 12, 31, 14, 23, 23, 0, 12, 0, 7) as DateTime

--Math Function
Select LOG(10,2) as LogBase2

4. Sequence Function Introduction:
Create Sequence S0
GO
Select Next Value For S0
----------------------
Create Sequence S1
As Int
Increment By 1;
GO
Select Next Value For S0
--------------------
Create Sequence S2
As Int
Start with 1
Increment By 1;
GO
Select Next Value For S2
-----------------------
Create Sequence S3
As TinyInt
Start with 1
MinValue 1
MaxValue 5
Cycle; -- like a loop but with reset option
GO
Select Next Value For S3

--Altering the Sequence
ALTER SEQUENCE S2 RESTART WITH 1
GO
SELECT NEXT VALUE FOR S2

--Dropping the Sequence
DROP SEQUENCE S2
GO
SELECT NEXT VALUE FOR S2
GO

5. Software Installation Steps added (few new options to install)

6. Debugging is also easy in Denali

7. Index enhancement in Denali:
a. We can use Varchar(max), NVarchar(max) and Varbinary(max) columns

8. New concept of Column stored Index (first time in the Database world)

9. Query windows arrangement (the way we want, drag to anywhere)

10. Table Partition Modification.
a. Earlier there were 1000 partition By Default and can be increased up to 15000 BUT now in Denali CTP3 have 15000 partitions by Default.

11. New feature like Surrounded with (Ctrl+K, Ctrl+S) and Insert Snippets(Ctrl+k, Ctrl+X)

12. New intellisense

13. High query performance enhancements

Some Video URLs:

1. http://www.youtube.com/watch?v=AQ6UxKKRCh8 (Denali CTP3 Installation)
2. http://www.youtube.com/watch?v=t4JjyWCiv08&feature=related (Sequence Object)
3. http://www.youtube.com/watch?v=eshmqji8Wso&feature=related (Debugging In SQL Server Denali)
4. http://www.youtube.com/watch?v=zCENtf-uJgc&feature=related(Coding In SQL Server Denali)
5. http://www.youtube.com/watch?v=kwV7Ht67qMY&feature=related(Partition limit enhancement)
6. http://www.youtube.com/watch?v=jOwgT_xkneU&feature=related(Index enhancement)
7. http://www.youtube.com/watch?v=eCie3Jkryf8&feature=related(Denali Introduction & Network Configuration)
8. http://www.youtube.com/watch?v=XvEsVxpNadc&feature=related(Data Quality Services)
9. http://www.youtube.com/watch?v=LTpIb9j06qI&feature=related (Denali Beyond Relational)
10. http://www.microsoft.com/sqlserver/en/us/future-editions.aspx (Denali download)