Monthly Archives: March 2012

Saturday SQL Schoolhouse in Honor of World Backup Day

SQL Schoolhouse!

Today’s installment of the Saturday SQL Schoolhouse is brought to you in honor of World Backup Day, a day every DBA should celebrate!  However, DBAs know that World Backup Day should be practiced daily!  Here are some great backup articles for you to peruse.  Enjoy!


Maintenance Plans All Died…See the Magic

Last night on one of my production clusters, all of the maintenance plans died.  On my drive in to work, I thought it was probably a drive space issue, but it was also strange that I did not receive an alert for that.  Finally at the office looking at the Job Activity Monitor then view history, I get a lot of useless information that says simply “the step failed” during my reorganize index routine.  This is not much help.

When looking at the Maintenance Plan view history, then I actually see a useful error: “Alter failed for Server <servername>.”  When looking up this error ,I narrowed it down to two plausible solutions.  The first being to check to make sure that “Automatically set I/O affinity mask for all processors” is checked.  We don’t generally change that from the default.  Next.

The second option was to make sure sp_configure “allow updates” was set to zero.  I thought it was, especially since this is a 2005 box and the feature is supposed to be deprecated (books online confirmed that for me, interesting though it says the functionality is unavailable).  Low and behold “allow updates” was set to one.  A quick reconfigure and the maintenance plans are running again.

This is a temporary fix because the new server I am migrating these to at the end of the year will be running Ola Hallengren’s backup solution, like my other new servers.  Bye bye maintenance plans!


What is a Blocked Process, and Why Do I Care?

This is a question I received from a new SQL Server DBA so I thought it would make a great blog topic.  Blocking occurs in SQL Server when one process has one (or more) of the records locked and another process tries to acquire a lock on the record.  This will subsequently cause the process to wait until the original process is done so that it can acquire the record.  This can cause a domino effect if subsequent processes are waiting for the new process to be done with the records it is holding.  Blocking is somewhat different from the fatal deadlock which SQL Server handles and stops automatically (and a block can become a deadlock but this a different case). 

The blocked process essentially must wait and that can be a problem for your database!  I have previously blogged about best practices for separating our your log files to another drive as well as system databases and tempdb.  If you are not following these best practices, then they may play into your blocking situation as well as inadequate hardware for your SQL Server.

Ok, how do I see those blocked processes? 

One way is some code I found at CodeProject: List blocking processes in SQL server – CodeProject®.

Or, two days ago I wrote a blog talking about the newest release of Adam Machanic’s Who is Active stored procedure.

Below I have listed a couple of links for more information on how to use this procedure.

Adam Machanic : Why Am I Blocked? (A Month of Activity Monitoring, Part 19 of 30)

Adam Machanic : Blocking, Blockers, and Other B Words (A Month of Activity Monitoring, Part 14 of 30)

Adam Machanic : Leader of the Block (A Month of Activity Monitoring, Part 23 of 30)

Thanks, Adam!  Enjoy!


SQL Server 2012, Here We Come!

After meeting with Microsoft today to discuss our existing licenses and software assurance level, my organization gave SQL Server 2012 the green light!  With our existing software assurance agreement, we will be grandfathered in to the new structure.  Thus, when we renew our agreement in 2014, we will convert our existing processor based enterprise licenses to their equivalent core based licenses without additional penalty.  That conversion had management worried and there was  even discussion of staying on 2008 R2 for as long as feasibly possible, which no DBA wants to hear. 

With the grandfathering process, there will be a concerted push to build some new clusters so that they may be grandfathered in as well, especially since we found out that our new acceptance cluster did not count against our licenses if we had the appropriate MSDN licenses for our three SQL DBAs.  Personally, I was worried that the new licensing structure may derail some of management’s plans to reduce our Oracle footprint onto SQL Server.  If that had been derailed, my plans for global domination would have once again been thwarted by those darn meddling kids.  Or was that just old man Smithers channeling through me again?


An Amazing Utility: Adam Machanic’s Who is Active

In case you haven’t heard, Adam Machanic (Blog | Twitter) released Who is Active v11.11 last week.  If you are using this utility, then you will want to grab this version as it will be the last version to support SQL Server 2005.  If you are not using this utility, then you own it to yourself to download it and check it out.  Thinking about going into detail about the various uses of this utility, I decided it would be better to link to Adam’s blog where he did a series called a Month of Activity Monitoring where he presented thirty blog posts detailing activity monitoring and the script.  Why reinvent the wheel, especially when it rolls so smoothly?

Enjoy, and thanks Adam for a great utility!

Sick today

I must not have recharged enough yesterday for I was sick today. You have to take care of your body or it will not cooperate. I needed the rest and relaxation, should be raring to go tomorrow!


There are some days when you just need to recharge.  Today was one of those days.  It was great to sleep in and recharge, and then spend the day relaxing and watching the new Coppola restoration versions of Godfather I and II, two of the greatest movies ever made.  Every now and again you need a day to recharge your batteries to restore your drive and enthusiasm.  Today was that for me.  Enjoy!

Motivation…What Motivates You?

What motivates you?  Do you get excited about going to work everyday?  If not, then why?

Are there certain things about your job that make it less than desirable?  Do you enjoy the work you do, just not the people you work with?

What motivates you?

Everyone always says that making more money does not always make employees happier, although I have found that most of the people who say that generally make considerably more than you.  It is similar to wealthy people who say that money does not buy happiness.  Are you kidding me?  Money can buy you a jet ski and who is not happy on a jet ski?  Of course that is an exaggeration, but making more money is not about being happy, it is about being able to provide for you family, save for retirement and provide some leisure activity.

Everyone will agree that it is hard to be happy when you cannot provide for your basic needs.  I also understand that your needs adjust when you make more money, but increases in salary tells the employee that his productivity is valuable to the employer.  There must also be an appreciation for your services.

None of that should motivate you, of course save the appreciation.  Your happiness should be of your own doing.  No matter what your situation, being happy is a choice.  I choose to be happy, what do you choose?  Enjoy!


We Need your SA Account

If you are dealing with a large development and infrastructure staff like I do then I am sure at some point you have heard, “We need the password to your SA account.”

Which is always followed up with my question, “Who is your daddy and what does he do?”  Wait that is the line from Kindergarten Cop, my real question is always; “What for?” 

Then there is a phone call where someone usually tells me that I am not being a team player.  No, you do not need my SA account to deploy a database.  No, you do not need db_owner to access your own database.  At this point, I do not care if the vendor told you it is required.  Unless you can tell me what it is you need to do then the answer is no.  No, I am not letting you wreak havoc on my production environment.  Yes, I would love to help you and yes we are on the same team.  No, I will not give you the SA password.  Sorry, not going to happen.  Yes you can enjoy your weekend, that is all!

“Many thoughts to blog about, have I!”

“Many thoughts to blog about, have I!” spoken in my best Yoda impersonation that I could muster this morning.  Spinning the wheel at the list…next up, backup strategy.  Ding, ding, ding, we have a winner!

Yesterday, I was tasked with re-evaluating our existing backup strategy and determining if we are getting the most out of our existing strategy.  At the same time, I need to determine if compression will interfere or be enhanced by the DataDomain deduplication process.  We are also licensed for Red Gate SQL Backup Pro as well as HyperBac we just have not had enough time to implement those solutions.  Any comments on this would be greatly appreciated.



%d bloggers like this: