Sunday, December 25, 2011

New T-SQL Features in SQL Server 2012


In every version of SQL Server new T-SQL features are introduced. These are new T-SQL features of SQL Server 2012.

  • Sequences
  • Function
    • String function CONCAT,FORMAT
    • Logical function CHOOSE,IIF
    • Date & time function
      • EOMONTH
    • Conversion function
      • PARSE
      • TRY_PARSE
  • Paging Data
  • Lag & Lead
  • Exception handling
  • WithResultSets

Friday, December 23, 2011

Sample Databases for SQL Server 2012 RC0


Sample databases dedicated to SQL Server 2012 RC0 are released. AdventureWorks2008R2_Data.mdf and AdventureWorksDWDenali_Data.mdf are those files. You need to attach these mdf files to your SQL Server instance.

Download these sample data files from here.

Tuesday, December 20, 2011

New Express Edition : LocalDB

New to the Express family, LocalDB is a lightweight version of Express that has all its programmability features, yet runs in user mode and has a fast, zero-configuration installation and short list of pre-requisites. Use this if you need a simple way to create and work with databases from code. It can be bundled with Visual Studio, other Database Development tools, or embedded with an application that needs local databases.

Try it here today!

Monday, December 19, 2011

Drop a Database by Closing Existing Connections using SSMS or T-SQL


Dropping database from SQL Server is not a major task. However, it can be painful if that database is being used at time of dropping it. Read this FAQ from

Wednesday, December 14, 2011

Two SPIDs in sp_who2


sp_who2 is function you can use to identify who (Login) is running at what (DBName, command) from where (SPID & Host) as you can see in the following image.


If you look closely, you will see that there are two SPID columns with same values. By looking at them, they are same So let us see the coding of this.


So you would see that SPID column is convert(char(5),spid) so why on earth same column twice.

Just see the comment after second SPID.

Handy extra for right-scrolling users.

Do you agree. I am not Smile .