24 Hours of FREE SQL Server Training

On May 19th there will be 24 live back-to-back presentations including ones highlighting new features provided in SQL Server 2008 R2 and more.  I attended parts of the 24 hours of PASS last year and was blown away by the content.  If you work with SQL Server I highly recommend you attend.   You can register online now at http://www.sqlpass.org/24hours/2010/

The following speakers are lined up for this great event.  Adam Machanic, Andy Leonard, Brad McGehee, Brent Ozar, Brian Knight, Chuck Heinzelman, Dean Richards, Don Kiely, Don Vilen, Donald Farmer, Glenn Berry, Greg Low, Jacob Sebastian, Jessica Moss, Kevin Cox, Kevin Kline, Louis Davidson, Maciej Pilecki, Peter Myers, Peter Ward, Rushabh Mehta, Sean McCown, Simon Sabin, Thomas Grosher

Watching Paint Dry
Watching Paint Dry

“But John I have to do xyz watch the paint dry on May 19th and the 20th.”

That’s fine, it looks like these sessions will be recored and made available through PASS within two months.  If you access the event this way you can watch 24hrs of PASS and the paint at the same time 🙂

A good friend of mine Thomas LaRock(blog | twitter) is organizing this bad boy.  For more information check out his post or the 24 hrs of PASS site.  I know it will be a big hit!

DBA Survivor, Becoming a Rock Star DBA

In today’s world many companies want and need their employees to do more with less resources.  You might find yourself in a position where you start to manage databases while doing many other tasks.  Thomas LaRock’s book may  save you countless hours.  If you are starting and your goal is to be a Rock Star DBA this book might be one of the best investment you can make to have a successful career as a Database Administrator.

During the first week of January I moved from .NET Developer and part-time accidental DBA to full time DBA and PeopleSoft Engineer.  While this book just came off the shelves I still found it very interesting six months after I landed the job as a Database Administrator.  I agree with Brent Ozar, this book is tailor made for someone moving into a DBA role.  I also still think that it has useful information for someone like myself, someone who wants to understand what a Database Administrator does, or someone who has thoughts of becoming a DBA.

Favorite Quote

Tom does a great job giving you great information but he also throws in entertaining stories and great quotes.  While many readers will like the “shards of broken glass comment” quote my favorite is what you (the DBA) have in common with the President.  I would paste the quote below but that would ruined the fun.  I will tell you this, it’s hilarious but also at the same time very true.

Checklist

Checklists are very important to help automate processes and to make your life easier.  Heck sometimes they are as important as life and death.  For example, when a pilot is about to fly a single engine jet plane they have a checklist to complete before they go in the air.  Tom’s checklist for your first 100 days on the job is essential to make sure you have safe travels and are out of harms way once you get in the air with your DBA career.

No One Knows Everything

If you have not learned this lesson yet I highly recommend you do it now before its too late.  Tom explains why it’s just not possible to know everything.  He also provides some examples on how you can find the answers to what you don’t know.

Connect, Share, Learn

Within my five year career in IT I have had the pleasure to work at a major consulting firm, a dot com, and a global law firm.  What is the constant with these three environments?   There are a lot of the people in IT who prefer to stay in their cubical and communicate the least amount as possible. Tom explains not only why you want to break this trend but also includes some benefits.

Where is the Buffet?

Surprisingly this was the most important chapter for me. The goal of this book is to make sure you have a long successful career as a DBA.  This is not possible if your life is cut short due to health issues.  When your profession demands that you sit in front of a computer screen it’s easy to make some bad decisions that can put your health in jeopardy.  This was a wake up call for me. I am pushing 300 lbs and am glad to get back on the right track so I can have a long successful career as a DBA.

So there you have it.  If you are new into the DBA game or know of someone who is seriously considering becoming a DBA get this book.  You can find it at amazon.

PGH.NET Code Camp Review

This past weekend I had the pleasure of helping out David Hoerster (bio, twitter) with the setup of PGH.NET Code Camp.  Why, would I want to get up before the crack of dawn to help?  Well for starters David is a die hard Pittsburgh Pirates fan like myself.  Okay the real answer, is that I wanted to help with the code camp before I ran my first SQLSaturday in West Virginia.   This was a great practice before the game starts on May 1st.

In short I learned that if you have good volunteers it’s actually not too hard to have a great event.  If the event is free there will be people who just don’t show.  I guess mowing their lawn is more important than free training?  People will also leave before the event is over.  I could be wrong but I thought about half of the crowd left before the last session ended.  Finally, if a speaker doesn’t show you could replace the session with speakers panel.  This was a great move and actually was my favorite session of the day. 

