Table Partition in SQL Server – (Basics of table partition and implementation)

Partition is a feature introduced in SQL Server 2005. Partition is a method to slice the data to many smaller chunks from larger table. There are many benefits by partitioning…

Read more »

Table type in sql

Table type is introduced in SQL 2008. Table type will be useful to send multiple records to a store procedure or function and it can be used to declare a…

Read more »

NULL value for empty field when importing flat file in SSIS

When importing data from text file you may need to apply NULL to the field where no values present (blank). Not doing so the package may fail. Consider a scenario;…

Read more »

How to get error description in SSIS dataflow

In SSIS, there is no direct method to get the error description when error occurred during data Load and transformation. We can only redirect the failed records along with Error…

Read more »

Usage of @@Error within transaction

@@ERROR returns error number of the last statement executed. When the last executed statement completed successfully, this returns 0. In case of any error, the error number will be return….

Read more »

How to find when was SQL Server restarted?

There are few ways to find out when the SQL Server was restarted, here I am going to use DMV (sys.dm_os_sys_info) to find the SQL Server restarted time.

Read more »

Table variable and Table type in transaction

The myth is to roll back the work done inside the transaction, in case of any error during the transaction. However this is not the case with the SQL Server…

Read more »

Data compression overview in SQL Server 2008

I found the Data compression feature in SQL Server 2008 is very handy. This definitely helps in optimizing query performance in terms of I/O cost and additionally it helps in…

Read more »

How to insert values into an Identity column in SQL Server

Identity is a property that can be set on a column. When an identity is enabled the column will be populated automatically by system and it will not allow user…

Read more »

Be aware when you use two digit year in date

When you execute the below query, as you expect, the result will be “September 26th 2049” Now, Lets see what happen when we pass 50 instead of 49 You will…

Read more »