AN EXCURSIS ON THE DIVINE NAME
The Hebrew language was originally written without vowels. This is not nearly the handicap that you might imagine. Chncs r y cn rd ths sntnc jst fn. I'm told, by sources I trust, that modern Israeli newspapers are still printed without vowels.
Beginning in the 8th century CE, Jewish scholars started to add masorah to the Hebrew text of the Bible. Masorah are symbols written above and below the consonantal text which indicate, among other things, the vowels that should be supplied in oral reading. The Masoretic Text, as it is called, is the authoritative Hebrew Bible for Jewish people. This doesn't mean that there are no textual issues in the Masoretic Text. There are, in fact, numerous places where the Hebrew is unclear. Translators often have to emend their work by referring to other sources such as the ancient Greek translation called the Septuagint.
In these "Year of Blogging Biblically" posts I have used the four letters YHWH to represent the name of God. This is a transliteration of the so-called Tetragrammaton, that is, the Hebrew letters Yod, He, Va, He. These are the consonants of the name by which God revealed himself to Moses in Exodus 3:14.
There is an old tradition that avoids pronouncing the name of God. That is why I omit the vowels from YHWH. It is a sign of respect for God and a pretty certain way to avoid taking the name "in vain." It keeps God's name from being trivialized (as the name of Jesus, when used as a thoughtless exclamation, so often is). I think it says something about God's ineffable nature, as well.
There is a convention among Jews, when the Scriptures are read aloud, to substitute the word Adonai (meaning "Lord") for YHWH*. This convention was observed by the translators of the King James Bible who substituted the word Lord (written in small capital letters) for YHWH.
Many modern English versions of the Bible still follow this convention from the KJV. For the most part it is effective, but there are a few instances where the Hebrew text refers to God as "Adonai YHWH." Rendering this as "Lord Lord" just seems awkward. In these cases the Masoretic text used the marks for "Elohim" (Hebrew for "God") with the consonants YHWH indicating that the phrase should be read aloud as "Adonai Elohim." Many English versions phrase "Adonai YHWH" as "Lord God" (with the small caps indicating that here "God" stands for the divine name).
Complicating this just a little is the fact that sometimes the Hebrew Bible refers to God as "Adonai Elohim," that is "Lord God."
Which brings me at last to the peculiarity in David's prayer from 2 Samuel 7:18 ff. In Hebrew David addresses God as both "Adonai YHWH" and "Adonai Elohim." In many English translations, the only way to know which is which is by paying attention to the word written in small caps. Is it "Lord God" or "Lord God?"
*To indicate that Adonai should be read for YHWH the Masoreh for Adonai were added to the Tetragrammaton. It's a convoluted process, but adding the vowels from Adonai to YHWH resulted in the word "Jehovah" which many groups still use for the divine Name.