One is the cam position sensor, one is for the knock sensors, and I don't remember there being a third under there but I was focused on the cam sensor when I was in there recently. Regardless, in your photo you show the connection point. The connectors from the main harness have a locking device that's the wire loop that runs across the top of the connector (see yellow arrows). Press inward towards the connector body and pull that connector away from the mating connector and it should be free from the motor. The sheet metal bracket that supports the connectors holds the connector side that goes to the sensors mounted to the engine.
2006 Z4 3.0si Sport Package (But I'll still hang with my "homies" in the E36 forum)
Last edited by dc_wright; 12-29-2012 at 08:44 PM.
Reason: Added arrows to photo