SQL SERVER – What is WRK file in Log Shipping?

Several customers use log shipping for disaster recovery across a remote data center. If you are reading this blog, I would assume that you already know SQL Server log shipping If you don’t, then please go through online resources to read the basics. Here is an interesting fact which I learned recently about the WRK file in log shipping. I know some of these are around as theory, but there is no concrete way to understand the nuances of what these files actually mean.

Read More

What is Difference Between HAVING and WHERE – Interview Question of the Week #068

I do a performance tuning consulting to earn my livelihood. Once in a while, I end up customer who wants to interview me to check if I know SQL. I absolutely have no problem with the interview. This is a good thing and it gives me confidence that they are serious with their project. With said that once in a while the senior guys on the other side are so busy they end up having my interview with junior (novice) experts. I often struggle with this interview question and answer with beginners because my answers are based on experience and they often do not match what they have learned in school/collage.

Read More

PowerShell Script – Backup Every Database In SQL Server

Using scripts can be a powerful way to automate things that a GUI will fail in many cases. I was working with a client who wanted to write a PowerShell script that would help him automate his backups. This is a pretty simple requirement that can be easily achieved using SMO as shown below in my scripts. I have been using these scripts for a number of years at various places. Let us see how we can backup every database in SQL Server

Read More

SQL SERVER – Unable to Open Maintenance Plan in Management Studio

The most queried topics in this blog have been around troubleshooting or which solve specific error messages. I always feel when I see something new as messages, I try to check if this is available here using the search page. If these are not there, then I go about documenting what were the steps I took to actually solve the given problem. Once I successfully solve the problem about Unable to Open Maintenance Plan in Management Studio. I go about documenting the same back into as a blog post so that I will be able to find the same in future reference.

Read More