2 Samuel peaks when [God] entrusts his kingdom forever to the house of David. [But the next section] of 2 Samuel tests that covenant. God’s other covenants – the Noahic, Abrahamic, Sinaitic, and new – are immediately tested by the failure of its beneficiaries: Noah got drunk; Abraham in unbelief fathered a child by Hagar; Israel worshiped a golden calf; Peter denied Jesus Christ. Shortly after the David covenant, David took away a wife’s purity and murdered her husband, but in spite of David’s gross sin and its contribution to his psychological decline, God’s unconditional covenant with David stands. David’s sin and spiritual funk point to a greater son of David, the Son of God whose eternal person sits on the heavenly throne of which David’s earthly throne in Jerusalem is a type. He fulfills the Davidic covenant.
An Old Testament Theology, Waltke, pg. 654-655