Appeal from a judgment of the County Court of Montgomery County (Catena, J.), rendered July 9, 1999, convicting defendant upon his plea of guilty of the crime of sodomy in the first degree.
In exchange for a determinate sentence of eight years in *865prison, defendant waived indictment and pleaded guilty to a superior court information charging him with sodomy in the first degree. As a part of the negotiated plea agreement, defendant waived his right to appeal all issues including the severity of his sentence. Following a sentencing hearing, County Court sentenced defendant to the agreed-upon prison term and this appeal ensued.
Initially, we are not persuaded that County Court erred in failing to sua sponte order a psychological examination of defendant prior to imposing sentence. The deviant nature of defendant’s crime and his mental health issues were insufficient to raise doubt as to defendant’s ability to understand the proceedings inasmuch as defendant was able to actively participate in the proceedings in a coherent and meaningful manner and unequivocally stated during the plea allocution that he understood the court’s instructions (see, People v Troiano, 200 AD2d 914, 915, lv denied 83 NY2d 1008; People v Palmer, 143 AD2d 469, 470, lv denied 73 NY2d 858; People v Clickner, 128 AD2d 917, lv denied 70 NY2d 644).
As for defendant’s assertion that County Court failed to conduct a sufficient inquiry to insure that he knowingly waived a potential intoxication defense, this argument is not preserved for our review because defendant failed to move to withdraw his guilty plea or to vacate the judgment of conviction (see, People v Moore, 270 AD2d 715, 716, lv denied 95 NY2d 800; People v Hicks, 201 AD2d 831, 832, lv denied 83 NY2d 911). However, were we to review defendant’s contention, we would find that such an inquiry was unnecessary. Finally, defendant’s knowing and voluntary waiver of the right to appeal encompassed his right to challenge the seiitence imposed as harsh and excessive (see, People v Hines, 263 AD2d 682, lv denied 93 NY2d 1019; People v Charles, 258 AD2d 740, lv denied 93 NY2d 968).
Cardona, P. J., Spain, Carpinello and Graffeo, JJ., concur. Ordered that the judgment is affirmed.