Wednesday, 14 May 2014

Difference Between Sql server 2008R2 and 2012

SQL Server 2008 R2 (SQL Server 10.5) :

1.SQL Server 2008 R2 is codenamed as Kilimanjaro
2.In SQL Server 2008 R2 , rebooting is requisite for OS patching , hence server down time is high
3.SQL Server 2008 R2 does not have this feature of availability groups, hence fast recovery is not possible.
4.The SQL Server 2012 uses 48 bit precision for spatial calculations
5.CONCAT(), FORMAT() and TRY_CONVERT() functions are not available in SQL Server 2008
6.SQL Server 2008 R2 is slow compared to SQL Server 2012.
7.However buffer rate is less because there is no data redundancy in SQL Server 2008 R2
8.Data visualization is not supported in SQL Server 2008 R2
9.Spatial features are not supported more in SQL Server 2008 R2. Instead a traditional way for geographical elements have been set in SQL Server 2008 R2.
10.The Maximum number concurrent connections to SQL Server 2008 is 32767.
11. SQL Server have old CONVERT() function for convert date format. for that ween need to memorizing cryptic style codes like 101 and 103 for converting datetime values to localized presentation formats
CONVERT(DATETIME, '7/24/2010 12:00:00 AM', 101)
12. There is no direct way to cast a money/currency field in SQL Server 2008

SQL Server 2012 (SQL Server 11) :

1.SQL Server 2012 is codenamed as Denali
2.In SQL Server 2012, server down time is reduced by 50% , hence OS patching is not rebooting n times.
3.In SQL Server 2012, high availability and disaster recovery factor has been introduced which duplicates the data and rapidly recovers the loss.
4.The SQL Server 2012 uses 48 bit precision for spatial calculations
5.CONCAT(), FORMAT() and TRY_CONVERT() functions are newly included in SQL Server 2012
6.In SQL Server 2012, the performance is 10 times faster than the predecessor.
7.Buffer rate is high in SQL Server 2012 because of data compression.
8.Data visualization tool is available in SQL Server 2012.This allows snapshots of data.
9.Support for persistent computed columns and extra geographical approach is possible with spatial features in SQL Server 2012.
10.SQL server 2012 has unlimited concurrent connections.

11. SQL Server 2012 come up with new function FORMAT() same as .format() C# function for change the date/currency format etc. 
This example displays the date in Taiwan format. Taiwan uses traditional Chinese characters.
DECLARE @date DATETIME = '12/21/2011';
SELECT FORMAT ( @date, 'MMMM dddd d', 'zh-TW' ) AS FormattedDate;

In US format
DECLARE @date DATETIME = convert(datetime,'2011/01/01 2:00:00');
SELECT FORMAT ( @date, 'yyyy/MM/dd hh:mmConfuseds tt','en-US' ) AS FormattedDate;
Result
FormattedDate
2011/01/01 02:00:00 AM

12. SQL Server 2012 have the solution for cast a money field, this is done by FORMAT() function
Example
Let's see some of the numeric formats that we can display using the FORMAT() function. Personally, I format numbers for currencies and number of decimal characters or for percentage. Here are some examples.

To display the number with currency using locale, use the following example.
Example 1:

DECLARE @money money = '125000';
SELECT FORMAT ( @money, 'C') AS MyMoney;
Result:
$125,000.00

Here, I am getting the currency symbol ‘$’ because my current locale language setting is en-us. I could also display the currency ‘$’ explicitly by using the culture parameter as shown below.
DECLARE @money money = '125000';
SELECT FORMAT ( @money, 'C', 'en-US' ) AS MyMoney;
for more example http://www.databasejournal.com/features/...-2012.html

No comments: