Tuesday, February 24, 2009

The Myth of SQL Code Portability?

While I have never had the "pleasure" of working on a project that required I write ANSI standard SQL so the code for portability, I have worked with products that have been written that way. Alexander Kuznetsov has an interesting blog post, Writing ANSI Standard SQL is not practical, where he addresses the issue from his experience. He notes that best practices dictate using stored procedures for data access and the big difference between SQL Server and Oracle implementation. He also links to another article he wrote on DevX, Think ANSI Standard SQL Is Fully Portable Between Databases? Think Again., where he explains some situations where SQL Server and Oracle will return different results from the same data. Sure some of these issues are somewhat contrived, but they do have real world implications. Overall I would say that I agree with his conclusions.

I would also like to add that, in my experience with applications where the SQL was written for portability, I have seen issues with performance. This is usually because the SQL does not take advantage of some of the T-SQL extensions or uses a less than optimal (for SQL Server) query syntax. It also makes security harder because it does not use stored procedures so you have to enable direct access to base tables. One product I worked with that was written with portability would not implement Primary and Foreign Keys.

I understand trying to maximize your the profitability of your code, but with performance being such a big issue now, I don't see how you can not write platform specific code. The other issue is that these vendors often do not have platform experts, whether SQL Server or Oracle, so when you approach them with an issue they cannot offer proper help.

One last link to a post by Brad McGahee, Challenging the Tyranny of Third-Party Vendors: A DBA’s Manifesto

Monday, February 23, 2009

ONETUG February Meeting

I attended the February ONETUG(Orlando .NET Users Group) meeting on Thursday, February 19th, with a couple of co-workers from NTM, Dave Mateer and Nathan Whatley. While I have been a regular attender of the OPASS meetings, this was my first ONETUG meeting. There was the usual pizza and soda/water available and announcements with an emphasis on the upcoming Orlando .NET Code Camp upcoming on March 28th. Attendance seemed to be pretty good with about 40 people there. I didn't network as well as I probably should have, but I did meet Troy Wolbrink who is the main developer behind TntMPD, a donor relationship management software that NTM recommends. I had done some work with the NTM financial system to provide a file for download by NTM members that can be loaded into TntMPD automatically. It was pretty cool to meet him. He invited me to come visit him at work (Campus Crusade for Christ) and I probably will take him up on it.

The main speaker was Gary Ewell from XCLR8 Software and the topic was WPF with a Real World Perspective. I have to say that I did not come away with the urge to adopt WPF (Windows Presentation Foundation) at work. To me it was a lot like ASP.NET, but with a cleaner separation of the Presentation Layer from the Business Layer. I'm sure that if I really understood it better I'd be more impressed by it. It definitely gives you more control over the appearance of the UI. Overall I would say the presentation was average and I wasn't sure what I was supposed to take away from it.

The night ended with a raffle and I did come away with what I hope is a good book, Programming Microsoft ASP.NET 3.5 by Dino Espisito.

Monday, February 16, 2009

Volunteering for PASS

My friend, Andy Warren, was elected to the PASS board of directors in November and has been tasked with managing content. He has asked several people, myself included, to help out as PASS is a volunteer driven organization. You can see Andy's goals and current volunteers in this blog post. If you look at the list you'll understand how honored I am to be a part of the group. So far the PASS blog directory has been updated and now lists close to 200 blogs that deal primarily with SQL Server.

I have volunteered to put together a Top Ten list of articles/blog posts about SQL Server Profiler, so be looking for that and several other top 10 lists on the PASS web site over the next couple of months.

I was not a PASS member until early last year, but with the new board members and a renewed focus on becoming the SQL Server organization, I think you will see a lot of change coming over the next year.

Friday, February 13, 2009

Things I Wish I Had Known

I was tagged by Tim Mitchell in the latest, as he says, get to know you question, started by Mike Walsh, about what you have learned that you wish you had known earlier. There have been a lot of very smart people "tagged" in this thread and there have been some common themes, some of which I will hit on as well. So let's get started.

When in doubt ask!
I do not have a normal computer science education, so when I got my first job I really felt like I needed to prove myself so I was very hesitant to admit I didn't know something. I would spend 2 hours researching and figuring out something instead of asking a co-worker. Of course, this meant I spent more hours at work in order to accomplish what needed to be done. Now as an experienced developer, I've realized that I'm never going to know it all and that the best resource I have is the people I know. Don't let pride or reputation keep you from asking for help

Educate yourself
This has been mentioned by others, but it bears repeating. If you want to progress in your career take and make the time to educate yourself. I agree with Brent Ozar that you should pick an area you are passionate about and become the expert in that area. You should be "the man" for Reporting Services, Profiler, etc...

Get Involved
Another common theme, but, in my opinion, very important. Don't just attend user groups, events, or online communities like SQLServerCentral get involved in them! The more you put in the more you will get out of each of these communities. I have learned more in the past year by answering forum questions, going to meetings and events, speaking, and writing articles, than in the previous 5 years. I was fortunate to be able to speak at SQLSaturday 8 in Orlando and in preparation I probably learned more than anyone who attended my session. In my time on SQLServerCentral (my preferred site) I have gotten to know some great SQL minds like Grant Fritchey, Gail Shaw, Jeff Moden, R. Barry Young, Lynn Pettis and others. Through our interactions on SSC I've been able to develop a network of "go to" people when I have a problem I can't solve.

Share your knowledge and document everything
It's great to be indispensable, until you want to go on vacation. Teach your co-workers about what you do and document everything. If someone can't fill in for you for a week, you need to get to work on getting someone up to speed. This actually makes you more valuable to your employer because you are making everyone more productive.

