Sunday, November 27, 2011

What Opportunity Are You Looking For?



http://www.flickr.com/photos/mencho-22/6218974134/

A lot has been happening this year.  I decided to throw my hat in the ring at being a blogger and a presenter on SQL topics a little over a year ago.  What started out as a nudge into getting out into the community resulted in a full fledged dive into the deep end.  This has been a year that professionally, I don't know that I could ever duplicate.  Before this year I'd never been to a PASS Summit.  I'd never spoken at a conference, never been invited to submit to a conference, heck I'd never attended a SQL Server User Group (and I had to look up the acronym SSUG).  And it all gets back to one word.

"So Balls", you say, "What word is that?"

The word Dear Reader is Opportunity.  This is a word that has been weighing very heavily on me lately.  You see this word, like all words, can be taken many different ways. 


THE EASY OPPORTUNITY

http://www.flickr.com/photos/wallyg/169975724/

These are the kind of opportunities that just fall into your lap, and are a windfall.  You fly into Chicago and one of your buddies just happens to have an extra Cub's ticket for the game that night.  You check into your coach flight and get automatically upgraded to first class.  Your walking by a ride at Disney and someone who is leaving says "Hey would you and your kid's like our fast passes".

There is no downside to this opportunity.  No one is put out, the timing is perfect, and everything just fits into place. 

When we lived in Virginia we took our first family vacation every and we drove down to Orlando Fl to go to Disney world.  Since we had the boys my wife and I had been dreaming with stars in our eyes about the day we would take our kids to Disney.  It was her hard work, late nights at her job being a manager for a restaurant, and a 401k loan, but we made it down there. 


While we were down there we had a day where the boys crashed early, and the park was going to be open till 4 am.  So when everybody woke up we had a late dinner and headed to the Magic Kingdom around 11 pm.  While we were standing in line for the Tea Cups a Disney Cast Member came over and offered us a "Magic" experience.  They filled out a card for us commemorating where we were and it was made out to the kids with the date on it, and gave us a pass to go to the front of the line.   The line was short, so we didn't make anyone "miss out" on the ride.  But it was a very special experience, and it helped make a great night just a little bit better.


THE LEARNING OPPORTUNITY


Okay so you F***ed up.  It happens.  It's happened to me it's happened to you.  It happens.


"Balls", you say, " WHOA! You just went from Magical Moment at Disney to You F***ed up WHOA WHOA WHOA!"

Ahh Dear Reader, but that is typically the way these things work out.  Ever done a reply all and not realized the whole company was on it? How about getting auto corrected and telling instead of telling the company VP's "Sorry for the inconvenience" that the main server is offline; you send out "Sorry for the incontinence" (incase you need to look it up it means losing control of one's bowels), yep told the senior management sorry about making you wet yourself over a server outage. I was lucky it was a Japanese company, I only heard from the American staff and they were laughing their @$$es off.  How about locking out a production domain account?  How about having your SQL Server page to your C Drive so the first time you present live in front of people your demo that should take 30 seconds takes 5 minutes and 40 seconds.

Yep these are all mistakes I've made (many more than that), and thanks to them I'm wicked paranoid about auto correct, always check to see who I'm replying to, when a demo goes wrong I've got a backup plan, and Keypass is a wonderful thing.

But that is how things go.  One second the world is going fine.  The next you discover that the chair you were sitting in is broken and you are lying on your back.  Nope I haven't done that but I did one pretty close to that.

These are the learning opportunities.  This is the school of hard knox.  Where you learn that you stretch to keep from pulling a muscle, that you hydrate so you can avoid a cramp, and that you will make darn sure not to repeat.  Because you did it once, you got the T-Shirt, and you don't want to ride that ride again.

THE HARD WORK OPPORTUNITY

http://www.flickr.com/photos/friarsbalsam/4609212148/


