Depending on the severity of the stain,you may have to do something fairly radical to get rid of the stain, odor and health hazard.
I just replaced capreting throughout a rental house due to mass quantities of dog urine. In this case, the carpet, was soaked, the pad was soaked, and some parts of the sub-flooring were soaked. I ended up having to replace about 300 Sqft of subflooring, where the urine stains were worst.
In my case, anything less would have been inadequate, and would have left the house un-inhabitable.
There is a product I used on the 'not stained' sub flooring to ensure I didn't miss a source of odor. It's called 'Urine Contamination Treatment' (or something like that). Runs about $15 a liter, and was available at a local janitorial supply place. The directions talk about treating carpets with it prior to 'standard' hot water carpet cleaning. Evidently, it kills the micro-organisms which are carried in the urine which then produce the odor (? this is what I was told... I'm not a biologist).
Hope your situation allows that (relatively inexpensive) approach.