Search This Blog & Web

Thursday, February 23, 2012

SQL SERVER 2012 "Denali" -- Hardware and Software Requirements

I have gathered this information from Microsoft and other blogs.



·         Microsoft recommends using NTFS file format instead of FAT32. FAT32 will work but you should probably not use it.
·         You can't install SQL Server 2012 (code-named Denali) on mapped drives or compressed drives.
·         You have to have the "no-reboot" package installed prior to installing SQL Server 2012 (code-named Denali). This is included in Windows 7 SP1 and Windows Server 2008 R2. Otherwise, you can download the no-reboot package from Microsoft.
·         SQL Server 2012 (code-named Denali) requires the .NET Framework 4.0.
·         Virtualization is supported using Microsoft's Hyper-V technology.
·         You will need at least 3.6 GB of free disk space.
·         Microsoft recommends that you do not install SQL Server 2012 (code-named Denali) on a domain controller.
·         Recommended Processors & RAM
·         64-bit version: AMD Opteron, AMD Athlin 64, Intel Xeon with Intel EM64T Support or Intel Pentium IV with EM64T support running 2.0 GHz or faster. Recommended RAM is maximum that operating system supports or at least 2 GB.
·         32-bit version: Pentium III or compatible running at 2.0 GHz of faster. Recommended RAM is maximum that operating system supports or at least 2 GB.
·         Windows PowerShell 2.0 is a pre-requisite for installing SQL Server 2012 (code-named Denali). You can get this software from the Windows Management Framework page.
·         Check out the step by step installation guide with screenshots to get a preview of the SQL Server 2012 install and configuration process.

Tuesday, February 21, 2012

SQL SERVER History


The history of SQL Server dates back to 1989 when the product came about as a result of a partnership between Microsoft, Sybase, and Ashton-Tate.

Database Version
Year
Release Name
Codename
1.0 (OS/2)
1989
SQL Server 1.0

4.21 (WinNT)
1993
SQL Server 4.21

6.0
1995
SQL Server 6.0
SQL95
6.5
1996
SQL Server 6.5
Hydra
7.0
1998
SQL Server 7.0
Sphinx
-
1999
SQL Server 7.0
OLAP Tools
Plato
8.0
2000
SQL Server 2000
Shiloh
8.0
2003
SQL Server 2000
64-bit Edition
Liberty
9.0
2005
SQL Server 2005
Yukon
10.0
2008
SQL Server 2008
Katmai
10.5
2010
SQL Server 2008 R2 & 2010
Denali

2012
SQL Server 2012 CTE0



Wednesday, February 8, 2012

Computed / Calculated Column with Persisted Value


In previous blog http://shamas-saeed.blogspot.com/2011/05/creating-computed-calculated-column-in.html we have learned how to create a computed or calculated column and what is its limitation. In this blog we will what is difference between computed columns and persisted computed column and why computed column persisted is required.
Persisted computed columns are giving better performance than the cost of reading IO from database. Although you can see by creating index it will increase performance but our focus is to show performance difference
·         Computed columns used as CHECK, FOREIGN KEY, or NOT NULL constraints must be marked PERSISTED.
·         A computed column can be used as a key column in an index or as part of any PRIMARY KEY or UNIQUE constraint if the computed column value is defined by a deterministic expression and the data type of the result is allowed in index columns.
For example, if the table has integer columns Value1 and Value2, the computed column Value1 + Value2 can be indexed, but computed column Value1 + DATEPART(dd, GETDATE()) cannot be indexed because the value may change in subsequent invocations.
As shown from attached screen we can see how much computed column index will improve performance for example by creating index on FullName it will improve 99.7884 percent. I will post another blog for creating and effect of index on computed column.

/*  Performance Effect  */


/*   Code sample */

USE AdventureWorks2008R2_Data
GO

-- Create Table
IF EXISTS (SELECT * FROM sys.objects WHERE OBJECT_ID = OBJECT_ID(N'[dbo].[nonpresisted]') AND TYPE IN (N'U'))
DROP TABLE [dbo].[nonpresisted]
GO
IF EXISTS (SELECT * FROM sys.objects WHERE OBJECT_ID = OBJECT_ID(N'[dbo].[presisted]') AND TYPE IN (N'U'))
DROP TABLE [dbo].[presisted]
GO
CREATE TABLE nonpresisted (ID INT,
FirstName VARCHAR(100),
LastName CHAR(8000))
GO
CREATE TABLE presisted (ID INT,
FirstName VARCHAR(100),
LastName CHAR(8000))
GO
-- Insert One Hundred Thousand Records
INSERT INTO nonpresisted (ID,FirstName,LastName)
SELECT TOP 10000 ROW_NUMBER() OVER (ORDER BY a.name) RowID,
'Bob',
CASE WHEN ROW_NUMBER() OVER (ORDER BY a.name)%2 = 1 THEN 'Smith'
ELSE 'Brown' END
FROM sys.all_objects a
CROSS JOIN sys.all_objects b
GO
INSERT INTO presisted (ID,FirstName,LastName)
SELECT TOP 10000 ROW_NUMBER() OVER (ORDER BY a.name) RowID,
'Bob',
CASE WHEN ROW_NUMBER() OVER (ORDER BY a.name)%2 = 1 THEN 'Smith'
ELSE 'Brown' END
FROM sys.all_objects a
CROSS JOIN sys.all_objects b
GO
-- Add Computed Column
ALTER TABLE dbo.nonpresisted ADD
FullName AS POWER(LEN(LEFT((FirstName+CAST(ID AS VARCHAR(100))),3)), 12)
GO
-- Add Computed Column PERSISTED
ALTER TABLE dbo.presisted ADD
FullName_P AS POWER(LEN(LEFT((FirstName+CAST(ID AS VARCHAR(100))),3)), 12) PERSISTED
GO
 -- Select Comparision
SELECT FullName
FROM dbo.nonpresisted
WHERE FullName = 531441
GO
SELECT FullName_P
FROM dbo.presisted
WHERE FullName_P = 531441
GO

 --Clean up Database
DROP TABLE nonpresisted
DROP TABLE presisted
GO