What is a secondary dominant?
Soprano: C5 - C5 - D5 - D5 - C5
Alto: E4 - E4 - F4 - G4 - E4
Tenor: G3 - A3 - A3 - B3 - G3
Bass: C3 - A2 - D3 - G2 - C3
Progression: I - vi - ii - V - I
A circle of fifths progression: iii - vi - ii - V - I
We have a ii - V voicing in C major. The same voiceing creates a V - I in G major, the only difference being the change in key signature (F#).
When we borrow the V chord for a dominant function from a different key, it’s called tonicization. DO NOT label it as a II. We label based on function, and the function here is a secondary dominant: using the dominant from another key to create a false tonicization to a different key. We don’t modulate, it takes your ear to a different tonic for two beats.
A II spelling is written V/V. It may look like a II, but it functions as the dominant to the V in the home key. This is an essential part of chromatic harmony.
Take the same soprano and bass lines from before, but alter the ii to be a ii7.
Soprano: C5 - C5 - D5 - D5 - C5
Alto: E4 - E4 - F4 - G4 - E4
Tenor: G3 - A3 - C4 - B3 - G3
Bass: C3 - A2 - D3 - G2 - C3
Progression: I - vi - ii7 - V - I
To use a secondary dominant, raise the F in the alto voice to an F#. This gives you a V7/V moving to a V in the next chord.
Where else in this example can you put a secondary dominant? The progression is I - vi - ii7 - V - I. We already have a V - I in the key, and we just made a V/V - V from the ii7. Our only other option is to turn the vi into a secondary dominant by raising the third of the chord.
This leaves us with a A - D-7, or a V/ii.
The top figure in the secondary dominant is the dominant chord. The bottom figure is where you are borrowing the chord from.
Take a chord progression: I - V7/vi - vi - ii - V7 - I In F: F - A7 - Dm - Gm - C7 - I