Sounds like you need a repair manual. If you need a part number, the dealer should be able to give it to you. Also, if a store like Autozone sells ACDelco, then you should be able to get the correct part number from their database.
Oxygen sensors are pretty simple. I use a special oxygen sensor socket tool to get mine out. You want the exhaust to be warm when you unscrew the old one. You need to torque the new one in properly - need a repair manual. Any repair manual should do, like Chiltons or Haynes.
As for the sunroof, you will probably need the factory service manual (from HELM) because the Chilton or Haynes won't have enough detail.
1999 540iA Sport
Former 93 SSEi Owner
Former 89 SE Owner