Having had WAY too much experience with the issue:
For carpets, use a carpet shampooer like the ones Bissell makes, that inject and vacuum up water, to remove as much of the urine as you can. Then treat with Nature's Miracle (which is as good as anything else I tried, although I didn't use Sink the Stink) and put a damp towel over the area overnight. The longer it stays wet, the longer the enzymes work on the odor. NOTHING will take the smell completely out of the padding under the carpet.
For upholstery, clean as best you can (I actually bought a small upholstery attachment for my carpet cleaner) if the fabric is water-tolerant. I put Nature's Miracle in a spray bottle and used that to drench the area of the stain. I didn't worry about color-fastness, because the fabric is ruined anyway and usually discolored as well.
Be prepared that, when you eventually lose the cat, you will have to have everything you own reupholstered and the carpets replaced, or any future cat is likely to begin to use the same spots to pee in.
A black light helps a ton with locating the pee in places where you can't easily spot it.
I bought Nature's Miracle by the gallon . . . sigh.