SQL SERVER – Find Week of the Year Using DatePart Function

As I blog every single day, lots of people ask me if I have to build a calender for the same. The answer is yes, I do not have a personal calender and I keep a note of all the ideas in the calender. The next day when I get ready to blog, I use the same calender as a reference to blog about the same. Most of the time I plan out my week at a time. Let us learn about how to find week of the year using datepart function.

Read More

SQL SERVER – Fix Error – Cannot use the backup file because it was originally formatted with sector size 4096 and is now on a device with sector size 512

Here is a recent email which I received from Madhu. He is a beginner in the SQL Server and when he tried to take a backup from SSMS (SQL Server Management Studio), he got error related to backup file. As soon as he sent me an email I knew what was the exact problem, he was facing and I was able to help him quickly. Let us first recreate the same error and later on see how to fix the same.

Read More

SQL SERVER – Creating a Copy of Database in Azure SQL DB

Recently I was about to undertake an interesting assignment for one of my clients who pinged me for Performance Tuning exercise. Since this is something I have been doing full time in the past couple of months, I got into the call immediately. Lesser did I know what I was about to get into actually. Since the problem was about SQL Server query performance, I thought it would be the usual routine. Let us learn about how to create a copy of the database in Azure SQL DB.

Read More

SQL SERVER – Becoming a More Effective DAX Developer with DAX Studio – Notes from the Field #134

[Note from Pinal]: This is a new episode of Notes from the Field series. I personally have no problem accepting that I do not know many topics. One of the such topics is DAX Studio. I always wanted to learn more and I finally got the opportunity to learn more.

In this episode of the Notes from the Field series I asked SQL Expert Bill Anton a very crucial question – How to become a more effective DAX developer with DAX Studio? Bill was very kind to answer the questions and provides plenty of information about how a novice developer can work with DAX Studio.

Read More

SQL SERVER – System Stored Procedures I Use to Get Started

Call me an old school or whatever – there are certain things I believe in strongly. I have a working style and these in my opinion have evolved over years. I keep innovating myself as I learn on my way but there are few things I do that always makes me think I have not changed much. Let us learn about System Stored Procedures I Use to Get Started.

Read More