Yup... heh I was wondering how it would help to have two databases on the same servers rather than one.
In that case, just copy the code from global.php that starts $DB_site, and duplicate it using $DB_attach... then use that new object when selecting stuff from attachment table, although you will have problems with JOINs.