September 2005 - Posts

Career changes, Code Camp 4, and PASS Summit

I've been incredibly busy as of late, but hopefully things will settle down a bit in the next couple of weeks.

Today is my second-to-last day with GetConnected.  I have decided to become an independent consultant.  So if you're reading and you need some work done, contact me through the blog!  As for GetConnected, I had a great 15 months there.  If you're reading this and need a job, check them out.  They're hiring for several software development postitions at the moment, including both some reporting people and a Senior DBA.  Tell them I sent you.  Maybe that will help... Or maybe it will cost you the job.  But hey, you won't know until you try!

Saturday morning, I'm speaking at Code Camp 4.  I'll be talking about T-SQL enhancements in SQL Server 2005.  Should be a good talk.  My deck is close to being finished, and I'm extremely happy with it.  I think it might be the best Powerpoint I've written to date.  Hopefully the code samples will come together nicely, as well.

Next week I'm headed to the PASS Community Summit in Grapevine, TX (between Dallas and Fort Worth, I'm told.)  I'll be speaking Thursday afternoon, doing my talk on "structured" SQL Server development, involving exception handling, unit testing, and programmatic debugging.  I'll also be hanging out in the "lounge" that PASS is setting up, answering questions on SQL Server.  I'll be there from 1:00 - 3:00 on Wednesday, so stop by!

SQL Server news: September CTP and DB Mirroring

Two things announced today by Microsoft:

1. The September CTP is available on MSDN.  Go get it!

2. Database Mirroring will not be available for production use in the RTM release.  It will be available some time in the first half of 2006

The feature will still be in the product, but will be disabled by default.  To enable the feature, DBAs can turn on Trace Flag 1400.  Note that this feature will not be supported for production use until Microsoft gives it a thumbs-up.

Mirroring is still turned on by default in the September CTP.

More XML Fun!

A couple of new links for your enjoyment:

http://blogs.zdnet.com/Ou/?p=97
http://blogs.zdnet.com/carroll/index.php?p=1487

... That's all for now.

Using static properties in SQLCLR UDTs

I spoke at the Beantown .NET user group meeting tonight, on the topic of SQLCLR in SQL Server 2005.

One of the questions that came up during the UDT part of the talk was whether static properties are supported.  Unfortunately, I had no answer at the time--it's not something I'd yet thought to try.

The answer, as it turns out, is yes: they are supported.  But they must be defined as readonly, e.g.:
public static readonly int foo;
As it turns out, this means that they can also only be initialized from a static constructor:
static myType()
{
    foo = 1;
}
... which means that value will stick around from the time the type is first used, until the AppDomain is reset (for example, if SQL Server is restarted).

In my opinion, this greatly limits many use cases.  One might, I suppose, have some expensive, yet rarely-modified data to initialize the member with, and get that data on the first pass only. However, if the data does chang, I'm not sure that it would be easy to reset the AppDomain.  Do you really want to restart SQL Server in production environments to update static members?

Another use case I can think of is logging.  Perhaps there are situations in which you'd want to log the first time a type is used.  But that doesn't seem incredibly interesting.

If someone else reading has a more compelling use case, I'd be interested in hearing it!