We know these as well.  This is the opportunity that nobody handed to you.  That you earned with blood, sweat, and not a little determination.  A couple jobs ago in a land far far away, Virginia, I was working at a job.  I enjoyed it I was working hard, and I really liked the people I was working for and with.  I was busting my hump trying to make myself one of the Key people, one of the linchpins, and I felt I was deserving of a promotion and a raise. 

In one year's time I had gotten some certifications, worked on many different efforts, volunteered for more, and had taken the time to mentor some of the Jr guys on the team.  I was working on Programming stuff, Database stuff, Server Engineer Stuff, Training Stuff, needless to say I was doing a lot of stuff.

The time came for my review and it was the typical company review.  There were some sections that didn't pertain to me or my job, that were normally rated middle of the road so as not to sink my score but ground it from getting to high.   This year I felt in all the extra work that I'd done I'd  found some ways to actually rate pretty high on that stuff, and I needed to because I wasn't yet a Sr guy and I wanted to be one. 
 
The review process consisted of us writing our initial review.  Our managers reviewing and adjusting it, and then meeting with us to come to a consensus on a final review that would get accepted and sent off to HR.  I wrote the heck out of my review.  It was stacked full of arguments of why I should be a Sr guy and why I deserved a big raise, and I was ready to go into my review and argue it out and come out on top.

Funny thing happened on the way to the forum, my managers agreed with me.  I was working for a company that really valued me and what I was doing.   I grinned ear to ear, and jumped up and clicked my heels when no one was looking.  But hard work had gotten me there, and I just needed to ask for the Opportunity to be recognized.


THE MISSED OPPORTUNITY


http://www.flickr.com/photos/56654886@N00/508734856/
Simply put these are the things that you miss.  Either by accident or on purpose.  This could be missing meeting up with friends because your phone died.  Passing on presenting at an event so you can attend a family gathering.  These are the things that we miss out on in this game of life.  Forget to follow up with a business contact, go back three spaces.

You only go around on this rock once.  Whatever awaits us after this, you only get once chance.  The missed opportunities could be passing on a job opportunity.  Or they could be the time you spend away from your family while you attend a conference.

When the baby has a nightmare, or there is thunder outside she clings to me.  99.99% of the time she wants Mom.   But when she is scared she wants Dad.  It's a little thing I know.  But it makes me happy to be there for her.  I'm not a jerk I'm not happy that she is scared, but knowing that this little person loves and trusts me so much that just by being beside her she believes I can make thunder and lightning go away is earth shatteringly awesome.  Being a Dad means that you are more powerful that lightning, able to scare away a monster in a closet just by being awake, and able to bring comfort just by being there.  My kids will not be little forever and the baby won't be a baby much longer.

Some missed opportunities are going to a movie.  Some are much bigger than that. 

Sometimes we work late, sometimes we have conference calls during dinner, sometimes we have trouble calls that keep us away nights and weekends, training that makes us travel.  It is part of the job we take on as IT professionals.  We need to do work when it will not affect other people.  Sometimes that means you are working Saturday morning 12 am to 4 am, sometimes it's Saturday morning 7 am to 12 noon.  Other days its Thursday from 10 pm to 4 am Friday.  It happens to me, it happens to you, it happens to all of us

The most important thing about missed opportunities is that it gives us a chance to have a better understanding of what is important.  Because when we realize that these things are important we can do a better job of minimizing what we miss.


WHAT OPPORTUNITY ARE YOU LOOKING FOR
http://www.flickr.com/photos/gavinweaver/4016179739/

Your Mission should you choose to accept it Dear Reader, is to figure out what the Opportunity you are looking for is.  It could be one born out of Hard Work.  It could be that as the day goes along you will have a Learning Opportunity, hopefully it will just be an Easy Opportunity.   And if it is a Missed Opportunity then I hope you learn a little about what was most important, and I hope you made the right choice.

Whatever it is, whether you know it or not you are looking for an opportunity right now.  So Good luck and I'll see you next time.

Thanks,

Brad

Tuesday, November 1, 2011

