Extract db2 utilities into db2.py