Take time for your family and yourself
We all know someone who works all the time and if you don't, you probably are that person. Sometimes long hours are necessary, but they are not a badge of honor. Long-term you will be more productive if you work normal hours and take your vacations. You will also like your job more, too. If your boss expects your regular week to be 50 or more hours, start looking for another position now! I regularly worked until 8 or 9 pm when I was first married and missed out on having some more fun times with my wife before we had kids. Now I do my best to be out at 5 pm so I can enjoy my kids and wife. Life is more than work and work will be better if it is only part of your life.

I'm closing in on 40 and I'd like to think I've learned some lessons and I'd like to pass them on. I still feel like one of the young guys though.

Since it's the weekend and I think all my blogging friends have been tagged I'm going to pass on tagging anyone else.



Thursday, February 12, 2009

Citibank Online Payment Rant

While we were in New Hampshire my wife used my AT&T Universal Mastercard (provided by Citibank) to make a purchase, but she didn't mean to use this card. Now the only reason we have this card is because we get 30 free calling card minutes a month, and we have not used it for anything but the free calling card minutes in at least 3 years.

My payment is due so I went on-line and logged into my account (remember this for later) to make my payment. Well, it turns out I don't have a bank account setup to make the payment from. Hey, no big deal, right? Just get the routing and account numbers out of the check book and away we go! NOT! After I entered the routing and account numbers I had to make it past the verification step which consists of entering the 3 digit code on the back of the card and entering the security word you chose when you setup the account. Remember I have already logged into the account and am trying to set up payment account, I'm not trying to get money, I'm trying to pay THEM! Of course I have no idea what my security word is, so I click on the "need help remembering your security word" link expecting to get a question like, "What's your mother's maiden name?". Of course this is not what happens at all, nope, just a list of "You may have chosen your mother's maiden name, the last 4 digits of your or a friend's phone number, etc...". Great! This is like Super Genius Jeapordy. Not only do you need to come up with the question, but you need to come up with the question AND the answer. Now I am ready to throw everything out the window. Why do they need to verify who I am when I am ALREADY LOGGED IN? Shouldn't they be asking this when I log in? I just want to set up an account to send them money, not take money. Hey if someone hacks into my on-line credit card account and wants to pay the balance, I'm all for it! As a matter of fact I wish they would choose to do it to the credit card I do use. Fortunately I made this attempt 5 days before the payment is due, so I may actually get it done before the payment is late.

Don't get me wrong, I'm all for keeping my credit card data secure, but that should be done by not letting me log in, not AFTER I'm logged in.

Thanks for reading, I had to get this out of my system.

Wednesday, February 11, 2009

Featured Content on JumpstartTV

JumpstartTV featured another of the Profiler Videos I did for them today.
Explaining The Properties Window in SQL Server Profiler
This video goes through the setting the basic properties for a Profiler trace.

Tuesday, February 10, 2009

Help CNN (and others) stream using your PC

A friend forwarded this article to me, Watch a live video, share your PC with CNN and after I had read it I immediately voiced concerns over security and the ethics of the implementation.

Basically CNN uses a peer to peer (P2P) networking application called Octoshape Grid Delivery that uses your PC to feed other viewers using the software. The issue in a nutshell is that (directly from the article):
Web surfers who visit CNN.com and select a live video stream for the first time see in their browsers a dialog box, shown in Figure 1, saying, "This site requires the Octoshape Grid Delivery enhancement for Adobe Flash Player." The dialog box doesn't appear when playing an ordinary video file, only when starting a live feed. (Feeds labeled LIVE typically appear in the upper-right corner of CNN.com's home page during business hours.)
Yet, you can still watch the video without the P2P software. Therein lies the rub, shouldn't they tell you that your experience will be enhanced by installing this software and that your PC and will be used to stream the video to others? In my opinion, software companies need to make sure that they openly disclose what the software does and the resources it uses.

I think most software vendors are guilty of non-disclosure. Apple with iTunes, at least in my opinion, did not make the Bonjour service clear, and Microsoft did not make it clear that Windows Media sharing was being enabled.

It really comes down to ethics. What are you doing with my resources and do you make it easy for me to understand and disable if I don't like it?

Monday, February 9, 2009

Script featured on SQLServerCentral

The script, Who has accessed my 2005 server?, I submitted was featured in the SQLServerCentral newsletter today.

The script uses the default trace to show who has logged into SQL Server. It is, of course, limited by the data contained in the Trace.

Monday, February 2, 2009

Tool Tips

Here a few free programs I have found useful:
  1. MWSnap - a free screen capture tool similar to Snag-it. I use it to produce screen shots fro articles, presentations, and user documentation. It's not quite as nice as Snag-It, but you can't beat the price.
  2. PDF995 - this allows you to "print" to a PDF document. I use it to "print" my on-line transactions, especially when I am away from a printer. There is a sponsored version which is free and you can also buy it for the reasonable price of $9.95 if the ads annoy you.
  3. Paint.Net - a free image editing software that was "Originally intended as a free replacement for the Microsoft Paint software that comes with Windows". Much more powerful than Paint, but simpler and easier to use than Photoshop or Gimp. I found this one when someone else asked about free image editing software on Twitter and they were pointed here.
  4. SQLDigger - an application that searches through SQL Server for text in Stored Procedures, Triggers, and Views. I think I found this one through SQLServerCentral several years ago. I use it pretty regularly, and think it is a good tool, but for some reason development of it stopped with .NET 1.1. I wish it was still being developed.
  5. E-Sword - a Bible program. Includes a few Bible translations and study tools for free with many others available for a minimal fee.
These are a few of the programs and tools that I use on a fairly regular basis and have found helpful in my work and personal life.