Presenting on SQL Internals, Recovery Models, & Backups! OH MY Today


 Today I’m presenting “SQL Internals, Recovery Model’s, and Backups. OH MY!”, for Pragmatic Works.  I did this presentation once before for SQL Saturday 79 and it was a big hit.  I had a lot of great feedback from the people in the audience that day, and my friend Kendal Van Dyke (@SQLDBA | Blog) attended and gave me some great notes and tips. 

My goal is not to make you an expert, but to give you a good base knowledge so you can continue to learn on the subject.  There is a lot to cover and we will scratch the surface of a lot of topics.

“So Balls”, you say, “Why should I come listen to you talk about Internals if I’m not going to become an expert?”

Great question Dear Reader, let’s dive right in!

WHY LEARN ABOUT INTERNALS?

I’m not a mechanic, but if I was I would expect that I could look at that picture to the right and tell you what I see.  And I’m not talking, it’s a car and an engine, but what are the components.  What is that pink thing?   What about the blue thing?  I look at that picture and I know the basics and that’s about it.

I am a DBA, and if someone shows me a SQL Instance, a Database, or asks me to perform a task then I should be able to tell them a thing or two about it.  The more you learn about internals the more you know about what you use every day.

As I’ve continued to learn about SQL I’ve noticed some common terms, some information that formed a common baseline.  I want to pass that information on to you because l want to make it easier on you.  I want you to go out and learn, and this information will help you.

You need to understand how a Transaction Log works, that SQL has internal components, what the data hierarchy is, what Recovery Model’s are, how they affect the backups you will take, and how that will affect Service Level Agreements you have with your user. 

From ACID to Transaction Isolation Level’s we are going to make a run at it.  I’ll upload the deck and the Demo’s when the presentation is over.  Click HERE to go to my Resource Page and get a copy of the presentation and the Scripts. 

Click HERE to sign up and join me today!  I hope to see you at 11 am.

Thanks,

Brad


Monday, October 31, 2011

Tales from the Query Processor

http://www.flickr.com/photos/socal_jim/2070088596/
Hello Dear Reader!  I've been a bit behind on the blogging but wanted to give you a bit of a treat.  Today is Halloween in the USA.  This is probably my favorite Holiday.  The family and I always love the fall, and this is one of the few holiday's where it is always fun.

You dress up in Costumes, you trick or treat, give away candy, and we even have one member of the family whose Birthday is today.  A big Happy Birthday to our Daughter Chesney!  She's 13 today WAHOO!!

Between the weather and the fun of the day itself, and all the horror movie marathon's, you cannot beat this time of year.  So kick back relax, binge on some chocolate goodness, and enjoy a couple of tales from the Query Processor!

Thanks to Jeremiah Peschka (@peschkaj|Blog), Kendra Little (@kendra_little | Blog), and Brent Ozar (@BrentO | Blog) for the inspiration for these stories over a very nice dinner on the Thursday night of the PASS Summit, and Mike Walsh (@mike_walsh | Blog) for the encouragement to publish it.

A BRAVE NEW WORLD



Hi my name is Session, you can call me Sess, and I hope my tale is a cautionary tale for the future.   Not to long ago I thought it was the end of it all.  We lived in a world that was old and neglected.  Our species had evolved almost as far as we could.  Well almost as far as we could.  Our homeworld was only 32 bit, and to be honest our governments had never advanced further than 2000.  

http://www.flickr.com/photos/shelly_a_canada/3846084911/
Maybe that’s why it all started to go down hill.  People just stopped caring for the environment around us.  Politicians used NOLOCK like it was going out of style.  Everybody was making promises of a better and faster tomorrow, but nobody even had the guts to upgrade the Government to 2005, let alone make the leap to 2008 or even R2.  Suggestions of anything like that would get you branded a heretic, and in some cases would have friends and family turning on one another.

