I have the sql to check for blocks; however , it is per server or per database?
Given it is SQL access I would presume it is per-table, which are per-database. Seems easy enough to test...since you haven't shown the SQL for others to evaluate.
This would mean that Ineed a list first and then cycle through.