I've seen in book 'Testing Statistical Hypotheses' by Lehmann that

Sqrt(n-2) * R / Sqrt( 1 - R^2 ) ~ t(n-2)

where
R = S(XY) / Sqrt( S(XX) * S(YY) );
Xi, Yi ~ N(m, s^2) are independed variables

I'm interested how to get distribution of R?