2. The range of $a$ for which the equation $\sqrt{a-x^{2}}=\sqrt{2}-|x|(a>0)$ has unequal real roots is ( ).
(A) $0<a<1$
(B) $0<a \leqslant 1$
(C) $a>0$
(D) $a \geqslant 1$
2. (D).

Squaring both sides of the given equation, we get
$$
\begin{array}{l}
a-x^{2}=2+x^{2}-2 \sqrt{2}|x|, \\
2 x^{2}+2-a=2 \sqrt{2}|x| .
\end{array}
$$

Squaring again and rearranging, we obtain
$$
4 x^{4}-4 a x^{2}+a^{2}-4 a+4=0 \text {. }
$$

It is easy to see that when $x \neq 0$, if $x$ is a root of equation (1), then $-x$ is also a root of (1).
From (1), we can transform it into $\left(2 x^{2}-a\right)^{2}=4 a-4 \geqslant 0$.
Thus, $a \geqslant 1$, at which point $x^{2}$ must be a positive root, thus meeting the requirement.
When $x=0$, $a=2$, at this time the equation still has two real roots $x=$ $\pm \sqrt{2}$, which still satisfies the condition $a \geqslant 1$.