Wednesday, January 25, 2012

Nothing Changes If You Don't Volunteer


Hello Dear Reader, last time on Day's of Our Lives there was an election, some people resigned, and other's were appointed.  Let's join this already in progress.  So it appears that the 2011 PASS Board Elections did not go quite as smooth and un-controversial as this old friendly neighborhood DBA would have liked.

"So Balls," you say, "What's going on?"

Good Question Dear Reader, I'm glad you asked.  Brent Ozar(@BrentO | Blog) has already done a good job of cataloguing not only his comments but just about everyone else's so far, read here PASS Board Brouhaha BS Bulletin.  Now this election season I tossed my hat in the ring to participate in the NomCom, I'm on the NomCom What's a NomCom, so I feel a little more personally vested this time around.


Going into the job I had read about the previous year's controversy.  I wanted to know what I was getting into, I also wanted to make sure that the Community first and foremost got a fair shake.  I've had the opportunity to do some very cool things this past year.  And hopefully I'll get some more chances to do even more.  But I'm not so inundated into the PASS nomenklatura that I consider myself an insider.  Most the time I feel like Tim Drake that just tricked Batman into letting me into the Bat Cave.

Two Years Ago if you had asked me who ran the PASS board, that was responsible for the PASS Summit, I would have told you that it was in some Super Secret fort up in Redmond where Paul Randal, Andy Warren, Steve Jones, Brent Ozar, and Kimberly Tripp sat around with secret decoder rings solving the world's problems with the help of Microsoft's finest. 

So when I submitted to be on the NomCom I did not expect to get on.  People were supposed to submit, and then there would be an election to fill the 3 Community slots to give the Community-at-Large the majority seats on the Committie.  Instead of that, only 3 people submitted and we were appointed to the slots.

I want that to sink in for a moment, ONLY 3 PEOPLE SUBMITTED.  Not in a bad way, but in a OMG I COULD HAVE DONE THIS, kind of way.  If you had any opinion on this election, you could have participated.  Seriously.  The time commitments were there, but they were not nearly what I was expecting.

Very early in the NomCom process Thomas Larock (@SQLRockStar | Blog) said something that stuck with me the entire time.  "We are not here to eliminate anyone.  Our job is to put forward the best slate of candidates for the community to decide upon."  I knew we were there to trim the slate if needed.  I wasn't sure how this would be achieved yet, but I never forgot that.  We were not there to decide but to make sure that the community could decide. 

When it came to the candidates we were told that at most we could present a slate of 12.  6 applied.  Once again I would like that to sink in.  ONLY 6 APPLIED.  There was no secondary International Candidates to choose from, there was no one eliminated.  As a matter of fact we could have accepted more candidates if anyone had applied.

At that point our job consisted of vetting the candidates to see that each would be able to fulfill the duties of a PASS Board Member, and to rank them and present them to the Board.  The Board approved the slate and our job was done.


Just to clear a couple things up, I like Brent.  I think he's swell.  As do I Tom Larock, Sri Sridharan, Kendal Van Dyke, Geoff Hiten, Bill Graziano, and I would probably like JRJ even though I haven't' met him.

Brent reminds me of  one part Stephen Colbert another part Intrepid reporter.  He would probably win an election in a LANDSLIDE, (in South Carolina), but his schtick isn't something that lends itself to stuffy board rooms.  

I could be wrong, I'd love to see Brent on the Board.  But let's face it, the man knows what he wants to do in the SQL world.  Sitting on the PASS Board isn't one of those things, or Brent would already be on it.  But just like Stephen Colbert we need to know when we look like @$$holes, and he is the guy that is willing to call us on it. 

I feel for Sri.  Sri I think that you campaigned just as hard as, and harder than most people out there.  The effort you put into your campaign really impressed me.  You have done a lot of amazing things down in the great Republic of Texas, and SQL Rally is going to be an amazing event.  I hope you do not lose heart in the community. 

In the days before personal computers when we just had telephones to talk over I remember my Dad once telling me that people were a lot braver over the Phone than they were in person.  When I asked what he meant by that he told me that, "People would say things over the phone that in person would get them punched, and if they were brave they wouldn't bother with the phone call." 

I think that as adults we have to recognize that Sometimes we have arguments,  Sometimes we shout when we should listen, Sometimes we say things that we regret, and Sometimes we wish that no one was around to see the whole sordid mess.  Sometimes you let these things pass because nobody wins, if you just keep tossing mud.  I know I'm guilty of that, and I would bet I'm not alone.

We had 6 fabulous candidates.  3 won.  1 was appointed.  Everybody said if any of these 6 get elected we are all winners.  Well congratulations, we got 4 out of 6.  Not bad.  Not bad at all.


Sure I think that JRJ would have made a great 7th candidate, sure I wish that as part of the NomCom we would have had a chance to examine him as we did the other candidates.  But I know from what I'm reading he is like so many others in the SQL Community.  Great.  Passionate.  Dedicated.

