The D major scale is one of the first major scales you should learn. D major is a very common key choice for songs, and is often the first scale taught to string instrument players.
The key of D major has two sharps. The notes of the D major scale are D, E, F♯, G, A, B and C♯. All the open strings are part of the key and one of them is the root, making it nice for bass guitar.
If you learn the D major scale, you've learned the notes of some other scales as well (the modes of the D major scale). Most importantly, the B minor scale uses the same notes, making it the relative minor of D major. A song whose key signature has two sharps is most likely in D major or B minor.
In this article we will look at how to play a D major scale in various places on the fretboard. If you haven't already, you should read a little about bass scales and hand positions first.