A correlator of the vector current of a heavy quark
is computed analytically near threshold
in the next-to-next-to-leading order in perturbative and relativistic
expansion that
includes $\al_s^2$, $\al_sv$ and $v^2$ corrections
in the coupling constant and velocity of the heavy quark
to the nonrelativistic Coulomb approximation.
Based on this result, the numerical values of the $b$-quark pole mass
and the strong coupling constant are determined
from the analysis of sum rules for
the $\Upsilon$ system.