Attach database