Making A Difference

MakeADifferenceA father was awoken by his wife to check on their son who was asleep but making noises that they could hear through his room monitor. The father, half a sleep and thinking his son was dreaming, wondered into his room and called out to his son only to find that his son wouldn’t answer him. The dad stumbled over to his son’s bed to find that his eyes were rolled back in his head and he was stiff as a board. Panic set in, the worst scenario for the parents was coming true. The son, who had type 1 diabetes, had gone into a diabetic shock – his blood sugar had dipped to low while sleeping. The father feeling for a pulse; scooped the son up and rushed him down stairs to apply an emergency Glucagon shot while the wife called for an ambulance.

Why am I sharing this you may ask? Simple, the father of that boy is me and from that night on he has been my hero which leads me into this article…….

I was fortunate and blessed to attend my first PASS SUMMIT in 2011. After getting passed the complete awesomeness and the many renowned speakers I found myself wanting to ask questions and kicking myself in the tail for not asking them. Come on, let’s be honest, you’ve been there with various things in your life. You don’t want to ask questions because you don’t want to feel not as smart, or you see someone who has years’ experience and think why would they want to waste time on what I think. I know I felt that same thing and then it all kind of just clicked in my head.

I got to thinking about my boy while at that PASS Summit and the inspiration he had given me that night, then sitting in a session and looking over and seeing Brent Ozar in the class actually learning (floored me; in my eyes this guy knows everything SQL related), or Paul Randal sitting in on a session a few seats away, or asking advice from Chris Shaw on a presentation he did on Utility Databases. I found out a few things at the Summit about myself that otherwise I would have stayed in my shell.

  • The people that you look up to in the industry are 9 times out of 10 the most down to earth people you would ever meet and are willing to offer advice if you ask.
  • Step out of that comfort zone; this blog was started based on attending the PASS Summit and thinking if I can help one person along my SQL journey as a DBA then it is all worth-while.
  • Speaking – never thought I’d do it but found out I truly enjoy it and helps me interact with a lot of faces and people.
  • Learn from the SQL Community as a whole; have you been to any forums, blogs on a regular schedule?
  • Not one question is a dumb question; everyone learns so go ahead and ask that question  you are hesitant about.
  • Hard work – it does pay off. Don’t short cut anything – dig in, dive in, and give it all you got.

If you have thought about stepping out and starting your own technical blog – DO IT

If you have thought about going up to someone and asking them for advice – DO IT

If you are at a conference and you have a question but the speaker is what you call a Master Jedi in our industry – DO IT

It takes one to make a difference in someone’s career, it takes one to make a difference to someone who might not yet be comfortable in asking the question to solve the problem, it takes one to encourage the person just starting out to get the most out of their potential.

For those of us who have been in the SQL industry for years; when is the last time we put away our ego’s and  helped the one starting out? Or maybe we have a wealth of  knowledge and need to step out and be a voice in the SQL Community.

It takes one ~ will you be that one?

Removing Backup Media By Database

DeletePersonHave you ever inherited a server and find out that your msdb database is rather large in nature?  Or maybe you have never set up any maintenance on your msdb with regards to retaining backup history? Okay, okay perhaps you don’t fall into those categories but maybe you have policies in place and you offline a database for whatever reason and your policies start to fail for backups not taken in the last 24 hours. Maybe you fall into one of these categories or maybe you fall into a different one, whatever the case may be there are options for removing the backup history cleanly and methodically without going all rogue style in SQL.

Microsoft has provided a couple system stored procedures within the msdb database for removing backup history, but I will only focus on one, sp_delete_database_backuphistory.

This little gem, if used properly, will remove the backup history for a particular database. This comes in very useful as recently taking a database offline to be decommissioned was messing with policy checks in place, particularly the one I mentioned above where a the policy checks to see if a database had been backed up within the last 24 hours.

The Code

/*This code deletes backup history for a specific database*/
use msdb
go
exec sp_delete_database_backuphistory ‘yourdatabasename’
go

The Tables Affected

  • backupfile
  • backupfilegroup
  • backupmediafamily
  • backupmediaset
  • backupset
  • restorefile
  • restorefilegroup
  • restorehistory

Conclusion

There are tools available at ones disposal to help in situations with SQL. Microsoft has provided a number of system stored procedures but it would not be prudent to just go start running scripts or executing procedures without first knowing what they are going to do to your systems. Never run anything in production or any environment for that matter without first testing it on your local sandbox.

