Make db connection protected