Setting db flag