In 2 Samuel 7:1–2. After David had become well settled in Jerusalem and was enjoying a period of peace, his thoughts turned to the idea of building a more permanent structure in which the Lord could reside among His people. The tent, he felt, was no longer suitable, especially in comparison with his own elaborate palace of cedar (2 Samuel 5:11).
In 2 Samuel 7:3–17. Having communicated his desires to the Prophet Nathan, whose initial response was favorable, David soon learned that his intentions were premature. Since the Exodus the Lord had resided among the people in a temporary structure. There was no need now for anything different. In fact it was not God’s will for David to build Him a house; instead God would build a house for David! (v. 11) God had called David from inauspicious beginnings to be a shepherd of God’s people (v. 8).
Likewise, God had gathered Israel to Himself and would plant them securely in their own land. The house to be built for David would be a royal house, a dynasty of kings. It would originate with him but would never end (2 Samuel 7:16). The kingdom and its throne would be permanent, a realm over which the Son of David would reign forever (cf. 23:5).