How many of us use some sort of date or datetime function when working with SQL Server? I cannot think of a single developer who would ever say they don’t work with datetime conversions in their application. Almost every application needs some manipulation of datetime datatypes. There are a number of pitfalls that can get into which we might not be aware. Here is a simple blog: Quiz with DATEADD Function that I would love to hear your views on what the output would be:
Interview Question of the Week #007 – How to Reindex Every Table of the Database?
Some questions are extremely popular questions and they never get old. Here is one such question which I see very often asked to DBAs in their early career. Question: How to re-index every table of the database? Answer: Well, The answer of this question can be only given in the form of the…
Read MoreSQL SERVER – The Basics of the Execute Package Task – Notes from the Field #067
[Note from Pinal]: This is a new episode of Notes from the Field series. SQL Server Integration Service (SSIS) is one of the most key essential part of the entire Business Intelligence (BI) story. It is a platform for data integration and workflow applications. In this episode of the Notes from the…
Read MoreSQL SERVER – Script to Find Leap Year
A leap year has 366 days. A leap year has 29 days for February month. Suppose you want to find if year is Leap year or not, you can use many methods. But this is one of the simplest methods. In our example I have passed the year 2000 as…
Read MoreSQL SERVER – Viewing User Configurable Info in SQL Server
Most of the blog post as I say is revisiting something I wrote a while back in this blog. Recently one my blog readers asked me about user defined counters and he seems to have bumped into the blog: How to use Procedure sp_user_counter1 to sp_user_counter10 and was thinking if…
Read MoreInterview Question of the Week #006 – Is Shrinking Database Good or Bad?
Here is the most debated Interview Question – Is Shrinking Database Good or Bad? I will try to answer this in a single statement – “Shrinking Database is bad practice for performance as it increases fragmentation. It should be used in rare cases of running out of space on drive.” I believe above…
Read More


