SQL Presentation for Springfield .NET Users Group

Tonight, I gave a presentation to the Springfield .NET Users Group.  I chose to present on SQL Server 2008 Development for Programmers.  I tried to keep it to a level 200 type class.

The following is my presentation in SlideShare.net:


Turning a new leaf with a career change

I started a new job this week. I am working for Expedia, Inc now as a Database Development Engineer (or DB Dev, for short). So far, I am really enjoying the opportunity. The people are really great and have a real entusiasm for what they do.

It’s a quicker pace for development releases than I’m used to, but it seems like they have a really good system of checks and balances to ensure the process is flawless. I am learning that “Uptime” is the most important factor and that everything else comes in as second priority. That’s such a different mentality to me. My background has always been in the client-server world. So we could shut the system down to make our changes/updates and then give the All Clear signal to let everyone in. But not with a website that is running 24x7x365. It the site is down even a few minutes, that’s lost revenue, which is unacceptable.

The work is still similar from a database perspective, but every little change is scrutinized. Can’t update a table in a large batch, it has to be done in iterations of 100 records or less so that it doesn’t lock too many data pages.

Today, I was writing a multi-threaded query stress tool. It’s going to be something that will compare all the CPU, read/write IO, & memory metrics for a defined number of iterations and threads. We will be able to scale it up to simulate a real load on the database server. We have to be concisous of every little change we implement, because a small change can get magnified when 50,000 users hit the system.

Regardless of the details, I am LOVING my career change. It’s refreshing to change everything.

AutoRecover SQL Scripts

This morning, when I came into work, I discovered that Windows Update had graciously restarted my machine for me. No big deal. But wait, then I realized I had some SQL work that I hadn’t saved yet. NOOOOOO!!! I know, I know, … always save your work. But yesterday, I didn’t. So you can imagine how irritated I was to discover that all of that hard work was gone. Or so I thought.

A co-worker heard me getting mad at myself and chimed in that SQL Server Management Studio (SSMS) has an autorecover feature. WHAT!? Yep, when ever you start typing a query in SSMS, a file is automatically created and saves itself every 5 minutes. The location of this AutoRecover document is located in “\My Documents\SQL Server Management Studio\Backup Files\Solution [n]\”. The [n] represents an integer that corresponds to how many SSMS IDE windows you have open. I only had one IDE open, with two query windows open, so I had a “\Solution 1\” folder with two files in it: ~AutoRecover.~vs47E8.sql & ~AutoRecover.~vsD5FD.sql.

Try it out. Open the folder mentioned above and open a new SSMS IDE and Query window and start typing out a quick SELECT. After about 5 minutes, you will see a new file prefixed with “~AutoRecover.~vsXXXX.sql”. The X’s are alphanumeric values that change with every file. The new file will get auto saved in 5 min increments from there on. When you close SSMS or a query window and it asks you if you want to save, click No, and watch the auto-generated file delete itself.

Wow, that was a HUGE relief. SSMS 2005 and higher has this feature built in. Thank you Microsoft for saving me from my own carelessness.

Free eBook: Defensive Database Programming

Simple-Talk Publishing has released a new free eBook: Defensive Database Programming with SQL Server, by Alex Kuznetsov.

The goal of Defensive Programming is to produce resilient code that responds gracefully to the unexpected. To the SQL Server programmer, this means T-SQL code that behaves consistently and predictably in cases of unexpected usage, doesn’t break under concurrent loads, and survives predictable changes to database schemas and settings.

Too often as developers, we stop work as soon as our code passes a few basic tests to confirm that it produces the ‘right result’ in a given use case. We do not stop to consider what other possible ways in which the code might be used in the future, or how our code will respond to common changes to the database environment, such as a change in the database language setting, or a change to the nullability of a table column, and so on.

This book is filled with practical, realistic examples of the sorts of problems that beset database programs, including:

  • Changes in database objects, such as tables, constraints, columns, and stored procedures.
  • Changes to concurrency and isolation levels.
  • Upgrades to new versions of SQL Server.
  • Changes in requirements.
  • Code reuse.
  • Problems causing loss of data integrity.
  • Problems with error handling in T-SQL.

You can download the eBook in PDF format here.

Passed My Microsoft Certification Exam!

Today, I passed my first Microsoft Certification exam, MCTS exam 70-433!  With this certification, I am a Microsoft Certified Technology Specialist for SQL Server 2008 Database Development.

Getting a MS cert has always been something that I always wanted to achieve, but I never thought I would have the time to study.  Well I signed up back in April and just knew that if I didn’t just do it, I probably never would.  I had a great book to read from.  It included an application that simulated the exam with practice tests.  I took quite a few of the practice tests before the exam day and never could pass one, so needless to say, I was very nervous.

Once I was in the exam room, things seemed to get easier as I loosened up.  The questions were hard and quite a few were rather tricky.  Luckily, there was a review later checkbox at the top of each question that allowed me to go back after the test and review the ones that I was feeling unsure about.  That was the real key to passing, I think.  I went back through every question and re-read each word to make sure that I was fully understanding the question.  Honestly, I was able to change a few of my answers because of it.

All in all, I would definitely do it again.  In fact, I am already thinking about my next cert.  But I think I’ll take the summer off to relax before I dive into that study mode again.

Free eBook: Introducing Microsoft SQL Server 2008 R2

Microsoft Press has released a free ebook: Introducing Microsoft SQL Server R2, by Ross Mistry and Stacia Misner. There are 10 chapters and 216 pages. Here is a quick overview of the chapters:

Chapter 1: SQL Server 2008 R2 Editions and Enhancements
Chapter 2: Multi-Server Administration
Chapter 3: Data-Tier Applications
Chapter 4: High Availability and Virtualization Enhancements
Chapter 5: Consolidation and Monitoring
Chapter 6: Scalable Data Warehousing
Chapter 7: Master Data Services
Chapter 8: Complex Event Processing with StreamInsight
Chapter 9: Reporting Services Enhancements
Chapter 10: Self-Service Analysis with PowerPivot

You can download the ebook in PDF format here.

Update your readers to follow my new syndication feed at http://feeds.feedburner.com/adamhutson.

First Microsoft Certification Exam

I’ve signed up to take my first Microsoft Certification exam. I will be taking the MCTS Exam 70-433: SQL Server 2008 Database Development exam. The date is scheduled for May 26th with 3 hours allotted. I’m hoping that it’ll be a breeze, since I’ve been writing TSQL for so long, but I’m still nervous.

The book I’ve been reading is from Microsoft Press: Microsoft SQL Server 2008 – Database Development Training Kit, by Tobias Thernstom, Ann Weber, Mike Hotek, and GrandMasters.  So far it’s a really quick read.  The part that I really like about this book is that there is a summary at the front of the book that states the exams specific objectives and where it’s located in the book.  There are also practice tests included for studying.

Wish me luck!