SQL Server 2008 for Developers

During the day I also did a presentation on SQL Server 2008 for Developers.  I presented right after lunch and expected the majority of the crowed to have a food coma from the free burritos but this was not the case.  It actually was a nice interactive session. The following are a few quick facts from the presentation. 

About 40 people attended this session and only five of them are currently using SQL 2008.  I know this is a small sample size but it makes me believe that there are a lot of people out there still on SQL 2005 or SQL 2000.

The majority of the people awake (yes,  a few experience the food coma) were really impressed with using the real-time debugger to debug stored procedures, using merge to replace truncate table insert into table and use TVP to pass a data table in as an input parameter.

Follow-up Answers

The following are answers to some questions that were asked after the session.  Thought I would answer them here so others could find them in the future.

Can I create an index to filter based on dates?

Yes, you can.  I believe this is a new feature added in SQL Server 2008.  The following script will execute.

CREATE NONCLUSTERED INDEX FIBillOfMaterialsByStartDate
    ON Production.BillOfMaterials (ComponentID, StartDate, EndDate)
WHERE StartDate > '20000801' AND StartDate < '20010801';
GO

Checkout this MSDN link for more on Filtering Indexes. 

How can I make my database run faster? 

This is always a fun question and a hard one to answer without looking at the database and the server it resides on.   I recommended that this individual start with the free performance boosts.  This is also known as managing your indexes.   To do this checkout the following great links with video from SQLServerPedia.

Can I find the last time database objects were modified?

Yes, check out this link for a script that does the following task

Book Review: “Confessions of a Public Speaker”

This year I made a goal to read six new books and to share my experience with everyone via book reviews.  This is the first review of the year and I am excited to give feedback on a book I really enjoyed.  Normally self help books put me to sleep but this was an exception as it was informative and entertaining to read.  If you plan to do public speaking in the near future I highly recommend this book.

My motivation for reading “Confessions of a Public Speaker” by Scott Berkun is simple.  I find myself doing more presentations and I want to improve my craft.  This year I will be speaking at PGH.NET Code Camp in April and also at SQL Saturday #36 in Wheeling, WV. Public speaking is not easy for me.  I completely agree with Adam Machanic’s blog post.  It takes a lot of practice and some reading to see how others succeed. Therefore, I want to take any advantage I can to make my presentations better.   The lessons I learned in the first chapter alone made this book worth the $17 on Amazon.

The following are some very important lessons learned.  Most people at your presentation hope you do well but also hope your presentation ends soon.  It’s funny, after I read this I started laughing because it’s so true. I also learned to know your material but know you shouldn’t be perfect.  Normally, I try to be a perfectionist so this is something I had to know.  I cannot go back in time and correct my mistakes. Ummm… maybe I can I will have to add this to my todo list.   Finally, I learned it’s the mistakes you make before you present that matter the most.  I will dive into this with my confession below.

Being that the title of the book is “Confessions of a Public Speaker” it’s only fair to include a confession of my own.  With experience I learned that I must take control of what I can control.    Three years ago I did my first presentation at the Pittsburgh Code Camp and did a presentation on extending the Reporting Service API’s.  While no one booed or threw fruit at me the presentation was a hot mess.  I was modifying slides in the speakers room, I didn’t do a practice run of the demos, heck I didn’t go through the audience’s point of view when I built the presentation.  If I would have taken care of what I could control (my presentation) this could have been a killer presentation.  Regardless, it was a great learning opportunity which made my future presentations much better.

If you want to improve your public speaking I highly recommend Confessions of a Public Speaker. This book will stay on my bookshelf within an arms reach for quite some time.

Looking Back: Pittsburgh Pirates 2008 Trades

Now that the Winter Olympics are done I am getting myself ready for my favorite sport. My dad was born and raised just north of Pittsburgh. This means I was raised to be a Pirates, Penguins and Steelers fan growing up. Being that I love statistics and numbers its easy to see why baseball is my favorite sport. Okay I will come out of hiding and admit I am a die hard Pirates fan.

Spring training is now underway and I am looking back at the previous trades made during the 2008 season.  Were the trades in 2008 just salary dumps? Did these trades really supplement the minor league system? Will the MLB players have to compete for their jobs going forward? Was anyone going to step up and seize an opportunity to play some MLB baseball in Pittsburgh? 

July 26th 2008

