cms database connection and working environ