  The giant molecular cloud Sagittarius B2 (hereafter SgrB2) is the most
massive region with ongoing high-mass star formation in the Galaxy. Two
ultra-compact HII (UCHII) regions were identified in SgrB2's central hot cores,
SgrB2(M) and SgrB2(N). Our aim is to characterize the properties of the HII
regions in the entire SgrB2 cloud. Comparing the HII regions and the dust
cores, we aim to depict the evolutionary stages of different parts of SgrB2. We
use the Very Large Array in its A, CnB, and D configurations, and in the
frequency band C (~6 GHz) to observe the whole SgrB2 complex. Using ancillary
VLA data at 22.4 GHz and ALMA data at 96 GHz, we calculated the physical
parameters of the UCHII regions and their dense gas environment. We identify 54
UCHII regions in the 6 GHz image, 39 of which are also detected at 22.4 GHz.
Eight of the 54 UCHII regions are newly discovered. The UCHII regions have
radii between $0.006 {\rm pc}$ and $0.04 {\rm pc}$, and have emission measure
between $10^{6} {\rm pc\,cm^{-6}}$ and $10^{9} {\rm pc\,cm^{-6}}$. The UCHII
regions are ionized by stars of types from B0.5 to O6. We found a typical gas
density of $\sim10^6-10^9 {\rm cm^{-3}}$ around the UCHII regions. The pressure
of the UCHII regions and the dense gas surrounding them are comparable. The
expansion timescale of these UCHII regions is determined to be $\sim10^4-10^5
{\rm yr}$. The percentage of the dust cores that are associated with HII
regions are 33%, 73%, 4%, and 1% for SgrB2(N), SgrB2(M), SgrB2(S), and
SgrB2(DS), respectively. Two-thirds of the dust cores in SgrB2(DS) are
associated with outflows. The electron densities of the UCHII regions we
identified are in agreement with that of typical UCHII regions, while the radii
are smaller than those of the typical UCHII regions. The dust cores in SgrB2(N)
are more evolved than in SgrB2(DS) but younger than in SgrB2(M).