Pirates get right-handed starting pitchers Jeff Karstens, Daniel Mc-Cutchen and Ross Ohlendorf and outfielder Jose Tabata
New York Yankees get outfielder Xavier Nady and left-handed relief pitcher Damaso Marte.

press release

In my opinion, I believe the Nady trade is a perfect example of trading players at their peek value.  Looking back at this deal two year later it is clear that the tide has changed.  In fact I will go on record and say this might be the best trade the Pirates made since their April Fool’s trade in 1987 that brought over Andy Van Slyke and Mike LaValliere for Tony Pena.

Damaso Marte had an ERA of 9.45 in 2009 and Xavier Nady suffered a right-elbow injury and only played in nine games in 2009.   

Both Ross and Jeff are strong MLB pitchers that will contribute for quite a few years to come.  I know you think I am biased but I am not alone.  ESPN SI.com also thinks Ross Ohlendorf is worth watching.  Ross Ohlendorf lead the pitching staff in wins and ERA (11W 10L 3.92 ERA).  Jeff Karstens proved to be a good spot starter and an asset in the bullpen.  Jeff finished the year with good numbers for a long inning reliever (4W 6L 5.42 ERA).   Daniel McCutchen (1W 2L 4.21 ERA) was a late season call up and showed promise.  He will be a strong competitor for the fifth spot on the starting rotation during training camp.  According to Sports Illustrated Jose Tabata is a  five-tool outfielder who may have been the best overall athlete in the Yankees’ system.  While I personally believe this rating is a little high Jose was promoted to AAA last year.  If all goes well he could be an important mid-season call up in 2010.

To recap, the Pirates may have four starters in 2010 while the Yankees could be done with both Nady and Marte.  If the Pirates didn’t make this move I believe both Nady and Marte would have moved on.

July 31st 2008

Pirates get third baseman Andy LaRoche and right-handed pitcher Avery (Bryan) Morris right-handed pitcher Craig Hansen and outfielder Brandon Moss

Boston Red Soxs get outfielder Jason Bay

press release

I know most Pirates fans were in love with Jason Bay. I will admit I was one of them.  My only comment is if the Red Sox’s couldn’t keep Jason Bay how could the Pirates? There is no way one could spin this trade to make the Pirates look good.  That’s not my objective.  The Pirates traded the fan favorite and the teams best player minutes milliseconds before the trade deadline.  While there are still players on the major league roster from this trade its clear that none of them are going to put up numbers like Jason Bay did in Pittsburgh.

Jason Bay has continued to perform as he did in Pittsburgh.  According to ESPN Jason Bay signed a Free Agent contract for five years that could net 80 Million. I wish Jason Bay good luck in New York except when the Mets play the Pirates.

Cutover 30+ GB databases in 60 seconds with SQL Server 2005/2008

You kid brother just messed up a database migration.  You now have sixty seconds to migrate a 30 GB database or you kid brother is…

Okay I gave it a shot 🙂

If you are familiar with moving databases across servers most likely you are using one of the following methods.  Today I am going to write about what goes on during these methods with a focus on speed and provide another option that might work for you.

  • Detach/Attach
  • Copy Database Wizard
  • Backup/Restore
  • 3rd Party Tools

Detach/Attach

The detach/attach method allows you to detach and reattach databases. Therefore, in order to move a database from one server to another you have to detach the database, physically move the data and log files to the new server and then attach the database.  An unforeseen bottleneck with this strategy might be network latency. While this method is very straight forward and simple how long can the database be offline while you are moving the database files (mdf, ndf, ldf) during the detach/attach process?

Copy Database Wizard

The copy database wizard is a tool that leverages SQL Server Integration Services (SSIS) to copy a database from one server to another.  The account that the package uses at runtime has to have sysadmin role on both the source and destination instances.  You have two options during the copy process.  The first method is detach/attach see the paragraph above for feedback on using detach/attach.  The second method includes using SMO to script database objects.  This method keeps the source database online during the copy but is much slower than the detach/attach.  Therefore, I have no feedback on this method.  Have you used it? If so please add your comments.

Backup/Restore

Assuming you are using the Full recovery mode for your database the backup restore method for moving a database involves taking a full backup and a transactional log backup where you backup the tail of the log, and leave the database in restoring state.  This will take the source database offline keep the data in sync.  With restore time being a factor you could restore the full backup and do incremental transaction logs up to the point of cutting over assuming assuming no full backups occurred on your database while you started applying transactional backups.

