1. Post the specific codes. If you have the Pxxxx codes post them, if you have the BMW specific codes, even better.
2.An O2 sensor code is not necessarily a bad O2 sensor... knowing the other codes, maintenance, etc is essential.
3. Do you have an M5 or an 540 Mpack?
Keep it as simple as possible...but no simpler.