db script and services