A question inspired by [Is the Euler characteristic a birational invariant](https://mathoverflow.net/questions/25922/is-the-euler-characteristic-a-birational-invariant):


As remarked in Mike Roth's answer to the above linked question, if $X$ and $Y$ are smooth projective varieties in characteristic zero that are birational, then there is a smooth $Z$
with morphisms $p: Z \rightarrow X$ and $q: Z \rightarrow Y$ that are both birational isomorphisms. 


Question: Is it possible to arrange for at least one of $p$ and $q$ that the locus in $Z$ where the morphism fails to be an isomorphism is of codimension at least $2$? 


Here it might be useful to assume that ${\rm dim}X={\dim Y} \geq 3$.



Birational correspondences and codimension where not an isomorphism
No it is not possible (see for instance Thm II:2.4 of Shafarevich: Basic Algebraic Geometry) which says that the exceptional locus is always of codimension $1$ provided the target is smooth. The crucial property is that the target variety be $\mathbb Q$-factorial. The example of Dmitri shows that this condition is necessary as the quadric cone is non-$\mathbb Q$-factorial at its apex. Note, however that in his example a $Z$ mapping to both $X$ and $Y$ will contract a divisor. An example is the blowup of the singularity whose exceptional locus is $\mathbb P^1\times \mathbb P^1$ and the mappings to $X$ and $Y$ restrict to projections on the two factors (and indeed any common map factors through that blowing up).