And the winner is…

Drum roll please……..  And the winner is Database Mirroring in High Availability Mode as it can allow you to cutover failover to migrate huge databases in less than sixty seconds.  Okay I might be cheating, it will take much more than sixty seconds to configure. The important fact is that it will seam like it only took seconds to the end users. If your application uses .NET 2.0+ framework and you configure client side redirect the end users might not experience an outage at all.

To setup database mirroring it is highly recommended to make sure the principal and mirror database engine services are using service accounts, they also need access the the ports used by SQL endpoints, and more….  Check out the MSDN site for a great guide for Database Mirroring. 

Its on like Donkey Kong!

I am glad to announce that SQLSaturday is coming to Wheeling, WV.  This will actually be the first SQLSaturday in West Virginia. The goal is simple, provide a free day of training on  Saturday, May 1st 2010 for SQL Server DBA’s and developers.  This event focuses on speakers, providing a good variety of topics, and making it all happen through the efforts of volunteers.

SQLSaturday

Below is the following list of submitted topics as of February 3rd.  If you would like to speak the call for speakers is still open until March 15th. We are firm believers in SQLSaturday’s goal to find, grow, and feature speakers that include the next generation of talent.  If you are an MVP or first time presenter we will try to fit you in.

SQLSat36Image

Registration is now open so you can sign-up to attend SQLSaturday #36.  This event will include a free lunch, door prizes and a post training party.  Did we mention that its free?  Below is photo of West Virginia Northern Community College the venue for our event.

wvncc

We look forward to seeing you in May.  In the meantime you can follow our SQLSaturday blog posts here.

Goals for 2010!

Yes, I know it is already 2010.  I am a little behind but still wanted to officially write down some goals for the new year.   Actually I should get partial credit as I started on the whiteboard in December.  Anyways, this will help hold me accountable for my goals, give me something to review quarterly through the year and also keep my friends on the internet aware of what I am trying to accomplish this year.

goals

  • Be a better Husband

    I have to admit there has been several times in my life where I put work, groups and other things ahead of family time.  My most important goal for the year is to change this.  I plan to have at least one night per week where I put the computer down and spend time with the family.  I also plan to make this the year I take Nina to Spain.  Yes, those who know me well know I didn’t complete Spanish a couple times in high school.  Hopefully, we will be able to learn the language of the land together in the next few months.

  • Make an impact to improve my community

    I am a young (28 year old)  Database Administrator, Programmer, Information Technology Professional who lives in Wheeling, WV (50 miles down this Ohio River from Pittsburgh, PA). This year I will serve my local community by becoming the President of the Greater Wheeling Chapter of the Association of  Information Technology Professionals and the Region 18 Vice President.  Our biggest initiative of the year will be implementing the first SQLSaturday in West Virginia.  We will provide free conference event that will bring Information Technology professionals to Wheeling to obtain free training on SQL Server,  .NET and professional development.  I am also highly involved with OVConnect the Ohio Valley’s Young Professionals group.  Through this group we will provided several events that connect young minded people together.

  • Continue to improve my communication skills

    I admit it I am guilty as charged.  While I read several blogs and technical books I don’t dive into non-technical books often.  This year I plan to read six non-technical books during the year and write reviews of them on this blog.

    Speaking of blogging if you are following this blog you know my blogging last year was not consistent.  Therefore, I am going to try to make sure I have at least one new post every two weeks.  I will also try to blog about different things going on locally, personally and with technology.

    Finally, I also plan to do more technical presentations this year.  I hope to do four presentations.  You will be able to catch me presenting at Pittsburgh .NET Code Camp and SQLSaturday in Wheeling.

  • Continue the certification path for MCITP SQL Server 2005

    In 2009 I completed the 70-431 exam which makes me a Microsoft Certified Technology Specialist on SQL Server 2005.  This year I plan to take the next step and become a Microsoft Certified Technology Professional in SQL Server 2005.  You might be  wondering why would I or you want to do this?  There are a few reasons I will share.  First, a great friend of mine once told me its a great way to polish your skills.  Second, I believe that the certification process forces you to learn topics you wouldn’t learn unless you complete the process.  Third, the objectives of the exams line up with some project goals at work so I can kill two birds with one stone.

  • Improve my networking and social networking

  • In 2009 I  dove into social networking via blogging, twitter (johnsterrett) LinkedIn, and Facebook.  While I have lots of great connections through these networking portals its hard to keep track.  Therefore, I have a simple networking goal for 2010.  I want to build lasting relationships with 7 to 10 new individuals.

    Attend PASS 2010 Member Summit

    This goal is actually very straight forward.  In fact, I am actually cheating.  I just signed up for the conference and look forward to meeting other DBA’s and SQL Developers at this event.  If you work with SQL Server I highly recommend you do the same.

