You need to reset the light with a OBD2 scan tool, after a repair. If you did reset the light and it just came back on, then you have not found the problem. Remember when reading codes, the code does not tell you what component is bad. It only tells you what component is being effected.
Unfortunately there is no fixing an O2 sensor. If the "check engine" light is on due to an O2 sensor, it can only be remedied by replacing the bad sensor.
I had all sensors replaced in my 03 Trailblazer and the check engine light stiil comes on. Why?
Replacing the water pump will not cause the check engine light to come on. Either it is a coincidence or you have accidentally disconnected a wire or damaged a sensor somehow.
If it is bad, replacing it will help with the vehicles emissions and put out the check engine light.
The check engine light would illuminate and set a code for the bad O2 sensor.
There is another cause for the code.
Check engine light will come on for various reasons. The o2 sensors could be one of them. If your belt breaks the light will come on and the engine will over heat. I mentioned the o2 sensor because when it comes on for this reason some people have had that light on for years without replacing the sensor.
You should have a check engine light illuminated. If so check the codes.
disconnect the negative battery cable for 30 seconds
Your O2 sensor is a "part that is designed to wear out". there is no standard on replacing them, but if your car is running fine, and your check engine light comes on, and stays on, it's probably an O2 sensor.
If the o2 sensor is bad, replace it. If the sensors are activating the check engine light, then the codes should be checked. The catalytic converter could be blocked or the engine may not be running properly.
THE CHEAP WAY.... DISCONNECT THE BATTERY FOR A MINUTE OR SO. JOSE