Friday, September 23, 2011

SQL Saturday 85 Pre-Cons

We are a little over half way through the Pre Confrence Sessions for SQL Saturday 85 and I couldn't be happier.   

We are located at the Marriott in beautiful Lake Mary Florida which is just on the north end of Orlando.

Tommorrow is the big day where we will be coming to you live from the campus of Seminole State College.

The Marriott is beautiful the staff has been wonderful, and the lunch that they served was absolutely delicious.  The pictures that I'm showing were all taken by me onsite, and I'll grab a few more as this is just a beautiful location for us today.

"So Balls," you say, "How's it going?"

So as an orginizer I have spent very little time in the room with the guys today, which is bad for me, but absolutely wonderful for out attendees.  I will be trying to sneak into a room and take some notes at some point but unlike most of my blogs on events this one (unless I get some notes I can take), will be very non-technical.

So I am going to make an effort to get into each session and get some details so you know just what these experts are doing. 


Buck has a pretty packed room but I will make it in there and do some learning.  Buck is a master at this field and the feedback I've been getting from people has been incredible.  So more on this later.  

You can tell he is a Professor when he walks the room, he has a Commanding presence and a Tricksters eyes.    I liked him before I met him but seeing him in action I like Buck Woody even more.
The little bit I got to see Buck was teaching all about indexes.  Buck’s advice stay away from the hard drive as much as you can.  Sucketh Mightely is a technical term and Indexes are great for reads and Sucketh Mightely on writes.

Buck goes on to discuss Indexes and their physical B-Tree structure.  He recommends applying 3 rules to Clustered Indexes; 1. The should be Narrow, 2. They should be Unique, 3. They should be ever Increasing.  We discussed the difference between Unique Clustered Indexes, and Primary Key Clustered Indexes, and Yes there is a difference!

One of the most interesting things he said with regards to the use of Primary keys and Foreign Keys, you can have a Unique Clustered Index and a Primary Key Clustered Index that have the same constraints.  The Algebrizer will use these constraints in the same way when creating the plan to retrieve the physical data.  However, deeper in the Algebrizer process the Primary Keys and Foreign key values will assist in computations that will assist the Optimizer. 

In other words using Primary Keys & Foreign Keys can make SQL work faster for you.  You should be using them.  He waded into the Holy war that is Surrogate Key’s vs. Natural Keys.  And then he assigned the Audience some hands on in class room work, finding usage statistics and table sizes using only the Built in reports.

I’ve got more Dear Reader and an further update will be coming.  Now on to the Pragmatic Works Pre-Con.

Don't let the picture fool you these guys are such consimate proffessionals, they work hard they play hard but when the guy with the camera isn't in the room they are all business.  Once again I'm hearing some great stuff from out attendees and I'll try to get the low-down a little later.


I'll get to the wrap up a little later.  This is just the teaser for now.



Wednesday, September 21, 2011

SQL Saturday 85: Pragmatic Works ONE NIGHT ONLY

We are in the final countdown to SQL Saturday 85, and everything is starting to come together.  Yesterday we discussed the DBA Pre-Con for SQL Saturday 85.  Today we will discuss the men from Pragmatic Works and the All Day Business Intelligence Workshop.   

“So Balls,” you say, “Give me One reason that I should attend the Business Intelligence Workshop?”

I can’t give you one Dear Reader, but I can give you four.


Mike Davis (@MikeDavisSQL | Blog) is a Sr. Consultant for Pragmatic Works.  Mike has been using SSIS to help people all over the US.  Mike has spoken at countless PASS events, and will be a speaker for the upcoming PASS Summit 2011.  Have I mentioned the books that he has written?  Also don’t miss out on his SQL Smackdown vs SSIS Session at SQL Saturday 85, how do you know you’ve got a great instructor?  When they know a technology so well they can have fun in any setting and still teach you at a deep technical level.

Bradley Schacht (@BradleySchacht| Blog) is a Consultant for Pragmatic works.  I met Brad at SQL Saturday 79 down in South Florida.  Brad has presented at multiple PASS events, Code Camps, SQL Lunch, and SQL Server User groups.  If you’ve been on you may have run into him helping in the forums or you may have ran into him in SQL Server  did I mention the book that he co-wrote as well, SharePoint 2010 Business Intelligence 24-Hour Trainer. 

