Example where $\operatorname{grade}(I,M)>\operatorname{height} I$ Let $I$ be an ideal of a noetherian ring $R$ and let $M$ be a finite $R$-module. We need to show if $I$ is generated by $n$ elements, then $\operatorname{grade}(I,M)\le n$. Could any one give an example where $\operatorname{grade}(I,M)>\operatorname{height} I$?

This is basically the exercise 1.2.22 from Bruns and Herzog, Cohen-Macaulay Rings. In order to prove that $\operatorname{grade}(I,M)\le n$, show first that $\operatorname{grade}(I,M)\le \operatorname{height}(IR^*)$, where $R^*=R/\operatorname{Ann}M$. This is not difficult and involves few reductions: first we may assume that $\operatorname{Ann}(M)=0$. Then we can take $I$ to be a prime ideal (denoted by $\mathfrak{p}$) and localize at $\mathfrak{p}$: $\operatorname{grade}(\mathfrak{p},M)$ eventually increases, $\operatorname{height}(\mathfrak{p})$ remains the same and $\operatorname{Ann}_{R_{\mathfrak{p}}}M_{\mathfrak{p}}=0$. Now the inequality is obvious (see, for instance, Proposition 1.2.12 from the same book). Since the ideal $IR^*$ is also generated by $n$ elements, its height is $\le n$.
The required example can be: $R$ a local Noetherian ring, $\mathfrak{p},\mathfrak{q}$ minimal prime ideals such that $\mathfrak{p}\neq \mathfrak{q}$ and $\mathfrak{p}\cap \mathfrak{q}=(0)$, $I=\mathfrak{p}$ and $M=R/\mathfrak{q}$. Then $\operatorname{height}(I)=0$ and $\operatorname{grade}(I,M)\geq 1$. (A concrete example: $R=K[[X,Y]]/(XY)$.)
Remark. If $I$ is generated by $n$ elements and $\operatorname{grade}(I,M)=n$, then $I$ can be generated by $n$ elements that form an $M$-regular sequence.
