Now here's something truly useful - from Nick, a SQL query to get all documents in the DB. I can't tell you how many times I've needed this!
SELECT UserData.nvarchar7 AS Title, DirName AS Directory, LeafName AS DocName, Docs.Size AS Size
FROM Docs, UserData
WHERE (DoclibRowId > 0) AND Docs.ListID = UserData.tp_ListID AND Docs.DoclibRowId = UserData.tp_IDORDER BY Directory