June 2007 - Posts

Debugging Stored Procedures in VS 2005

My friend and former co-worker Chris Rock just posted at article over at SQLTeam.com that has a pretty good walk through of how to set up and use the VS debugger on procs. According to an MSDN article he includes it still requires sysadmin permissions to debug though, limiting it to local dev instances or a dev server at best. Why can't we have the equivalent of the alter trace added in SQL 2005 for debugging? I often complain that developers treat TSQL as if it's magic incantations instead of another kind of code, and having to debug using print statements isn't helping the situation.

Debugging Article
Posted by Andy Warren with no comments

Celko Cites Steve Jones

I'm at the bookstore today alternating some work with some professional development time and was reading some of Celko's SQL Programming Style and was mildly startled to see him reference a couple of Steve's articles (Coding Standards Part 1 and Coding Standards Part 2). Worth taking a look at those if you haven't (regardless of the mention in the book!). As for the book, it's interesting if a bit dull in places. I'm enjoying the discussion of column naming as I can see a few places where I've made the mistakes he mentions.
Posted by Andy Warren with no comments
Filed under: ,

GO More than Once?

SSC had a fairly routine article up recently about The GO Command the Semi Colon Terminator which I read, and when I followed along on the associated discussion came across an interesting comment that noted in SSMS you can add an integer param to GO to have it execute the batch multiple times. To see in action, try this:
select newid()
go 5
Not sure what I'll use it for yet, of if ever, but don't know that I would have learned about it any other way than just my daily keep up with the tech world reading.
Posted by Andy Warren with no comments
Filed under:

Tampa Code Camp 2007

Web site just went live for this year. Brian & I both presented sessions last year and we're planning to go again this year, along with my sometime sidekick Chris Rock if he can get away from work. Code Camps offer the same kind of variety you'd find at a conference, just fewer frills and of course it's only done day - offset by the cost: free!
Link to the site: www.tampacodecamp.com
Posted by Andy Warren with no comments
Filed under:

Mirrored Backups Posted on SSC

This was fun to run through, nice to see MS adding features even if in my view they didn't quite bake the whole cake. Click here for the article.
Posted by Andy Warren with no comments
Filed under: ,

Clustered Index Seek or Key Lookup

When I teach performance tuning I always remind students to be cautious about service packs because things you "know" may no longer be true after the service pack because of subtle or no so subtle changes made by MS. I was lucky enough to have an example of this show up during a recent class. I had SP1 installed on my laptop and SP2 just added to the image used for training machines. In SP1 when you examine a graphical query plan you will see one of two operatars when doing a bookmark lookup, either a Clustered Index Seek or a RID Lookup. In SP2 what used to be a Clustered Index Seek is now a Key Lookup. Nothing in the release notes that I can see about why the change was made, but you can see the MS confirmation at Key Lookup Info. Not a huge change, but seems like change for the sake of change.
Posted by Andy Warren with no comments
Filed under: