Distributed: fixed issue #2008 on deploying database