SQL Server

DateTime Craziness in SQL Server when looking for records within a date range

Working with the DataTime datatype in SQL Server can be very frustrating at times Especially, when you use them in your where clause. For example If you want to list all records within a certain date range, you might end up retrieving incorrect rows.

How to check your SQL Server Version?

If you come across some strange differences in your SQL Server or SQL Management Studio in comparisons to what others are using, you are sure to be tempted to want to check you version number to make sure if you have the latest version with all the latest Service Packs Installed.

Here this table should help you to understand which version you have.
The following table lists the Sqlservr.exe version number.

Master Key Encryption in SQL Server

I have been using Service Broker recently and found it exciting and useful. It seems like a cool feather in SQL Server. I use the SQL Dependency class in my .Net Windows Service to listen for the Service Broker Notification. When there is an Insert to the tables in my database the Service Broker sends me a Notification which alerts my Windows Service Application to Query data from the table and do the processing. It works very well.