In this paper, I treat quadratic equation over associative $D$-algebra. In quaternion algebra $H$, the equation $x^2=a$ has either $2$ roots, or infinitely many roots. Since $ain R$, $a<0$, then the equation has infinitely many roots. Otherwise, the equation has roots $x_1$, $x_2$, $x_2=-x_1$. I considered different forms of the Vietes theorem and a possibility to apply the method of completing the square. In quaternion algebra, there exists quadratic equation which either has $1$ root, or has no roots.