Upvote:5
You need to go to the German consulate in Dubai. Checkout out this link here. I presume you would be requiring a type D visa.
The German Consulate in Dubai facilitates visa application process for applicants residing in Dubai, Sharjah, Ras-Al-Khaimah, Fujairah, Ajman or Umm-Al-Quwain.
The above link outlines some pointers which would be useful for your visa application. For more details also visit this website.