Kyle Walker (Blog) is a Consultant for Pragmatic Works.  Kyle has been very active in the community and is an active blogger on on  Kyle has presented for the Free Webinar Series that Pragmatic Works does, WEEKLY, as well as appearing at SQL Saturdays, and SQL Server User Groups. 

And last but certainly not least is Jorge Segarra (@SQLChicken | Blog).  Jorge is a Consultant for Pragmatic Works, that means that he doesn’t just preach BI, he uses BI.  In his spare time he’s the Dean of SQL University, which assembles the experts in our field to blog in a Semester Schedule for you to learn, did I mention that he is a Microsoft MVP for SQL Server?  Perhaps we could talk about his book, THE BOOK, on Policy-Based Management for SQL Server, or that he will be writing the SQL Bible for the newest version of SQL Server Denali.


These are some of the top guys in their field, covering the full Microsoft BI Stack from Beginning to End.  In a intimate setting were you will get a lot of one on one time, and the best part Dear Reader? 

When you have a group of instructors that know their material inside and out, and you have a setting like this you may learn some tips and tricks, because it is in the venues like this where you get to have the professionals go off script.  You learn what they learn.  You hear about their experiences in the field.

And maybe just maybe you find out some previews.  With Denali barrelling down upon us, and all of the major BI Initiatives that Microsoft will be offering up, this would be a good chance to ask some questions, and maybe see what our Professionals are running on thier laptops.

This is a day that you will not want to miss out on, Click Here to Sign Up for the BI Full Day Pre-con!  I hope to see you there, because this is going to be BAD@$$!



Tuesday, September 20, 2011

SQL Saturday 85: Buck Woody is a Wanted Man

Hello Dear Reader!  SQL Saturday 85 coming to you from beautiful sunny Orlando Florida is just around the corner.  What better way to start of a Saturday then starting it on Friday!

“But Balls,” you say, “How do you start a Friday on a Saturday?”

You start it off with not One, but TWO Amazing Pre-Conference Seminars.  Today we will be discussing our DBA Pre-Conference Session with Microsoft's Buck Woody.


Microsoft’s Buck Woody(@buckwoody | Blog) is a wanted man.  He is a highly sought after speaker, he is a highly sought after consultant, and he is an educator in the ways of Database Information Systems, specializing in SQL Server.  He was a Microsoft MVP before he decided to go home to the mother ship and work for Microsoft as a Sr. Technology Specialist.   The man teaches Database Design for the University of Washington. 

If I wanted to go on even further I could mention the hundreds of published articles he has on SQL Server, I could name drop some of the conferences he has presented at in the past, TechEd, the PASS  Summit, or SQL Cruise just to name a few.  Perhaps I could tout his work in the SQL Community, serving as the President for the Tampa Bay SQL Server Users group for FIVE years.

Perhaps I could tell you about the prestigious places he’s worked, other than Microsoft, like when he was a contractor for NASA or the US Air Force.   Perhaps we could look at the multiple books that he has written, or the multiple certifications that he has obtained across multiple database platforms.  We could talk about his antics, his quick wit, his uncanny delivery that stems from his time in radio. 

However you want to spell it Buck Woody is a wanted man.  And I can tell you where he will be Dear Reader.  I can tell you exactly where he will be on Friday September 23rd from 9 am until 5 pm.  And I can tell you what he will be doing as well.  He will be doing one of the things that he does the very best.  He will be teaching.  And you Dear Reader, if you are lucky enough to attend you will be learning.

And what will you be learning about Dear Reader?  We’ll let’s get that straight from Buck.

There are a lot of resources, products and features you can use to tune the performance of your SQL Server system. Many assume you’re familiar with 400-level concepts, others don’t consider the whole stack of the client, the network, the operating system, platform and the database server. Buck Woody, Microsoft’s real-world DBA, will explain a simple, repeatable process you can follow to tune your entire application – from the client to the server. All of the tools we’ll cover are included with Windows and SQL Server:

·         Using Windows System Monitoring Tools

