May 2004 Blog Posts

  • A few DBA Jokes - Lame factor high

    1 It is March 1st and the first day of DBMS school The teacher starts off with a role call.. Teacher: Oracle? "Present sir" Teacher: DB2? "Present sir" Teacher: SQL Server? "Present sir" Teacher: MySQL? [Silence] Teacher: MySQL? [Silence] Teacher: Where the hell is MySQL [In rushes MySQL, unshaved, hair a mess] Teacher: Where have you been MySQL "Sorry sir I thought it was February 31st" 2 Knock Knock Who's There? sp underscore sp underscore who? spid1, spid2, spid3.... 3 At the premier of the first ever database movie "The Relational Chainsaw Massacre", the crowd is waiting for the stars to arrive: The first limousine arrives and out steps Oracle followed by 4 people Interviewer: Who have you brought along? Oracle: I have 4 DBA's in tow....

  • Unique values, many NULLs - A Dodgy Constraint.

    I have seen several times people requesting to place a unique constraint on a column that should allow many NULLs but only allow unique values. Personally, I have never had to implement such a constraint, and when I see the question posed I assume it is needed because of a underlying design problem. This only works for SQL 2K (as you will see in a minute) and requires various SET commands to be in place both an DDL and DML time... The following solution places a UNIQUE constraint on a Computed column and according to BOL has restrict requirements... The ANSI_NULL connection-level option must...

  • GROUP BY DataTable Method - A SQLOps method

    The Expressions that can be formulated for a calculated column in a DataTable are a very handy thing. The problem is the aggregation operators only work for a parent-child relationship. This feature really stood out when I started working with the MSDE DBMS. The MSDE engine is a wonderful little animal, except for the built in work governor. Throttling back all queries when the governor is activated is the price you pay for a free DBMS. There are illegal ways to get around this, but why bother when you can do it on the client. Thanks to the SQLOps class I blogged about earlier, this processing...

  • The "Crazy George" - Not best practice but worked like a charm.

    Finally we replaced our Test server. A previous post outlined part of the discussion involved and the seriously twisted suggestion that a simple file copy of the entire data directory would be all that was required to bring the DBMS back up to its original state. Although I am sure that other people have done this, I would like to enter the phrase "Crazy George" as the term for this method in honor of the lunatic DBA who suggested, tested and finally proved to us that it worked. Process: The boxes where different - More and faster processors, more RAM,...