Benchmark IT Consulting Rotating Header Image

Another Reason SQL 2000 should just go away! :)

Quick without looking it up… what does this script do:

SELECT *
FROM   dbo.sysfiles 
WHERE  (status 0x40) <> 0

So if you’re like me and don’t have all the bit compares memorized for all the tables you probably didn’t know that this is how (in SQL 2000) you would query the current database to find all the transaction log files. 

Every now and again I take for granted the major jump that was SQL 2000 to SQL 2005 and little things like this just show me how much happier I am working in a SQL 2005/2008 environment. 

Let me channel my inner Naughty By Nature here:

You down with DMV…. yeah you know me
You down with DMV… yeah you know me

(Sorry I’m still hurting from not winning SQL Fool’s Rap Contest  )

DAMN YOU  My humble congratulations to Steve “Flavor Flav” Jones

stevejones

Now if you were to come across this code:

SELECT 

FROM   sys.database_files

WHERE  type_desc 'LOG'

Wouldn’t you have a much better idea as to what the query is trying to accomplish?

Anyways just another (albeit small) reason why I’m glad to be leaving SQL 2000 in the past.

Enjoy!!

Post to Twitter Post to Delicious Post to Digg Post to StumbleUpon

Leave a Reply

Twitter links powered by Tweet This v1.6.1, a WordPress plugin for Twitter.