Question: My 2006 pontiac g6 3.5L has p0056. I just put a new bank 2 sensor 2, and the light came back right away. What could be wrong ????
Answer: The code you are having is for the heater circuit on the oxygen sensor as opposed to the reading are wrong- rich or lean.
Each sensor has a heater element inside to warm it up quicker for better fuel control and emissions. If the sensor did not fix it, you may just have a blown fuse, since the heater is on it's own circuit.
If the fuse is good, you are going to have to check for a bad wire. The purple wire at the sensor connector is the power feed, so with a test light it should be hot with the key on.