Skip to content


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 watchingRoss 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.

Posted in Sports.

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

Posted in SQL Server 2008, SQLServerPedia Syndication. Tagged with , , , .

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.

Posted in Events, SQLServerPedia Syndication. Tagged with .

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.

Posted in Events, Professional Development, SQLServerPedia Syndication.

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.

Posted in Professional Development, SQLServerPedia Syndication. Tagged with , , , , .

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.

Posted in SQL Server 2008, SQLServerPedia Syndication. Tagged with , .

December events to attend in Wheeling, WV

Hello everyone,  I want to share some cool events going down in Wheeling, WV in December. 

If you like wine or technology I highly recommend catching the Greater Wheeling Chapter of the Association for Information Technology Professionals meeting on December 9th.  This meeting is open to the public. We will meet on the forth floor of Wheeling Central High School at 6pm.  All attendees will have the change to share their 2009 accomplishments while we chow down a pizza dinner.  Dinner will be followed by a wine tasting at the Good Mansion Wines store. Check out the event page to signup for the 2009 December meeting.

Are you a young superstar go getter? If so, OVConnect is the group for you.  The mission is to bring young professionals in the valley together.  This months installment includes a holiday toy drive with a happy hour twist.  On December 17th at 5:00pm we will socialize and get our drink on at River City.  In order to attend all you have to do is signup and bring a toy or make a ten dollar donationAll donations benefit Catholic Charities.

Bonus Pittsburgh Technology Event

Are you a .NET programmer and interested in what’s going on with MVC?  If so, this months installment of the PGH.NET User Group is a must attend free event.  The PGH.NET meeting is on December 8th. You can find more info here or register here.

Posted in Events. Tagged with , , , , , .

Pittsburgh SQL User Group: Data Warehousing Presentation

Today, I am giving my first presentation at my local SQL Server User Group.  Below are links to the slides.  I will also add some more resource here after todays presentation.

Introduction to Data Warehousing slides

DEMO: Build Your First Cube

Below is the description of the discussion.

November’s presentation will include an Introduction to Data Warehousing with SQL Server presented by John Sterrett, a Database Administrator and Web Engineering Specialist for Orrick, Herrington & Sutcliffe LLP.  If you are interested in learning how Analysis Services, Integration Services and Reporting Services can provide Business Intelligence this meeting is for you.  We will start with the basic concepts of data warehousing including key terms and definitions.  Next, we will cover some sample business cases while we walk through the process of designing a data warehouse.  Once this session is complete you will be able to develop your first cube.

Date: Monday, November 16, 2009

Time: 11:45 a.m. Registration; 12:00 PM – 2:00 p.m.

Venue: Council Training Room, 2000 Technology Drive, Pittsburgh, PA 15219

Cost: No charge

RSVP: Email Heather Jones at Heather_Jones@Dell.com

If you have any questions, need more information, or would be willing to participate in any upcoming presentations or discussions, please Heather Jones at Heather_Jones@Dell.com.

Posted in Events, SQLServerPedia Syndication. Tagged with , , .

Data Warehouse: Facts and Measures

A few days ago I wrote a post that gave an introduction to dimensions.  Today, we are going to continue covering the basic concepts included in dimensional modeling by covering an introduction to fact tables and measures.  These posts are all part of the introduction to building a data warehouse with sql server series.

What is a Fact Table?

A fact table is a table that joins dimension tables with measures.  For example, Lets say you wanted to know the time worked by employees, by location, by project and by task.  If you had a dimension for employees, location, project and task you would create a composite primary key using these foreign keys and add an additional column for the time worked measure. (more on measures in a little bit)

Keep in mind that fact tables are huge unlike dimension tables.  Fact tables are usually built to contain a hundred thousand records on the low side up to billions of records on the high side.  Therefore, these tables must be normalized to be efficient.

A fact table is normalized when it consists of the following two things:

    1. A composite primary key using the foreign keys to the dimension tables.
    2. Measure(s) used for numerical analysis.

What is a measure?

A measure is normally an additive numerical value that represents a business metric.  You are also not limited to a single measure.  You can have multiple measures within a fact table.  For example, if your fact table is used to track purchases internationally you might have measures for each type of currency.  If you are building a fact table for the retail industry you might also have the following measures cost, list price, average sale price.

Next we will conclude or session on dimensional modeling and start to build our first cube.

Posted in SQL Server 2008, SQLServerPedia Syndication. Tagged with , .

Introduction to Dimensions

Today, we are going to quickly cover one of the basic concepts included in dimensional modeling.  We are going over the basics of dimensions, attributes and hierarchies.  We will review how they are related and how they work within Data Warehouses.  If you are looking for an introduction to building a data warehouse click here.

What is a Dimension Table?

A dimension table provides the description behind the analytic numbers.  It describes the who, what, when, where and why behind the facts. Dimensions are normally broken down into groups (tables) and they contain several attributes (columns).   Unlike a fact table the dimension table is not normalized.  Generally, dimension tables have many columns but a limited amount of rows. Dimension tables normally provide two purposes in a data warehouse, it can be used to filter queries and to select data.

Several data warehouses include the following dimension tables products, employees, customers, time, and location.  Lets say your business requirement is to provide an  time tracking data warehouse.  You would to want to implement a employee dimension table that included at least the following attributes (columns) first name, last name, status, start date, hire date, end date, department name title, salary etc….   we could actually go on and on and this is okay as long as the attributes support your business requirements.

image image

What are dimension hierarchies?

Dimension hierarchies provide a way to define a relationship between multiple attributes within a dimension. They are commonly defined as a structure to provide drill up and drill down capabilities.  You can have multiple hierarchies within a dimension. For example, in a time dimension you might want to have two separate hierarchies, one for fiscal year and another for calendar year.  These two dimension could contain the following attributes year, quarter, month, day.

image

Best Practices for designing a Dimension table

  • Use a unique identifier integer column that is auto incremental as your primary key.  This is commonly known as a surrogate key.
  • Use the source’s primary key as an alternating key.
  • Any additional attributes (columns) that describe the business entity

Slowly Changing Dimensions

Now that we know how to build a dimension we need to consider how the data is stored.  Yes, occasionally the attribute data changes.  For example, lets pretend you are a die hard Pirates fan and built a Data Warehouse to do analysis on your favorite players.  How would you handle promotions like Andrew McCutchen getting called up from AAA Indianapolis to the Pirates?

The following are options to handle slowly changing dimensions:

  1. Do nothing (type 0).  This approach is highly not recommended.  This cannot guarantee history preservation and includes the least control over managing changed attributes.
  2. Overwrite old data with new data (type 1)
    This completely overwrites the previous attribute value.  This could be ideal if you had a spelling error or the historical value of this column is not crucial. This is the easiest method to implement but it can be hard to manage.
  3. Create multiple records with different key values (type 2)
    This provides you with the ability to have an unlimited amount of history.  It is usually implemented by adding a start and end date column.  If you have to make changes to past records this could require you to also update fact records.
  4. Create a new column for previous values (type 3)
    This allows only a fixed amount of history to be retained.  If you create two extra columns for the team attribute you can only store three team values (the current value and last two previous values)

I hope you enjoyed this post.  Next we will cover an introduction to facts and measures.

Posted in SQL Server 2008, SQLServerPedia Syndication. Tagged with , .

Get Adobe Flash playerPlugin by wpburn.com wordpress themes