So next year I'll volunteer.  And if I ever feel I'm up for serving on the PASS Board I'll run.  In the meantime I'll work with my local chapter.  I'll help with the next SQL Saturday Orlando.  I'll speak at any event and User Group that will have me.

But more importantly you should too Dear Reader!  Because the only thing that we the SQL community love more than a little Brouhaha is Volunteers. And you will be welcomed with open arms. And who knows maybe next year I'll read about you on the NomCom, or vote for you when your running for the PASS Board.  A journey of 1,000 miles begins with just one step.

Thanks Again,


Tuesday, December 6, 2011

You Should Never Use Backup Log Truncate_Only Except...
I want to start this blog out with a Warning Dear Reader.  The technique that I am going to describe to you today is how to use Truncate_Only to NUKE your transaction log.  This is a topic that a quick search on will find you this Blog by Brent Ozar(@BrentO| Blog) and this MSDN forum conversation that has a link to a Paul Randal (@PaulRandal | Blog) Blog on why you should not use this as well.

"So Balls", you say, "Why are you blogging about something we should not use?"

Great question Dear Reader, the answer lies in the details.   With the one place that I would say this is okay to use.

So let's start off first on why this is bad, so you will understand that you should use this with caution.  Your Transaction log is an essential part of your database.  This is an understatement.   This is like saying your Brain is an important part of your body. 

You cannot operate without it.  Period.  It remembers everything that you have done in your life, Transactions that have been committed and flushed to disk for the Database.  If you get knocked out when you wake up you start piecing what you did and how you got there.  In the database work we call this Recovery.

You cannot recover your database if your transaction log is gone, the database won't start up.   Not only that if you have a very important database, you cannot loose any of the transactions that you commit, ie you need to remember everything.   If you have a pharmacy database that track prescriptions, a bank database that tracks customer deposits, or a hospital database that tracks what was given to a patient and when.   You cannot lose any of that information. 

When your database is this important it SHOULD be in Full Recovery Model and we should be backing up our transaction logs in accordance with our Service Level Agreements, SLA's,  in order to meet our Recovery Time Objective, RTO.   If you use the command I will speak about in a moment on a Fully logged database it will wipe out your Transaction Log, good bye memories.  The structure will still be there, but this will make it to where you lose your ability to recover to a point in time.


"So Balls", you say, "What's a Checkpoint and what in the SQL Internals does it have to do with my database?"

Great question Dear Reader, man you are on top of your game today!  A checkpoint is a process that flushes Dirty pages from the buffer pool to the disk.   Sticking with the biology terms it takes what your eyes are seeing and flushes it to your brain to make, commit, the memory.

In SQL 2000 there was a known issue where occasionally the checkpoint process would go to sleep.  So why is this a bad thing?  Well your transaction log tracks the transactions that are flushed to disk, and when checkpoint went to sleep the transaction log would continue to grow and fill.

In a situation like this what should you do?  Simple open up Query Analyzer or SSMS and simple go to the database in question and type "Checkpoint".  That simple.  Checkpoint the database, execute a DBCC SQLPERF(LOGSPACE) and examine the free space for your database log to see that you now have plenty of room.


So when should you use the unspeakable command that I'm speaking of? 

You get a call for a server, it just so happens to be a SQL 2000 server on SP 4 (awe hotfix or security patch that takes you up to build (8.0.2055 i've seen it in both).  You've gotten reports that the TempDB has run out of log space.

You log in when you type:
USE tempdb

You get an error stating that a Checkpoint could not be committed because the transaction log was full.  At this point you have queries that are failing because tempDB is used, ALOT.  In order by, sort, and group by queries.  By Queries that need temp tables, variable tables, and work space tables.

Your only option at this point would be to restart your instance.  Why restart your instance because TempDB is destroyed and Re-Created each time your instance is restarted.

So before you do that, what can you do?  You can execute the following command.  Again only on a database where you do not care AT ALL about the transactional consistency of the database log.  Also you want your database to be in Simple Recovery Model by default.  And you are on a critical SYSTEM DATABASE that is destroyed and recreated on each restart.  Before you take an outage of your system try this.
Backup Log Tempdb with truncate_only

This command was depriceated in SQL 2005 and is not there in SQL 2008.  There is a work around, but I'm not posting the work around for SQL 2008.  Why because in my humble opinion Dear Reader you would only want to do this when the checkpoint has gone to sleep in the tempdb.  While I have see this A LOT in 2000.  I have yet to see it in 2008 and above.

So once again, be cautious and my recommendation is to only ever use this as a last ditch method of freeing up TempDB space as a means to avoid a reboot.



Sunday, November 27, 2011

What Opportunity Are You Looking For?

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. 


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.


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.


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.

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.


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.