Table Partitioning Conclusions

Today I tested all my code and made changes where I made mistakes. And I made quite a few! My biggest mistake was with the GetDate() function. I made partitions with milliseconds which was not my intention! I changed the code in my last post where necessary. If you still encounter bugs, please contact me.

 
 

A positive conclusion is the management studio of SQL 2008. Great tool! I used the scripts of the partitioning wizard quite a lot but the best feature it offered was the debugger. Finally T-SQL developers have T-SQL debugging without installing Visual Studio. Here's a screenshot:

 
 

The debugger saved me a lot of time because you immediately know where your bugs are when you can step through your code. No more output messages and all that old-school techniques. Of course intellisense also saves time while coding. I'm impressed by the new management studio.

Btw: you can't use the debugger on a SQL 2005 instance.

 
 

The wizards in the SQL 2008 management studio only support standard scenarios. I hope I pointed you in some directions what you can do with partitioning when you want something else. This was quite a complex scenario but didn't require that much code.

The code I produced is not nearly finished. Robust error handling should be added before this is installed on production databases. For me this assignment is over though. The DBA's from the client can take it from here.

My next assignments will be on the Sync framework and on the Resource governor of SQL 2008. My next blogs will be on those subjects.