D major

D major is a major scale based on D. Its key signature has two sharps. Its relative minor is B minor.
D major is good for violin music because of the structure of the instrument, which has its four strings tuned to G D A E. The open strings resonate with the D string, producing a special rich sound.
Because of this, many classical composers chose to write violin concertos in D major. Examples include Mozart's (No. 2, 1775, No. 4, 1775); Ludwig van Beethoven's (1806); Paganini's (No. 1, 1817); Brahms's (1878); Tchaikovsky's (1878); Prokofiev's (No. 1, 1917); Stravinsky's (1931); and Korngold's (1945).
It is also suitable for guitar music, with drop tuning for the lowest string making two Ds as open strings.
For some beginning wind instrument students, however, D major is not a very good key, because it transposes to E major for B flat instruments. E major has four sharps, which is harder for new learners to play.
Still, the clarinet in B-flat is often used for music in D major. It is probably the key with the most sharps that it can play well. However, when some composers write a piece in D minor with B-flat clarinets, they change to clarinets in A if the music changes to D major.
Most tin whistles are in D, because they are often used in music with fiddles.
In the Baroque period, D major was seen as "the key of glory"; so many trumpet pieces were in D major. Examples include concertos by Fasch, Gross, Molter (No. 2), Leopold Mozart, Telemann (No. 2), and Giuseppe Torelli; sonatas by Corelli, Franceschini, Purcell, Torelli; and "The Trumpet Shall Sound" and the "Hallelujah" chorus from Handel's "Messiah".
After the valve trumpet was invented, composers began to write for trumpet in keys with more flats, so Haydn wrote his famous trumpet concerto in the key of E-flat major.
23 of Haydn's 104 symphonies are in D major, making it the most often used main key of his symphonies. A great number of Mozart's unnumbered symphonies are in D major, namely K. 66c, 81/73, 97/73m, 95/73n, 120/111a and 161/163/141a. The symphony came from the overture, and "D major was by far the most common key for overtures in the second half of the eighteenth century."
Scriabin saw D major as golden in color and when he talked to Rimsky-Korsakov, he gave an example from one of Rimsky-Korsakov's own operas where a character sang in D major about gold.