Attach the correct database.