posts - 219, comments - 411, trackbacks - 27

My Links

Advertisement

News

Follow billgraziano on Twitter

Article Categories

Archives

Post Categories

Consulting

SQL Server

September 2003 Blog Posts

Testing Triggers

I hate testing triggers.  It's a pain to figure out what's going on inside the code.  Especially when you're dealing with the inserted and deleted tables.  There are two great tricks I always forget.  The first is the SQL Debugger built into Query Analyzer.  Create a stored procedure to make the database change that fires the trigger.  Call this procedure in the debugger and it will step through the procedure AND the trigger(s).  The second trick is that Profiler can show you each statement inside a stored procedure that executes.  And this also shows each statement that executes inside a...

posted @ Monday, September 29, 2003 11:04 AM | Feedback (0) | Filed Under [ SQL Server Stuff ]

Code like building contractors?

I recently found an article comparing software development to the construction industry. Here's the response to a software developer who said he wanted to write software like people construct buildings: I started to explain: "In software development, we are told we should manage our projects like construction projects, where a building is designed at the start, cost and schedule are predictable, and customers get what they expect." Silence. "You're kidding, right?" "No, honest, that's what we're told." Incredulity turns to laughter. The idea that programmers would want to manage projects like the construction industry strikes my classmates as ludicrous. This is...

posted @ Saturday, September 27, 2003 10:48 AM | Feedback (1) | Filed Under [ Software Development ]

Always use SCOPE_IDENTITY()

As I make changes to an application I'm reminded how ugly @@IDENTITY is.  We're using triggers to add some rudimentary data synchronization to this application.  The application inserts a record, we capture it in the trigger and go put a copy in the new table.  Except that the trigger sets a new value for @@IDENTITY when it fires.  So our quick changes that weren't going to affect anything are now much bigger than we planned.  Rather than doing this all at the database level we now have to open up the application and touch that code too.  Or find a...

posted @ Friday, September 26, 2003 9:46 AM | Feedback (0) | Filed Under [ SQL Server Stuff ]

Come to PASS

The PASS conference is in Seattle from November 10-14, 2003.  I'll be there and giving a talk on Profiler.  They'll have a detailed preview of Yukon and you get a free copy of Windows 2003 Enterprise Edition.  For half of that cluster in your basement.  You'd think they'd give us SQL Server too.  You can save $200 if you register by October 10th.

posted @ Thursday, September 25, 2003 9:15 PM | Feedback (0) | Filed Under [ Events ]

Welcome!

Welcome to the blogs at sqlteam.com!

posted @ Tuesday, September 23, 2003 8:38 PM | Feedback (2) | Filed Under [ Miscellaneous ]

Powered by:
Powered By Subtext Powered By ASP.NET