SQL SERVER – FIX Error: Maintenance plan scheduled but job is not running as per schedule

This was one of the interesting issues I solved in many days. One of my clients contacted me and told that they have scheduled a maintenance plan to take t-log backup at 10 PM but it’s not running. When we look into the job history, it was not showing any history. Some problem statements like these are interesting because they look trivial and simple – yet they are convoluted and not straightforward to solve. Let us learn how to solve Error “Maintenance plan scheduled, but the job is not running as per schedule”

Read More

SQL SERVER – Configuring Startup Options for SQL Server Management Studio

Yesterday I started my day early to get to a gym. I know this was the first day and I had loads of work pending to be completed at work too. This got me busy and I started to drive my car, oblivious of the fact that I had to take a turn which I missed. Just while crossing the junction I realized I had missed it. It was a bad start to the day as I wasted 5 minutes to retrace back to the original route. On second thought, this mistake from my side got me thinking. My mind was tuned to specific routes and this is the same thought process that got me the inspiration to write this post. Let us learn how to configure startup options.

Read More

SQL SERVER – FIX Error 5120 – Database is in Read Only Mode After Attaching Files

Sometimes you need to know more about permissions on file, service account etc. to fix certain errors. In my recent visit to a customer location, one of the database developers came to me with a problem. He said that when he attaches MDF and LDF file to the SQL instance, attach is successful, but the issue was next to database name it was saying read-only. Let us see how we can FIX Error 5120.

Read More

SQL SERVER – Displaying SQL Agent Jobs Running at a Specific Time

Recently I was troubleshooting at a customer location something that looked trivial. When the customer approached me for a consulting requirement wherein they were saying their system was going unresponsive every day in the morning around a certain time. They were clueless to what is happening and why this was the case almost every day in the week. I got curious to understand what was going wrong with SQL Agent Jobs.

Read More

PowerShell – Script to Listing all Backups Taken with SQL Server

I always like to keep a number of scripts handy in my USB drive with my Laptop. These scripts are used for my internal use when I am suddenly looking for something interesting in customer environments. One of the scripts that I use is shown below. Many a times I have seen customers don’t really have any backup strategy. And when I start working with them, I call out some of the basic backup techniques that they need to be doing.

Read More