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 – Script level upgrade for database ‘master’ failed because upgrade step ‘upgrade_ucp_cmdw.sql’

Recently once by my client contacted via Skype to know my thoughts about a cluster failover failure issue. They were having two nodes SQL Clustered instance and it was running fine of Node1. As soon as they failover to Node2, it was not able to start and was failing with upgrade script. Let us learn about the script level upgrade for database ‘master’ failed because upgrade step ‘upgrade_ucp_cmdw.sql’.

Read More

SQL SERVER – Understanding Basic Memory Terms of Physical Memory and Virtual Memory

Recently I had been to an institute to talk about some database concepts to computer science students. Most of these academic engagements get me closer to young minds and this is an awesome way for me to bring some of the industry concepts in a digestible simple format. Trust me, this takes double the preparation I normally do for professional sessions because now I need to make the concepts so simple that even kids of any age and with no knowledge can still get the concepts being explained. A lot of times this is an exercise for me to show how self-learning can be much more rewarding and unique when compared to what text book teaching would look like. In this blog, let me take up the concept around Physical and Virtual memory which took some considerable time for me using a whiteboard. I am sure, you would have also learnt these concepts a while back, but this is a refresher in my opinion for all.

Read More

Does Dropping Primary Key Drop Non-Clustered Index on the Column? – Interview Question of the Week #085

Question: When we drop primary key on the column, does it automatically drop a non-clustered index on the same column (if created)?

Before we see answer of this question, I suggest you read following three blog posts, they discuss various similar aspects related to the primary key and clustered index.

Read More