Upvote:0
Is your D visa really restricted to Denmark? That would be rather unusual.
If it actually is, you will need another Schengen visa valid for Germany to transfer to an intra-schengen flight in Germany.
Upvote:2
This official page states:
All residence permits issued by the Danish immigration authorities in the form of a residence sticker, or a residence card, which is valid for Denmark, is also valid for entering and staying in other Schengen countries.
Based on that it seems unlikely that you're right that your visa is valid only for Denmark. What exactly makes you conclude that?