height of stalks of an ideal sheaf $\newcommand{\codim}{\operatorname{codim}}$Let $X$ be a scheme and $\mathcal{I}\subset \mathcal{O}_X$ an quasi-coherent ideal sheaf. Then $\mathcal{I}$ defines a closed subscheme $Z$. For any point $z\in Z$, I want to calculate the height of $\mathcal{I}_z$ in the case $Z$ is integral. In this case, $\mathcal{I}_z$ is a prime ideal.
I did some special case by using the fact that $\codim(Z,X)=\dim \mathcal{O}_{X,\eta}$, where $\eta$ is the generic point of $Z$, and I found out that: $$\operatorname{ht}(\mathcal{I}_z)=\codim(Z,X)\quad\quad (*)$$in some good situation, like $X$ is locally of finite type over $k$ and satisfies some catenary property. But I don't know if $(*)$ is correct if $X$ is only assumed to be locally Noetherian. Or do we need more conditions on $Z$, like normal, regular or something else?
 A: are you looking for the sheaf version of $$\textrm{ht}(\mathfrak{p}) + \textrm{dim}(A/\mathfrak{p}) = \textrm{dim}(A) $$ for $\mathfrak{p} \subset A$ prime? Because this is just $\text{ht}(\mathfrak{p})=\textrm{codim}(SpecA/\mathfrak{p},SpecA)$.
As you said, you need maybe $A$ to be a finitely generated $k$-algebra for this to hold.
As you already pointed out, on any locally Noetherian scheme $X$ and an irreducible closed subscheme $Z$ you have that $codim(Z,X)=dim(\mathcal{O}_{X,\xi})$ for $\xi$ the generic point of $Z$.
Here something about the codim $1$ case, I don't know much more:
If you just assume $X$ to be locally noetherian and $D$ an irreducible locally principal subscheme on it, then on an affine open $\textrm{Spec}(A)$, $D$ is defined by a local equation $f \in A$, so locally $D=\textrm{Spec}(A/f)$. If $\xi$ is the generic point of $D$, then this corresponds to $\mathfrak{p} \subset A$ such that $\mathfrak{p}$ is minimal over $f$, thus $$\textrm{codim}(D,\textrm{Spec}A)=\textrm{dim}(A_\mathfrak{p}) \leq 1$$ and $"="$ holds iff $f$ is a non-zero divisor in $A$, i.e. in scheme terms: $D$ is an effective Cartier divisor on $X$. $D$ is Cartier if e.g. X is regular or $\mathcal{O}_{X,z}$ is UFD for all $z \in D$ and $D$ has no embedded points.
