BMW Sunroof / Moonroof Repair
This is perhaps the most common problem in the BMW e46: Broken sunroof shade. I've had mine just a few weeks and already the sunroof shade has come off the tracks! The plastic bits broke off and fell out into the tracks. Now it's hopeless, really hard to move and wobbles in place.
Basically what happens is this: The sun bakes the inner workings of the BMW sunroof, to the point where the lubricants in the shade track become sticky and the shade slows down. The retractor runs along a track on one side of the shade - not down the middle as a human would push it. With all force applied on just one side of the shade, the sunroof shade binds sideways like a loose sweater drawer.
If you have a 325i / 330i, just remember: the BMW e46 sunroof and shade need to be lubricated every few years. Because the moonroof is glass, the interior parts get extremely hot under sunlight.
The following has been adapted from http://www.bmwfanatics.org/forums/archive/index.php/t-50895.html. I went through this myself and added the photos and changed a few things...
Buy New Parts
If your BMW e46 sunroof shade is stuck, or wobbling, or won't close properly, you need new clips. Buy the clips first, I guarantee you 99% this is the problem. The clips are marked "89330 3/5" and "89330 2/4". Cost at my BMW dealer was something like 12 USD for the set.
Apply vehicle power and open the sunroof in the up-forward position (not sliding back).
From inside the car, use a Torx driver to remove 6 screws on the left and right sides of the glass frame. Lift the glass up and out of the car roof.
Look for the Clips
Look very carefully all around the shade tracks for pieces of broken clips.
On the passenger side, there are two spring clip assemblies that are used to maintain position when the shade slides along the track. These parts are essential, though they aren't the ones that break. Usually they pop out by springs and are found lying down inside the tracks.
On the driver side, you will find the two broken clips that match the ones you've bought from the BMW dealer (that was step 1). This is the cause of failure: The power retractor (A) is very thin and can break over the top of the shade clip (B). When it does that, it gets behind clip (B) and is unable to pull the shade open. Another cause of failure is that the front clip becomes so worn that it doesn't follow the track. This is the part you're replacing.
Lubricate the Tracks
Remove the shade, and clean out the tracks. You want to get out all dirt and grime, making the tracks as clean as possible. Use a light grease inside the shade tracks but be careful not to get the shade edge greasy.
Also, it makes sense to lubricate the mechanisms that raise and lower the glass roof.
Insert the passenger side of the shade in place first. Make sure both thin sliders are inserted properly into the track. After that is done, lay the drivers side down. You are now ready to install the fastened clips on the drivers side. Install the front side first. Carefully work the new clip between the shade and the slide, and wedge it to its proper seat. Install both screws, but do not overtighten. They should be "snug". Now do the same for the rear, but insert the new clip from the rear side of the sunshade. With both new sunshade clips in place, the retractor slider must be ahead of the rear sunshade slide. Screw the rear shade slide in place. You may now test the operation of the sunshade manually. Make sure to slide it all the way forward and all the way back, checking to make sure there is no blockage.