·         The SQL Profiler and Server Trace

·         Database Engine Tuning Advisor

In this pre-conference session you’ll cover not only the process, but also review a real-world evaluation. You’ll take home a system and a spreadsheet you can use to monitor and tune your applications, in a simple, easy-to-understand session.

But that’s not all, he’s not just going to be teaching about the subject.  He wants to give you hands on experience with it.  Not that long ago I received this email from Buck.

“Hello – thanks for signing up for the pre-conference session on SQL Server Performance Tuning. I’ve done quite a lot of speaking and teaching, and the most informative way for us to learn together is by working through some projects during the session. If you’re able, I’d like you to bring a laptop, a copy of SQL Server 2008 (Evaluation Edition is fine, Developer Edition is best) and the AdventureWorks sample database. You can learn more about that here:

Also, feel free to bring any performance questions you have. As always, make sure you protect your company’s private information, but we’ll work through some real-world issues in class, so feel free to share what you can.

See you there!


So you will have a full day with one of the best, brightest, and most respected in our field today.  But to add icing to the cake he wants you to bring a copy of a database and your computer so you can get some hands on training.

This isn’t just telling you what you need to do, and then you leave sitting in a situation at work thinking, “Man that Buck Woody Pre-Con was great!  Now if only I could remember what he said about that DMV!?”.  This is hands on training so you can go back to work and apply what you’ve learned right away.  Did I mention that it includes coffee, tea, and Lunch? 

Here is your chance Dear Reader, go sign up and we’ll see you there!  Click Here to Sign UP!



Tuesday, September 13, 2011

T-SQL Tuesday 22 Data Presentation

Hello Dear Reader, today is T-SQL Tuesday #22.  I’ve been out of the T-SQL Tuesday game for a little while and wanted to jump back in.  This edition is being brought to us by Robert Pearl (@PearlKnows| Blog ), so Robert what is the topic this month?
Therefore, the topic of this month’s T-SQL Tuesday is, “data-presentation” Or put better, formatting data for presentation to the end-user.
We may be the developers, and techno-geeks behind the code, whether simple, advanced, spaghetti, or otherwise.  But, the data the user sees is most critical.  The query output, the report, or data presentation, must be absolutely formatted in such a way that is easily understandable and readable by the end-user.  The end-user can be the boss, supervisor, department head, the analyst, employees, or customers.  And they must be the ones we cater our queries to!
Therefore, I am inviting you all to write about “data presentation” to the user.   This can be in the form of T-SQL code, an SSRS report, etc.  What can you do to streamline data presentation?  I used a CTE, you can use one, but you don’t have to.  No hard format, just be creative, and mention the importance of data presentation.

Data Presentation It IS!


I must confess I’m a bit of a snob when it comes to code.  I will stop, reformat, and then read code if it is not formatted correctly.  But I also believe that what you do every day becomes habit.   And good coding standards are a habit that you want to get into.  This isn’t cool, this isn’t sexy, it isn’t functional (your code will work poorly formatted), and it may take a little longer to type out.

“So Balls,” you say, “Why should I do this? If it will not benefit me?”

AH Dear Reader because easier isn’t necessarily the best way to go.  This is one place where it is better to put in the extra work.  Let’s just look at a very simple example.  Let’s use some DMV’s to get an execution plan. *You would NOT want to execute this statement on a busy server.  This would pull all active requests and their XML execution plans. *

SELECT * FROM sys.dm_exec_requests der CROSS APPLY sys.dm_exec_query_plan(der.plan_handle)

All of this can fit on one line.  But should it?  When we look at this we are doing a select star, pulling back everything on the server.   When your doing a select *, in most cases, you are trying to figure out what rows you are trying to select.   When you ship to production you should be trimming the columns that you do not need.  We’ll get to that eventually but for now let’s do some formatting.

This is the way I write my code, no one way is right for everyone, so please take this with a grain of salt.  First things first, let’s add some space.

     sys.dm_exec_requests der

I like my key words on separate lines, and I like indentation of values that I want to return and table names.  Now when you read this, it is a lot easier to understand what it is that we are looking at.  So let’s go a little farther and trim down the number of columns we are looking at.  All we need is an execution plan.
     sys.dm_exec_requests der
     sys.dm_exec_query_plan(der.plan_handle) deq

This is starting to shape up.  If you execute the other query you will see that we are pulling back a lot of columns that we do not need.  That is data coming over the wire. 

So these have been simple, but let’s look at another coding example that uses a CTE.  I use this in my demo’s for Compression.  This takes a look at the index operational stats dmv and helps you determine the update and scan activity that are occurring on your tables.  This is sizeable and complex, and if you didn’t have formatting it would be nigh unreadable.

WITH IndexUsage(tableName, IndexName, [Partition], IndexID, IndexType, USAGE, Percentage)
     ( + '.' +
     ,si.type_desc AS indexType
     ,(ios.range_scan_count *100.0/
     (ios.range_scan_count +
     ios.leaf_delete_count +
     ios.leaf_insert_count +
     ios.leaf_page_merge_count +
     ios.leaf_update_count +
     ios.singleton_lookup_count)) AS percentScan
     sys.dm_db_index_operational_stats(DB_ID(),NULL,NULL,NULL) ios
     JOIN sys.objects so
     ON so.object_id=ios.object_id
     JOIN sys.indexes si
     ON si.object_id = ios.object_id AND si.index_id = ios.index_id
     JOIN sys.schemas ss
     ON so.schema_id = ss.schema_id
          ios.range_scan_count +
          ios.leaf_insert_count +
          ios.leaf_delete_count +
          ios.leaf_update_count +
          ios.leaf_page_merge_count +
     AND OBJECTPROPERTY(ios.object_id, 'IsUserTable')=1  

     ( + '.'+
     ,(ios.leaf_update_count *100/
     (ios.range_scan_count +
     ios.leaf_insert_count +
     ios.leaf_delete_count +
     ios.leaf_update_count +
     ios.leaf_page_merge_count +
     sys.dm_db_index_operational_stats(DB_ID(), NULL, NULL, NULL) ios
     JOIN sys.objects so
     ON so.object_id = ios.object_id
     JOIN sys.indexes si
     ON ios.object_id=si.OBJECT_ID AND ios.index_id=si.index_id
     JOIN sys.schemas ss
     ON so.schema_id=ss.SCHEMA_ID
          ios.range_scan_count +
          ios.leaf_insert_count +
          ios.leaf_delete_count +
          ios.leaf_update_count +
          ios.leaf_page_merge_count +
          ios.singleton_lookup_count) !=0
     AND OBJECTPROPERTY(ios.object_id, 'IsUserTable') =1
     IndexUsage iu
     ,iu.Percentage DESC

WOW, it is a lot of fun to play with, but without formatting this would be a nightmare to read through.  We’ve all had code that we had to read that gave us trouble.  Think of the next DBA that has to come along and read it, and make things a little easier on them.

Hopefully the DBA before you did the same thing!



Wednesday, September 7, 2011

24 Hours Of PASS!

Hello Dear Reader the 24 Hours of PASS are HERE!  If you have never attended a 24 Hours of PASS this is a great one to hop on board with.  This is the fall preview of all the great content and presenters that will be appearing at the PASS Summit in Seattle coming up in October.  Right out of the gate you have not one but TWO of the greatest presenters that I've ever watched.  So before you read any further Click Here to sign up, and Click Here to read more about the total outstanding line up.

Starting this very morning at 8 AM Brian Knight (@BrianKnight | Blog ) President and Founder of Pragmatic Works!  What is Brian presenting on?

Introduction to Data Mining in SQL Server Analysis Services

Presenter: Brian Knight

Session Details:
Data mining is one of the key hidden gems inside of Analysis Services but has traditionally had a steep learning curve. In this session, you’ll learn how to create a data mining model to predict who is the best customer for you and learn how to use other algorithms to spend your marketing model wisely. You’ll also see how to use Time Series analysis for budget and forecast prediction. Finally, you’ll learn how to integrate data mining into your application through SSIS or custom coding.
About the Speaker:
Brian Knight, SQL Server MVP, MCITP, MCSE, MCDBA, is the owner and founder of Pragmatic Works. He is also the co-founder of, and He runs the local SQL Server users group in Jacksonville (JSSUG). Brian is a contributing columnist at several technical magazines and does regular webcasts at He is the author of a dozen SQL Server books. Brian has spoken at conferences like PASS, SQL Connections and TechEd and many Code Camps. His blog can be found at

Amazing!  But it doesn't stop there, Up next is the Founder of the Brent Ozar PLF Brent Ozar(@BrentO | Blog) himself!  What is Brent presenting on you might ask?

SAN Basics for DBAs

Presenter: Brent Ozar

Session Details:
They keep telling you it's a SQL problem - but how can you prove where the real problem is? Learn the basics about your storage options like RAID 5, RAID 10, solid state drives, and why your biggest bottleneck might be a $5 cable. No storage experience required. This session is for production database administrators who've never looked inside the black box of storage before.

About the Speaker:
Brent Ozar is a Microsoft Certified Master of SQL Server 2008, a Microsoft SQL Server MVP, and co-founder of Brent Ozar PLF. Brent has over a decade of experience with SQL Server, systems administration, SAN administration, virtualization administration, and project management. Brent spent 2 years at Quest Software as a SQL Server expert and 2 years at Southern Wine & Spirits, a Miami-based wine & spirits distributor. Brent blogs at like it's going out of style.

And from there it keeps going for 12 solid hours.  But the fun doesn't end there this is 24 hours of PASS not 1/2 a day of PASS.   Tomorrow is another 12 hours from 8 am to 8 am.

What will the 24 Hours of PASS cost you?  A Whole lot of your Hard Earned Nothing!  It requires your time, You can even attend while at work!  All you need to do is register, you will get an email with a Live Meeting link inside.  Take the link and click on it when it is time for the Session!

This is a wonderful opportunity for Free Training!  This is a wonderful opportunity to see the value you will get from the PASS Summit!  And this is a wonderful event to see the content you can get live by attending SQL Saturday's!

SQL Saturday's you say!?  Yes I would bet you that every speaker you see today has appeared at, at least, one SQL Saturday event this year.  So if you love this go look for the SQL Saturday coming to your area and sign up.  I hope to see you there!



Monday, September 5, 2011

Who Do You Work With, Who Drives You, Who Inspires You?

It is Labor Day here in the U.S.A. where we celebrate the folks that go to work every day by taking a day off.  Trust me the irony of the holiday is not lost on me. 

I was sitting around Casa De La Balls trying to think of a holiday themed blog.  Most holiday’s we are very busy.  There are Kiddos to attend to, meals to cook, and hopefully some football to watch.  So I have yet to do a “Holiday Themed Blog”.  And to be honest this one was a tricky one at first.

“So Balls,” you say “you’ll ramble on like this for a couple of pages and call it a day?”

I hear you Dear Reader, and I’ll get to the point.  Today is all about work, and there is a saying around the place that I currently work that comes to mind.  “The People Make the Difference.”  And there is a lot of truth to it.  For those of you who are not aware I’m currently a Sr. SQL DBA for Publix Supermarkets.  I studied this company before I decided to leave Washington to join them.  And I really liked what I found, I’m not going to blog about them as a company, but we are a very good one and if you’ve never heard of them I’d encourage you to read up on us.

But today it’s all about the people!


When you go to work every day you can probably close your eyes and tell me the routine.  I park here, I walk through these doors, I put my stuff down, I check email, I go get coffee, blah blah blah.  But when you think of work there should be some people that you think of right away.  

For the past several jobs that I’ve had I can very easily think of the people that when I saw them my day got better.  They were people who would be fun to hang around, were very intelligent at what they did, or had a great personality that made it a pleasure to work with them.

When you get a good team chemistry going you cannot beat it, and you cannot do that alone.  I started out my job history in the IT field as a programmer.  I learned a lot of great things as a programmer.  How to dissect code and look for patterns, how to figure out what is being done, how to look for resources to become familiar with code you’d never written, and how to make the seemingly impossible possible.  That kind of team chemistry requires trust and confidence. 

Trust that the people around you know what they are doing.  That trust frees you to be as good as you can be in your chosen field.  If you’re always worried about Database Performance then you are going to study it, and it is a field that takes a lot of study. 

You also need Confidence.  You should be confident that your teammates can handle their jobs.  You shouldn’t have to worry about your teammates, I learned about SAN’s from a SAN Engineer that was very smart and was eager to share.  I knew I was learning from him because I was confident in his abilities.  I probably babbled on about database just as much as he did about SAN’s.  That freed me up to become the best Programmer/DBA I could be.


But I didn’t get there overnight.  I had a lot of help.  I had some really good teachers, colleagues, and friends.  I remember one very smart friend in particular, who was my boss at the time, that whenever I hit upon a problem and I didn’t know the answer I would ask him, and he would never give me a straight answer.  It was incredibly frustrating.  I remember complaining about it a time or two twenty until one day I realized what he was doing.  When I would ask a question instead of giving me the answer right away he was leading me to the next logical step.

 After a while of this I realized that he was teaching me to troubleshoot the way he did.   My questions then changed from “What does it mean when I see X” to “Where would you go to find more information on X”, and eventually the questions stopped.  I had learned what he knew.  However, like any good mentor he always had some tricks up his sleeve that would impress me from time to time. 

As a manager he taught me to be self sufficient.  When I would mentor new people I would provide them with the information that I knew they needed, but then I would help them to ask the questions so they could learn for themselves.


I had another friend who sat right next to me for a couple of years.  My good pal Smitty.  When I first looked at getting certifications I was looking and getting the full suite of .NET programmer certifications.  Smitty kept saying to me, “Balls we should become DBA’s”.  He kept pushing me to go for DBA certifications instead of programming certifications.  I owe a lot to his persistence.
At first we both got the 70-431 book together, and my goal was to do a chapter a day.  As I got into the book I realized a lot of what was in there I already did every day.  I was what you would call an, “unintentional DBA”.  It just so happened those things that made up DBA work were my favorite things to do.  While studying for the certifications I found a lot of best practices and would go to our Sr. DBA’s and say “are we doing this”.  When they said no, I would say can I do it.  We were a small shop and the DBA’s were tasked to capacity.  I already had the permissions needed and they said sure.

At a job after the previous one, at a business meeting I met our Vice President of Microsoft Operations.  We had a really nice conversation and we discussed the areas of Microsoft technologies that I was most interested in.  Not surprisingly we discussed SQL Server quite a bit.  A couple months later out of the blue I got an email from the VP forwarding an invitation to the first 24 Hours of PASS.   I signed up and loved every minute of it. 

Fast forward a couple of years and a new place of work and I had some friends, one of whom is none other than Dan Taylor (@DBABulldog | Blog),  that were constantly talking about this SQL Saturday thing.  Last year in Orlando was my first.  And the Impact that my First SQL Saturday had is reflected all over this blog.

When you look at where you are, you’ve got to look at where you’ve been.  Chances are you’ve worked with some people that helped you get there.  Even if it was just a chance email, a someone to study with, or a friend that recommended a new way to learn.  And maybe, just maybe you’ve made someone’s life better just by being you.  We’ve got a saying over at Publix that Mr. George used to say, Publix will be a little better place, or not quite as good, because of you.” 


I had a lot of little things that helped move me to where I am today.  But there was one person who is a constant influence and that is my wife.  How do you say Thank You to someone who constantly supports and encourages you? 

When I wanted to pack up the family move to a place in Virginia hundreds of miles from friends and family for a job, she let me do it.   When I wanted to move even further so I could work for the President, and she would have to give up working because my commute would be so long that I would be gone before the kids woke up and home just around dinner, she did it.   Participating in SQL Saturday’s, SQL Rally, the PASS Summit, SQL Server User Groups, when I do those things she’s pulling double duty with the kids, or taking off work, or re-arranging her schedule.  Raising a family is hard work, and I couldn’t do what I’ve done without her help and most definitely all of her hard work.

So today when we celebrate those who work in the good old U.S.A. take a look around you and think of the people that have touched your life in some way.  Say Happy Labor Day, and know that you appreciate their hard work.  Don’t forget about the hard work that those close to home put in as well, because they are the ones that make everything else possible.

Happy Labor Day Everybody (especially you my Wife)!