Welcome to the forum, I presume it an E89?
There are several posts on here regarding roof problems, try using the search function with a few key words, basically to manually raise the roof you need to open a screw (only 1/2 turn, if I remember correctly)on the pump to relieve the hydraulic pressure, then you need a special tool (a long bar with an Allen key end) to undo the locks and then the rear shell can be lifted evenly from both sides.
Alternatively I believe a wire or two can be jumped on the convertible roof module, using the working micro switch to trick the car that both are working.
Good luck.