Adjusting database connection