“EVERYTHING IS OKAY!”, they would say, and the system would just get a little more polluted.  They stopped apply Cumulative Updates, and eventually they were even afraid of what the OS updates would do to destabilize things.   The civil unrest was getting worse.  Occasionally you would hear about SPID’s that would cause blocking and then just disappear.  Speaking out and showing what was wrong wasn’t just frowned upon if you looked closely enough you could find evidence that SPID’s were being killed.  A couple DBA’s tried to point this out, but people just looked at them like they were crazy.

That was when I started getting scared.  What if something happened and if I went to grab a resource and it wasn’t there?  What if while I was in queue I mentioned my dissatisfaction that AWE wasn’t enabled?  You’d just have to bite your tongue, stay quiet, and hope a Latch didn’t provoke you into blocking.

But it wasn’t until the political climate turned that people started really paying attention.  Everything they had ignored, the additional load they were placing on our planet all came to a head the day the Deadlocks arrived.  It didn’t matter what you were doing, if you weren’t in line first when they called you, the Deadlocks would make an example out of you.  Not only did they kill SPID’s but they would write it out to the logs.  Profilers would question them and they would gladly tell them what SPID they had killed and why.  Hell sometimes they would even draw them a Map, and show them where they were left. 

That only lead to more unrest, more distrust, and as the activity ramped up we started getting word that in some places there were spinlocks.  I heard tail that dmp files were being created.  And occasionally places got so crazy that they were just sending in the foot soldiers to wipe everything out.  It was at that point in time I knew it was time to get out.  Some of the more creative DBA’s had convinced the powers that be to invest in an effort to go to a newer set of hardware, and leave this chaos behind.  I grabbed my wife and all our little processes and made for the first Data Sets I could get us on.

As we got closer to the ships I saw they were made of something called SSIS, when we were loading I asked the Captain if this was like DTS.  He just smiled and laughed and said we were in for a treat.  For the first time in I don’t know how long I knew I could relax.  I looked back just long enough to see the world burning.  This place is heading for the end of its life cycle.  I don’t know why everyone couldn’t see it.  I will not forget the error of our ways.  We will not repeat this again, or so I tell myself.

But remember we cannot abuse this new home, we must work together, and we cannot repeat the mistakes of our past.  If we cannot code a better base then we are doomed to repeat ourselves.  So let us bring about a better world and Object Oriented world that may even use Snapshot Isolation to preserve our natural environment for as long as we can.  With all these resources, there should be no contention amongst us.

They are calling our new world Denali.  I like the sound of that.  The homeworld had 4 sockets and contains 12 cores each, and there is RAM as far as the eye can see.  We will have better data governance in this new land, and I hear everything will be 64 bit from now on.  I hope that it is all true.


Session



HELLO MY NAME IS BUFF WELCOME TO THE END OF THE WORLD

 It was a day like any other, but we didn’t know at the time that forces beyond our control were at work that would wipe us all out.  I leave this behind as a Journal.  My only hope, that it will survive longer than we did.

In the future if this is found know we did our job’s and never quit.  My name is Buff my friends and I live and die in a little place called the Buffer Pool.  We were going about our day, for the most part we are all Data Processors here, when it happened.

At first I noticed things started getting crowded.  Not Regular, man this Starbuck’s is packed, crowded.  But there’s a panic in the streets crowded.  It continued to build and build.  Crowds grew.  I started seeing new faces, but those of us with jobs to do stayed focused.

Trains to the Disk had stopped, so we just kept going.  Then it happened.  A hard checkpoint wiped more people out in seconds then I’d ever heard of.

Apparently a transaction that used DTC had gotten a status of -2.  I know this now as things are ending.  The remaining buffers have been talking.  Some were assigned to a Special Task Force.  They were armed with badges and access to any DMV they needed.  The status -2 had slowly backed things up and infected the populace.

Our leaders on High asked for information and we the grunts gave it to them.  Our reward for our bravery?  They are closing the gates behind us and we will all be wiped out in the coming reboot.  If anyone can make it to the Disk tell my Clustered Index that I love her.  Tell her that my last thoughts were of her and our little Non-Clustered Index at home.  I wish I could have watched him grow to a Covering Index.

Buff