I had the same problem with my 2.0 08 Z4 and took it to BMW who quoted £3,600- to replace the cat, lambda sensors and associated wiring. I saw on the forum someone who suggested adding half a bottle of redex to a full tank of petrol and give it a really good run. We were going to Scotland anyway-about 400 miles. After 2 hours the emissions light went off and only returned 9 months later. I checked the emissions at my local indy who said it was fine added more redex and it went off again after 2 days and has not reappeared.
Hope this is helpful.