# Wednesday, November 19, 2003

Rob Howard Started a War

On Stored Procedures v InLine SQL (heavy business logic in middle tier) in his blog on Monday..

I almost always use Stored Procedures. There is almost never a reason to use Dynamic SQL, but I am sure that there are times. My highlights:

  1. SPs are more secure. Most DBAs do not allow select permissions on any base tables-for obvious reasons. Using SPs gives you a nice abstraction layer. Don’t want someone accidentally deleting everything from a table, don’t create a SP to allow it.
  2. SPs can save your butt. What if a developer creates a dynamic SQL statement that looks ok but will not use an index, etc. And then in a few months your dynamic SQL is super slow since they are restricting on a billion row table without an index. Your procedure will never allow that if you say so.
  3. SPs are way easier to maintain in your code.

So what does Yukon with the ability to create SPs with C# or VB .NET do to all of this? Nothing, Microsoft still recomends TSQL for your data access/CRUD code.

posted on Wednesday, November 19, 2003 9:09:53 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Tuesday, November 18, 2003

A-Rod at Shea?

It is that time of year where the super duper trade rumors start. The latest has A-Rod in Flushing.

posted on Tuesday, November 18, 2003 3:02:55 PM (Eastern Standard Time, UTC-05:00)  #    Comments [17] Trackback
# Monday, November 17, 2003

I think I can fly.


As I ate lunch yesterday on top of Slide Mountain (the tallest in the Catskills) there was a very special feeling as the snow started to fall on Walter and me. I have summitted this mountain twice before, but something was different today. The scenery, the calm, and the smell of the balsam fur and pine trees were intoxicating. The struggle up the last rock face was satisfying, especially when I got my boot wedged into a foothold and could not get it out-had to take my foot out of the boot while hanging on the rock wall with my other hand. On the summit, a calm soothing feeling came over us along with the sense of accomplishment of summiting our 3rd peak of the day (Wittenberg and Cornell mountains were also summited on the 7 mile approach in to Slide Mountain).


After lunch, Mary, Dorothy aka the Condom Queen (I can write that since she says that she doesn’t read my blog), Donna and Norm went ahead of Walter and I on the 7 mile descent (14 mile total day). I love the trail down Slide in the winter, with about 5 inches of snow on the ground and snow and frost in the green balsam and pine trees, the visual stimulus was amazing. Alone in the majestic quiet of the wilderness, we talked about this is why we climb these mountains and that it is too bad people not here would not understand how special it is to be there today. That is why I write this today, hopefully you all understand somewhat.


The stats: 14 miles, 7 hours, 3 peaks, 4 Cliff bars, 3 liters of water and about 7,000’ of elevation gain/loss.


What a way to recharge the batteries, both mentally and physically.



posted on Monday, November 17, 2003 4:53:54 PM (Eastern Standard Time, UTC-05:00)  #    Comments [11] Trackback
# Friday, November 14, 2003

The Source


Whenever I am on the Microsoft Campus, it is a strange feeling. Kind of like Neo returning to The Source in The Matrix Reloaded.


Yesterday I was on campus and had a good experience planning things for 2004. Stay tuned!

posted on Friday, November 14, 2003 6:00:30 PM (Eastern Standard Time, UTC-05:00)  #    Comments [1] Trackback
# Wednesday, November 12, 2003

PASS Session

If you attended my PASS session in Seattle today called Efficient and Secure Data Retrieval in Your Middle Tier Using Stored Procedures and ADO. NET, you can download the materials here.

Off to dinner with Bill!

posted on Wednesday, November 12, 2003 8:13:40 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Tuesday, November 11, 2003
SubQueries Rock in a Where Clause

I have been using subqueries in Where clauses since I learned TSQL. This SQL below gives me all of the data in one table that is not in another table. Clemons, try doing that with XML! <g>

select location_id  from rpt_rcep11 where location_ID not in (select location_ID from dbo.tblExtrnl_Location_Mapping group by location_ID) group by location_id

posted on Tuesday, November 11, 2003 9:33:48 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Monday, November 10, 2003

Gentlemen, Start your Word Processors


I am one of three authors of the Microsoft Press book on Developing/Programming for SQL Server “Yukon” due out when the product ships. Last night I met with fellow authors Andrew Brust and Bill Zack at Andrew’s house and discussed the final outline, chapter assignment and writing schedule. Bill has written an article on the new SQL Server Service Broker for SQL Server magazine, so look for that in the March issue and I have written and article for MSDN magazine for the February issue on the new TSQL improvements, IDE and CLR Stored Procedures. These of course are excepts from chapters, so the writing process has officially begun.


This is going to be a great book since we will target .NET developers more than the DBA, while covering all the administrative features and tools. Since performance is as much of a developer concern as DBA concern, expect lots on performance tuning and optimization. I can’t post the outline and sample chapters here just yet (stay tuned, one day I can), but I can tell you we cover everything from soup to nuts. I was assigned (actually asked) for the chapter on XQuery, XML and the XML Datatype. Clemens must find that so funny!

posted on Monday, November 10, 2003 4:10:13 PM (Eastern Standard Time, UTC-05:00)  #    Comments [2] Trackback
# Friday, November 7, 2003

Movin' On Up

Like George and Wese. Today is moving day.

Not sure how much Linda will miss me, but Andrew must be happy to get his room back.

posted on Friday, November 7, 2003 5:13:35 PM (Eastern Standard Time, UTC-05:00)  #    Comments [1] Trackback