Use UGSS and GITCA to support your User Groups

If you are supporting/running a user group or  interested in becoming a technical presenter this blog post will help you. I am starting to help with the Pittsburgh SQL Server User Group and I wanted to share some knowledge learned from working with the Greater Wheeling Chapter of the Association for Information Technology Professionals. If your user group is based on technology (AITP, INETA, PASS) etc. I highly recommend you look into leveraging the resources provided by UGSS and Culminis GITCA.

Today I received an email reminder to sign up for the Q2 UGSS User Group Kit and this motivated me to write this blog post for leaders and presenters who are not familiar with UGSS or GITCA.  At the end of the day you need to offer something of value (knowledge, training, networking, swag)  for people to attend your events. I want to commend both UGSS and GITCA as they provide support to increase the value of your user group meetings.

Global IT Community Association (GITCA)

For starters Culminis is now GITCA.  Global IT Community Association (GITCA) represents over 700 member organizations and over 3.7 million IT professionals.   GITCA is the world’s largest international not-for-profit independent organization powered by dedicated volunteers devoted to the development and growth of the IT community by providing services to support leaders and connect user groups, associations, and student IT organizations.

The following is a list of benefits for user groups:

  • SharePoint hosting for user group
  • LiveMeeting account online meetings
  • Event Support
  • Community Development
  • Access to User Group Support Services (UGSS)  more on this below.

To apply check out the requirements and sign up if you qualify.

User Group Support Services (UGSS)

User Group Support Services (UGSS) is dedicated and committed to serving technical community members and leaders worldwide.  UGSS provides resources that will ignite your efforts as leaders and invigorate your experience as members.

The following is a list of benefits for Community Leaders:

  • Get speakers for your events – if you are interested in presenting sign up here. Groups will find you and ask you to present.
  • Get funding for your events – yes, they will help sponsor your events.
  • Get publicity for your events
  • Get more publicity for your events
  • Get swag (content, demos, samples and more) –  the photo below shows some items I received during the last kit.

16348_754336456627_9635606_42370080_7481877_s

If you are the leader of a user group, a presenter, or someone who would like to sponsor events apply here. If you have any questions feel free to shoot me an email at jsterrett at gmail dot com and I will do my best to point you in the right direction.

Disk usage monitoring with Data Collector

Today, I am jumping into Adam Machanic T-SQL Tuesday challenge with the following post.

Recently, I created a build request to have a new server to move SQL Server databases.  I put together an estimate for the space needed for data, logs and backups and included this information in the build document.  This request was put in the queue and all was well.  Once this request popped to the top of the queue I reviewed the size of database files using Idera’s Space Analyzer and noticed unexpected data growth in a few of the data files.  Thankfully, the data collector and Management Data Warehouse (MDW) was enabled which helped us track the unexpected data growth.

Introduction

SQL Server 2008 introduces the data collector and the management data warehouse (MDW) into SQL Server Management Studio (SSMS). The Management Data Warehouse exists by leveraging the data collector and a MDW database and custom reports. This allows administrators and developers the opportunity to do some proactive monitoring. If you are familiar with the Performance Dashboard then you will be impressed with the new Management Data Warehouse.

How does the data collector help you?

Out of the box, the data collector provides you with the tools to monitor disk usage, server activity and query statistics.  Therefore, when you are asked the following questions.  How much space do we need for database xyz? Why did database xyz grow from size 123 to size 456? you can use the data collector report to help answer these questions.  For example, below is a screen shot of some sample databases.

image

You can see that the third, forth and fifth databases had their current size changed.  I want to focus on this fact because it doesn’t represent the data inside the database files.  This means the actual data files (mdf, ndf, ldf) are growing which can cause disk fragmentation. You want to avoid this when possible.  Ideally, you want your database graph to be a straight line like the sixth database.  Next we will click on the graph for the fourth database and drill deeper to the analysis.

image

image

Looking at the two image above you can see that the data size multiplied during a six hour between noon and 6pm on November 30th.  We were then able to use this information to determine the cause for the unexpected growth of data.

Conclusion

I think this is a great tool to troubleshoot unexpected data growth.  I look forward to using this tool as part of the process to estimate future database growth.