Add this script to your repository, you never know when you will need it.

Success Is Journey Not A……

I’ve ofSuccess or Failureten heard the quote “Success is not a journey, but a destination”. Over the course of the last few weeks that quote has taken on a life like form in many fashions. To name a few things that have come to light to make this quote a very real thing are the MCM retiring, having a VMAX overloaded by maintenance plans across the board, upcoming DR Testing, planned Power outages (better than non planned ones eh!).

All these things as I look back on them screams to me that Success is a journey, not a destination. For SQL Data Professionals our jobs are ever changing and growing as we grow with it. Each day is an opportunity to learn something within SQL that you or I didn’t know yesterday, each day presents it’s own opportunities to reach resolutions that you or I didn’t know yesterday, and each day represents that during our failures we can discover the true desire for success.

To the beginner who is starting out who doesn’t know about the sp_configure, the proper use of ORDER BY, or what Table Scan vs. Indexing; the answer is not to just ignore or give up. Dig in and discover what that solution is; it’s how we learn.

To the seasoned SQL Data Professional vet who has been putting off getting on the speaking circuit, taking a newbie under your wing and mentoring them, or simply are just comfortable; challenge yourself. Step outside that normal box and tackle new things head on.

When you have that replication issue that goes awry and you don’t have that big enough wrench to fix it (I use this analogy all the time thanks to Robert Davis a.k.a. SQLSoldier (B|T), stay the course and work your way through it.

I get asked a lot of questions when speaking, email traffic etc., where individuals feel defeated in the problems they are facing within SQL. Every problem has a solution; every solution is waiting to be found it’s up to us as SQL Data Professionals to buckle down and find the answer.

If you are not active in the community I’ve listed some of what I call top tier SQL Data Professionals on the right of this blog site that I follow who have helped me in my DBA career. Forums are also a great place to increase ones learning…to name a few you can check out these:

One last note; when is the last time you just said a simple thanks to someone who has helped you in your career? This past week that has weighed on my mind greatly. A former boss, a mentor, a person who you get newsfeeds from…..I fall in the boat where I get wrapped up in the work I do; I often overlook the simple thank you that in reality goes a long way.

Tackle obstacles, Tackle your fears, and Tackle the solution head one.

PASS – Time To Get Your Vote On

VoteI can remember pretty vividly the first time I attended a PASS function. It is something that profoundly changed my outlook on my career and how I view the SQL community as a whole. With that said there are three seats open for the PASS Board of Directors and you can view their profiles here.

I am familiar with just about everyone who is up for election, and while I don’t know them personally, I follow their work and what they stand for daily. All of the candidates hold what I believe to be the following:

  • Integrity
  • Character
  • Ability to communicate effectively
  • Share their knowledge with the community
  • All seem to want to influence the growth of our community
  • Responsible

These are just a few of the many traits that these finalists represent.

One of the very first ones that I came across on this list that stuck out to me was Allen Kinsel. It’s a no brainer from an experience standpoint along with is proven track record, but the ideas, goals, and future outlook is what has lured me to this candidate. As I stated earlier each candidate is deserving in their own right; I encourage each of you to follow up in reviewing these well deserving candidates. The decision itself will be a difficult one for me; how about  you?

To the candidates themselves I wanted to personally thank you for your time, effort, countless hours of sharing your knowledge, being proven leaders, and allowing yourselves to be nominated for such a prestigious position.

**Voting will open end of day Pacific Time Sept. 25 and close at noon Pacific Time Sept. 30. Ballots will be sent to all PASS members in good standing as of June 13, 2013**

Adversity – How Do You Handle It?

Adversity Adversity by definition is a difficult situation or condition misfortune or tragedy. When that time comes; how do you handle it?

If replication breaks causing the business to not get the data they need in a timely fashion and you are the lone conductor driving the train down the tracks and everyone is standing at your desk, how do you handle it? I

f your backups failed from the previous night and for some reason your notification of failure didn’t reach you and you had no knowledge of the situation until days later, how do you handle it?

Someone calls and said they can’t access their systems and you find out something is causing tempdb to fill up, how do you handle it?

Better yet, you find out that a certification you were working toward had been retired (MCM), how do you handle it?

Response

I can only speak for myself and no one else, I fell into the same category a lot of people across the nation did of working toward the MCM certification goal. I mean let’s face it, last I checked a very small percentage obtained this goal and being the competitive person I am I wanted to reach that goal. Not for anyone else but for myself and the standards I set for my own self.

At first I was upset and like so many others not so much toward the retiring of the program but how it was delivered by Microsoft. I purposefully waited to construct a blog post as I didn’t want to let emotions get in the way of potential views toward the topic.

Adversity has now hit for a lot of people, for me in particular I choose not to dwell on it but wait to see what will be offered next by Microsoft, restructure my goals, and move forward. I am a bit biased but I get to work with some of the best technology day in and day out and am in constantly learning mode. Some of the things that we can control are the way we handle adversity when it rears its ugly head, the attitude to how we conduct ourselves through the adversity, and the character building we can learn from it.

Am I happy about the retirement, no I wasn’t. At the end of the day though I do have a lot to be thankful for and looking back on my studying, lab testing, hours of working toward the certification it allowed me to push myself to learn a lot more than what I did the previous day and the day before that. I’m eager to see where the next chapter leads in the stepping stone of my learning.

Adversity – how will you handle it? Each of us are different; doesn’t make one person better than the next by how we handle it, but I do encourage others to push through adversity when it comes. You’ll be a stronger person in doing so.

T-SQL Tuesday #45–Follow the Yellow Brick Road

SQL TuesdayIs it me or does it seem like we just had a T-SQL Tuesday blog party? These days are just flying by! This week Mickey Stuewe (b|t) is hosting and she has brought up a fabulous question about auditing with the topic being Follow The Yellow Brick Road. I have been on both sides of the fence in shops where there has been very limited auditing versus mandated regulatory auditing of their systems – so what’s my preference? Glad you asked; pull up a chair as we travel down the yellow brick road from munchkin land while trying to avoid the wicked witch and her ape like minions.

What to Audit?

As we start out on this journey, there are multiple questions on what needs to be audited one should ask themselves. Let’s face it, there are many wicked witches out there that just flat out want to get to our data and the longer I’m in the business I’ve seen more and more attacks from within, then from the outside. Here are a few ideas on some things to audit:

  • Tables with sensitive data such as SSN’s, personal information, transaction data
  • Review of your QA, UAT, and Prod environments (some shops like to audit all 3 some like to only audit Prod) – don’t be the one who audit’s none!
  • Check-ins of code into your repository
  • Inserts
  • Updates
  • Growth trends
  • Security Access
  • File Shares

These are just a few ideas, but don’t limit yourself to just auditing who inserts or updates data into your systems. As you fly through the house like Dorothy did in the SQL tornado remember to think outside the box some and audit other areas such as growth, baseline trends. The SQL environment is always evolving, use the necessary tools to keep one step ahead of the storm.

How To Audit

All right, so I’ve identified what I want to Audit. It seems like it is a daunting task and I have no clue where to begin; that’s where the Tin Man comes into play. If you are a Data Professional then you have to care about the data enough to even be reading this post – – means you have a heart.

There are many different avenues you can take to audit your systems, a few of those are:

  • Triggers within SQL
  • 3rd Party Auditing Tools
  • CDC
  • Home grown utilities

Whatever avenue you decide to take, just take the stance of doing something. Doing nothing is not something I would advise; knowing who is changing your data, schema, files, etc. is an important aspect of any data professionals life – who knows if you have a mighty Wizard of Oz such as your auditing department or compliance department they might just be thankful for your efforts.

Summary

When you are going through your own SQL journey on the yellow brick road remember that auditing can be viewed upon as an asset. Look into what you are doing currently, can you improve upon it? Are you doing anything at all? Is your data being protected? Even better do you know if your data is being protected?

Take the time to put some safeguards in place in the end you will be glad you did.

T-SQL Tuesday

Wait a minute, wait just a minute. What is this T-SQL Tuesday you speak of. The mighty Wizard of Oz, Adam Machanic (b|t), started this party in 2009. Basically each month on the first Tuesday an invitation is sent out that describes a topic for that month; the second Tuesday bloggers put together a post regarding the topic and then send it back to the person who is hosting. If  you have a blog and are interested contact the mighty Wizard of Oz and he’ll get you on the schedule.

Back to Basics

BasicsI can sum up this blog post in two words: The Basics

What do you mean?

I cannot be the only one in this same boat. There have been times where I, as a DBA, have overcomplicated resolutions when there was simply a very non complex answer. Come on, you know what I’m referring to – the basics. In looking up the exact meaning of what basic says; the dictionary tells me it is the “fundamental or basic principal”. I took that meaning this week and looked deeper into how I attack some DBA related items and I keep coming back to – “keep it simple” and “get back to the basics”.

The Basics

When I say basics I’m coming at it from a DBA standpoint. Do you have your own checklist that you go by for daily, monthly, quarterly, yearly checks? If not, then this is as good as time as any to start.

What are some of the things to include in your basic checklist?

Some items to include, but not limited to are:

  • Backup processes and alerting upon failure
  • Review of jobs (if any have failed)
  • Anything in the SQL Error Logs?
  • If you use Policy Based Management (PBM) and receive reports – any action to take?
  • Security logs – have you checked?
  • If issues are found how do you handle them? Just don’t sweep them under the rug
  • Hopefully you have something in place that tells you when you are running low on space (storage)….if not might want to start thinking about getting something implemented; by the way how is the space looking?
  • You’re fragmentation process for indexes working properly?
  • Remember those backups you checked? You spot checking any restores to validate them at all?

Summary

The list above is just a simple list to get started with….get back to the basics of DBA work. It’s a fun and enjoyable ride, but keep one thing in mind as you traverse through the SQL terrain not to overcomplicate things. You will find many checklists on the web by some renowned DBA’s that one could model a standard off of if you don’t already have one. I’m a big believer in automation and automate what you can to help you become more efficient and streamlined. Get the reports emailed to you when you start your day, at best make sure notifications are set up on the jobs running in case of failure.

Keep it simple, get some standards in place, above all remember the basic principals. Don’t overcomplicate issues and when you run across them don’t sweep them under the rug and wait for the next DBA to come along to fix them; take the time to fix them correctly.

So You Want To Go To Pass Summit?!?!

http://www.sqlpass.org/summit/2013/ Back in 2011 I was afforded the opportunity to attend PASS in Seattle, Washington. It was the first time I had made such a journey to this conference; I really didn’t know what to expect. I’ve heard the stories, the     many positive things regarding the sessions, learning, and networking – but to be quite honest the stories do not give PASS justice until you experience it first hand. I get asked this question all the time by various  people throughout the country – Should I attend? Because of the interest I want to take a moment and lay out how it has benefited me in the span of 2 years.

The Beginning

When asked to go to PASS I figured it would be like any other business conference I had been to (boy was I wrong). Leading up to my departure I had a lot of work to get done and wasn’t really in a place I felt like I should go. I started to review the sessions online and I quickly saw how vast the information really is. Looking at the sessions I began to look at the speakers, some I knew and some I did not but what was obvious to me is that a lot of the leading leaders in my industry (DBA) were going to be there; hearing them speak on topics of interest to me I thought to be an extreme plus…..moving on

The Expectations

My expectations were that of learning some new techniques from the Jason Strate’s (B|T), Brent Ozar’s (B|T), Chris Shaw’s (B|T), etc. but what I walked away with were new connections with a SQL family that was over 2k strong and memories that I will take with me for the rest of my life. PASS has so much to offer to each individual, from the sessions, to the vendors interacting, the kick-off speakers, and much more.

Perspective

From my own personal experience attending is something that kick started my career into overdrive. From it I became more active in the community, started to speak locally, created the SQL Corner, and made many new friends along the journey. No, PASS is just not another business conference where you go and sit in on meetings; of course you do that but it is much more. Being part of the SQL community means you are part of a family and all the family comes together to gain more knowledge within the perspective fields.

Summary

Why should you go; glad you asked. I think PASS sums it up better than I ever could here. This year in 2013 PASS is going to be in Charlotte, N.C.; if you haven’t reserved your spot yet I hope you do so. It is one of the best conferences I’ve ever attended from both a business and personal standpoint. Do you want to kick start your career? Are you eager to learn more and connect with other people that are trying to do the same? If you are then PASS Summit is for you. If you have questions you can contact them here or drop me a line and I will do my best to get you an answer.

T-SQL Tuesday #44 The Second Chance

http://www.sqlballs.com/2013/07/t-sql-tuesday-44-second-chance.html?utm_source=buffer&utm_campaign=Buffer&utm_content=buffer2679c&utm_medium=twitter What a perfect way to start back on the blog after taking a month off for vacation and family time – T-SQL Tuesday. If you are hear reading this blog chances are you already know what T-SQL Tuesday is; if you don’t then first off I want to take a moment just to fill you in. Adam Machanic (T|B) came up with this block party every second Tuesday of each month. It is a party where a host can present a topic to a community and then the community can blog about the topic ~ fantastic idea! How can you host; well I’m glad you ask….you can contact Adam via his blog and let him know you are interested…he has all the information you need to know and what the requirements are from here.

In saying that, this months party is hosted by Bradley Ball (T|B) and is labeled T-SQL Tuesday #44 The Second Chance.

I’ve been asked this question from time to time in conferences or groups that I have spoken to. I keep going back to a certain point in my life that I remember very vividly which I will try to do it justice in this blog post.

PROGRESS NOT PERFECTION

Being a developer for many years and then transitioning over to DBA for again many years I have had my share of mistakes that I have made….guess what? We all have and no one is perfect. Mistakes will occur; it is inevitable. How you learn from those mistakes are integral for ones professional growth. Do you pick yourself up, accept needed constructive criticism from a co-worker, or maybe no one knows about the mistake that you made. In that case, do you own up to it or do you try to sweep it under the rug? It’s all right to make mistakes ~ how do you learn from it?

The Blunder

I remember coming right out of college and accepting my first position. It was a position where I had a friend working from high school; he had already been on the job developing and working with SQL for some time and I was green as the grass that grows in the summer time. One of the duties I was afforded was building import process for files to load into the system. Back then there wasn’t SSIS, we used a language called Progress which is similar to what a VB (Visual Basic) is. Now that I’ve dated myself a bit I’ll share the mishap. In building an import process it was tested and moved on to production, to not go into to much detail about the broken processes in place a break in the code would display a message box when certain criteria was hit. Needless to say in a 500,000 record file the scenario was hit often; what was the solution – instead of asking for assistance and not to hit the enter key 500,000 times on the message box another developer decided it would be a grand idea to stick a pen cap in place to hold the enter key down. Now, mind you 20 yr. olds might not be a seasoned vet but this did smell fishy. The import graciously finished but since the pen cap was doing a nice job it just went on ahead and loaded the data again on a second run. After realizing what had happened it was then felt prudent to perhaps rope the ole boss in. Ah yes, that was a fun conversation – one might ask – you mean you loaded dups into the system; didn’t the import take that into consideration – I’ll plead the fifth. I learned how to clean up a lot of data at an early point in my career!

SUMMARY

Everyone will make mistakes; how you learn from them and how you proceed in taking a negative and turn into a positive rests solely on how you handle the situation. You will have choices and times will come where mistakes will occur ~ Progress Not Perfection.

Being Hectic With The Thrill

thrillIt happens every time anyone goes to an amusement park. The one park that sticks out to me is Disneyworld just because I was there on a recent family vacation. You know what I’m talking about – the crazy rides, the masses of people, the running to and fro. Vacation is supposed to be a relaxing time yet when you get into a park of any sort, at times, one can get caught up with the hustling and bustling – I know I’ve been there done that. While being on vacation a couple of things stuck out to me so much so that I think it does apply to the DBA life or any data professional for that matter. Below is a representation of what thoughts flowed through my head.

The Hectic

Have you ever noticed when you are in an amusement park people are rushing around as fast as they can to get to the next ride before the other person? While on vacation I was enamored to watch the bustling and running of people almost to the point of it being comical. I would watch the dad’s pushing the double wide strollers around basically at a run with the two kids in the stroller and one on his shoulders as they rushed to the next ride. The families that would run as soon as the park opens to get the famous “fast pass” to secure a time frame that they would not have to wait in line for hours on end.

How does that pertain to the DBA life? Easily enough the DBA life can at times be very hectic with several things going on all around them. It is just not one thing we focus on but a multitude of things that more times than not seem to go awry all at once. How do you react when those situations arise?

The Thrill

A long with the hectic aspect comes the thrill. You get to the that ride you’ve been waiting to ride and you’re next. You get on the ride and off you go down an 80 ft. drop or into that dark tunnel you never think  you’ll come out of. The unknown aspects and the thrill of the ride keeps you coming back for more.

As I am a SQL DBA, I think that same thought process can be applied. The thrill of solving that problem that has been unknown, working with other teams to find common ground to push forward on a project, getting that new index in place that takes a process running 45 minutes down to 10 seconds. It’s the thrill of the game that keeps you coming back for more.

The End Game

Have you taken inventory lately? When you get to work are you excited about your work? Do you always have that continuous desire to improve yourself as a data professional? Is that thrill still there like when you solved your first issue and you said, “I think I can do this!” If not recapture that fire you once had – enjoy what you do. There are a lot of people that would love to have the opportunities that we as data professionals have. Enjoy the time you have with it!