2. The number of positive integer solutions to the system of equations $\left\{\begin{array}{l}x y+y z=63, \\ x z+y z=23\end{array}\right.$ is ( ).
(A) 1
(B) 2
(C) 3
(D) 4
2. B.

Since $x, y, z$ are all positive integers, we have $x+y \geqslant 2$. Since 23 is a prime number, and $z(x+y)=23$, it follows that $z=1, x+y=23$.
Substituting these into the first equation yields $y^{2}-24 y+63=0$. Solving this, we get $y_{1}=3, y_{2}=21$.