# Regular in codim one scheme and DVR

Let $X$ be a noetherian integral (separated) scheme which is regular in codimension one. Let $Y$ be a prime divisor and let $\eta$ be the generic point of $Y.$ It seems I am missing something easy but why $\mathcal{O}_{X, \eta}$ is a DVR with the quotient field the function field of $X?$

And when it is said, $X$ is regular (non-singular) of codimension one, does it follow from the definition that the local ring of a codimension one closed subscheme is regular in general? (otherwise, the terminology doesn't make sense to me!)

-

$\mathcal{O}_{X,\eta}$ is a regular local $1$-dimensional noetherian domain. It is a Theorem in commutative algebra which says that this is precisely a DVR.
If $X$ is an arbitrary integral scheme and $x \in X$, then the quotient field of $\mathcal{O}_{X,x}$ is the function field of $X$. Namely, since this a local issue, we may assume $X=\mathrm{Spec}(A)$ for some integral domain $A$, and just have to observe that $\mathrm{Quot}(A_{\mathfrak{p}}) = \mathrm{Quot}(A)$ for every prime $\mathfrak{p} \subseteq A$.
Dear Martin, I am aware of the theorem, but why it is of dimension $one?$ –  Ehsan M. Kermani Oct 26 '12 at 7:36
The dimension of $\mathcal{O}_{X,x}$ is the codimension of $\overline{\{x\}}$ in $X$ (which is also called the codimension of $x$). –  Martin Brandenburg Oct 26 '12 at 8:13