Thursday, December 31, 2009

Final Recap – 2009 Goals

Well, I set 7 professional goals for 2009 and I did okay in meeting them, but I was not successful in all and, really, that is only because I did not put in the time to get them all done.  So let’s go through them and see how I did:

  1. Learn SQL Server 2008, particularly policy-based management, resource governor, and service broker.
    • Well, I did learn some SQL Server 2008.  I run it on my laptop and have spent some time with it.
    • Policy-based Management – I have played with it, read about it, and attended a couple of presentations about it.  I’d call this one attained
    • Resource Governor – I did a little reading on it, but I did not study beyond that.  I have not played with it all.  I’d call this one missed.
    • Service Broker – I really need to learn this one, but I have not.  This a fail.
  2. Write 1 article per quarter for SQLServerCentral
      Man, I started out great with this one, but fell off in the second half of the year.  I still have a series on Profiler to complete, but I got stuck on a problem with Replaying a trace so I flamed out.  I had 2 in the first half and none in the second half.  This is a major fail and I have no excuse except lack of motivation.
  3. Record and submit 1 video per quarter for JumpstartTV (now SQLShare).
      I did one video in January and one in December (still to be approved at SQLShare).  So again, another fail because of lack of effort and planning.
  4. One blog post per week
      I met this one by average as there were weeks I did not have a post, but more weeks when I had multiple posts.  With this post I’ll have 113 posts in 2009 which is a little more than 2 per week.  I would say a large majority were technical/professional posts with a couple personal and some announcement type posts.  This one is ACHIEVED!
  5. Become more involved in leadership in my local user group (OPASS).
    • I am officially co-president and have been scheduling speakers and will be starting to work on sponsors in the coming weeks.  Definitely achieved!
      • Speak at 2 community events (user groups, SQLSaturday’s, etc…)
          I spoke at the Pensacola and Orlando SQLSaturday’s and the Tampa and Space Coast User Groups so this is definitely achieved.
      • Attend the PASS Summit
          I made it!  It was FANTASTIC!  I met at least 50 people, learned a ton, and made great contacts.  I can’t wait to go back in 2010.  Don’t forget it is only $995 until January 15th.  Believe me, it is worth it and I don’t plan on missing any in the future.

Overall a pretty good year as I was week in my contributions to SQLServerCentral and SQLShare, but I learned a lot about SQL Server 2008 even though I didn’t meet my specific goals, and I exceeded goals 4-6, and attained goal 7.

Even though I did not meet all my goals 2009 was a great year for my professional development.  I learned a lot, not just technically, but how to be a professional and how to contribute to the community, so I’ll call 2009 a success!

Monday, December 28, 2009

Presenting a Live Meeting vs. a Real Meeting

I recently had the opportunity to present,  Nuggets Found by Mining the Default Trace, for SQLLunch.  This was my first time presenting via Live Meeting (or any on-line meeting functionality for that matter) and it was quite different.  I have presented technical contant at several user groups and SQLSaturday’s, and have spoken at many churches, but all of those times have been in the front of a roomful of people.  Presenting on-line is definitely different than presenting in-person.  Here are my first impressions:

Pacing

When presenting in-person you can tell by the attendees expressions and body language if you are going at the right pace, but on-line you don’t get that immediate feedback.

Personality

I’m not sure that your personality as a presenter comes across on-line as well as in-person.  Again, the lack of feedback from visual cues makes it hard to tell if your style and personality is coming through or if it is appropriate based on the audience.

Interaction

I thrive on interaction with the attendees and there is very limited opportunity for this on-line, at least with my limited experience.  I like to take questions throughout my presentations and tell some jokes and I found this more difficult to do in a Live Meeting

My Conclusion

I think Live Meeting and similar technologies are great even though I prefer to present in-person. I do enjoy being able to hear some great speakers through Live Meeting. 

Where I Think Live Meeting Fits Best

Remote locations to have some top speakers present.  Similar to where I use to live in northern New Hampshire.  Let’s just say that being 2+ hours from the nearest airport and 3+ hours from the nearest big city (Boston or Montreal) isn’t conducive to bringing in speakers from away, but Live Meeting would allow a group to have some top speakers.

For organizations like PASS to give a taste of conferences like the Summit through events like the 24 Hours of Pass.

Going Forward

As Co-President of OPASS, we are going to be having our first meeting with a Live Meeting presention at our January meeting with Andy Leonard (@AndyLeonard) presenting.  My co-President, Andy Warren (@sqlandy), is a big thinker and wants to try to send 2-way video so that the presenter can see the group and, if possible, take questions during the presentation.  We will be doing some testing before to see how and if we can make it work, and then try to make it work well.   

Thursday, December 24, 2009

OT: What Christmas Means to Me

Merry Christmas to everyone.  As many of you know, at least I hope you do, I am a born-again Christian and try to live my life according to the Bible, so I’d like to share what Christmas means to me at this time.

There are many scripture passages that are regularly used in Christmas cards, sermons, blogs, and letters, but I’d the one I’ll share is a little different:

   
12 Therefore, just as through one man sin entered the world, and death through sin, and thus death spread to all men, because all sinned— 13 (For until the law sin was in the world, but sin is not imputed when there is no law. 14 Nevertheless death reigned from Adam to Moses, even over those who had not sinned according to the likeness of the transgression of Adam, who is a type of Him who was to come. 15 But the free gift is not like the offense. For if by the one man’s offense many died, much more the grace of God and the gift by the grace of the one Man, Jesus Christ, abounded to many. 16 And the gift is not like that which came through the one who sinned. For the judgment which came from one offense resulted in condemnation, but the free gift which came from many offenses resulted in justification. 17 For if by the one man’s offense death reigned through the one, much more those who receive abundance of grace and of the gift of righteousness will reign in life through the One, Jesus Christ.)
18 Therefore, as through one man’s offense judgment came to all men, resulting in condemnation, even so through one Man’s righteous act the free gift came to all men, resulting in justification of life. 19 For as by one man’s disobedience many were made sinners, so also by one Man’s obedience many will be made righteous.
20 Moreover the law entered that the offense might abound. But where sin abounded, grace abounded much more, 21 so that as sin reigned in death, even so grace might reign through righteousness to eternal life through Jesus Christ our Lord. (Romans 5:12-21, New King James Version)

There’s a lot in that passage, but the key idea is that, because Adam sinned ALL people are born sinners (vv. 12-15, 18-19), but because Jesus Christ was fully obedient (vv.18-19), God through His grace offers justification (Ephesians 2:8-9) to us.

The giving and receiving of gifts at Christmas is fun, and, believe it or not, I prefer the giving over receiving, but the birth, life, death, and resurrection of Christ and the free gift offered by God because of that is the greatest gift that can be given.  I’m glad that I accepted and opened that gift and I hope you have as well.

Wednesday, December 23, 2009

Speaking at SQLSaturday #32 – Tampa

I just found out that I’ve been accepted to speak at SQLSaturday #32 – Tampa on January 23, 2010.  My session will be:

Why Should I Use Stored Procedures?

With the proliferation of ORM Tools like Linq To SQL, NHibernate, there has been a move to no longer use stored procedures for Data Access, I personally disagree. This will be a professional and polite open discussion starting with why I believe stored procedures are the best way to access data in SQL Server. Alternate view points welcome.

I hope this will turn out to be a great, open discussion where there are different viewpoints presented and honest evaluation of the best way to access data in SQL Server.

Why Attend?

If you’ve never been to a SQLSaturday, I highly recommend that you check out the schedule as there are several events upcoming all around the US.  Where else can you find a full day of free training from some of the best minds in the SQL Server community.  There are usually several SQL Server MVP’s and authors presenting in addition to the best local SQL Server minds.  The time spent in conversation with your peers is well-worth a Saturday. 

Remember, YOU are responsible for your professional development.

Monday, December 21, 2009

SQLLunch Resources – Mining Nuggets from the Default Trace

I did my first SQLLunch today and it was fun.  I don’t know how many attended, my last look was 12, so not a huge crowd, but that’s okay.  It is definitely different presenting online versus in-person and there will be a blog post soon about how I found it different and where I struggled, but I digress.  I promised that I put the scripts up on my blog so here they are on SkyDrive since I can’t post them here:

Enjoy!  Oh, and as always, don’t trust any code you download from the internet, even mine always test it then improve it and then share it.

Friday, December 18, 2009

Have Lunch with Me

I know you all are clamoring for the opportunity to have lunch with me so I agreed to do a SQLLunch on Monday, December 21.  Doing it this way will allow more people to enjoy lunch with me.

I’ll be speaking on Nuggets Found by Mining the Default Trace.  Lunch starts at 11:30 am CST and will last for about 30 minutes with some time for questions.

Thursday, December 17, 2009

Where’d the Data Go?

The Reported Problem

A few weeks ago I was contacted by a former employer because an SSRS report I had written several years ago was no longer returning the data that was expected.  The report returned Manufacturing Instructions that were attached to an Order or Order Item and was used to ensure that everything was done as requested by the customer.  There are 2 groups on the report:

  1. Runs – a Run consists of orders that contain the same product.
  2. Orders

The detail section consists of the specific Manufacturing Instructions for each order in the run.  Well, the report was showing the Runs and the Orders but no Instructions.  Obviously this is bad since the whole point of the report is to show the instructions.

Troubleshooting the Problem

I vpn’ed into the network and opened up the report to find the SQL that was generating the report.  I knew I had authored the report, but could not remember what the data source was.  There were 2 possible data sources:  SQL Server or DB2 on the iSeries.  I was hoping it would be SQL Server.  It wasn’t.  I had a query similar to this (underlining added) in the report that was connecting to DB2 using the IBM DA400 OLE DB Driver:

SELECT
S.run_no,
O.order_no,
OI.instruction AS order_instruction,
S.start_date,
S.end_date
FROM
@orders O JOIN
@order_instructions OI
ON O.order_no = OI.order_no JOIN
@schedule S
ON O.order_no = S.order_no
WHERE
(S.start_date >= '12/17/2009' AND
S.end_date < '12/21/2009') OR
(
S.start_date < '12/21/2009' AND
S.end_date > '12/14/2009')
UNION ALL
SELECT
S.run_no,
O.order_no,
OII.instruction AS order_item_instruction,
S.start_date,
S.end_date
FROM
@orders O JOIN
@order_items OI
ON O.order_no = OI.order_no JOIN
@order_item_instructions OII
ON OI.order_item_no = OII.order_item_no JOIN
@schedule S
ON O.order_no = S.order_no
WHERE
(S.start_date >= '12/17/2009' AND
S.end_date < '12/21/2009') OR
(
S.start_date < '12/21/2009' AND
S.end_date > '12/14/2009')
ORDER BY
run_no,
O.order_no


I ran the query in the dataset designer in Visual Studio 2003 (yup, SSRS 2000) and got data back including instructions.  I couldn’t figure out why I wasn’t seeing instructions on the report, especially since this report had been running without problem.  Then I ran the query in a custom query tool and that’s when I noticed the instruction column was not being returned as instruction but as column 00003!  What! I don’t have that anywhere?  Well, look at the underlined text in query, notice how I aliased the instruction columns with different aliases.  Turns out THIS was the problem.  Apparently when an update (ptf) was applied to the iSeries the behavior of column aliases in a UNION changed.  If you run a query like that in SQL Server the ALIAS used in the FIRST query is returned as the column name.  This was also how it USED to work in DB2 on the iSeries, but apparently that changed and instead of getting EITHER of the ALIASES it returns the column number, in the case you’d get 00003 for the ALIASED column.



The Solution



Well, simple solution, I removed the ALIAS in the second part of the UNION query and, VIOLA!, the report now worked again.



Why did I have the separate ALIASes in the first place?  I think it was because when I was testing the queries for correct data I wanted to know which instructions were at the order level and which were at the order item level and I ran the queries separately.  Then when I was convinced the data was correct I UNION’ed the queries and stuck them in the report without removing the ALIASes. 



So in reality the query was returning the correct data, but the SSRS report was looking for a column named instructions and it didn’t exist, so it didn’t show it!



Next time, I’ll know better!