2 Samuel 5-7 (ESV)
David Anointed King of Israel
5:1 Then all the tribes of Israel came to David at Hebron and said, “Behold, we are your bone and flesh. 2 In times past, when Saul was king over us, it was you who led out and brought in Israel. And the Lord said to you, ‘You shall be shepherd of my people Israel, and you shall be prince over Israel.’” 3 So all the elders of Israel came to the king at Hebron, and King David made a covenant with them at Hebron before the Lord, and they anointed David king over Israel. 4 David was thirty years old when he began to reign, and he reigned forty years. 5 At Hebron he reigned over Judah seven years and six months, and at Jerusalem he reigned over all Israel and Judah thirty-three years. 
6 And the king and his men went to Jerusalem against the Jebusites, the inhabitants of the land, who said to David, “You will not come in here, but the blind and the lame will ward you off”—thinking, “David cannot come in here.” 7 Nevertheless, David took the stronghold of Zion, that is, the city of David. 8 And David said on that day, “Whoever would strike the Jebusites, let him get up the water shaft to attack ‘the lame and the blind,’ who are hated by David’s soul.” Therefore it is said, “The blind and the lame shall not come into the house.” 9 And David lived in the stronghold and called it the city of David. And David built the city all around from the Millo inward. 10 And David became greater and greater, for the Lord, the God of hosts, was with him.
11 And Hiram king of Tyre sent messengers to David, and cedar trees, also carpenters and masons who built David a house. 12 And David knew that the Lord had established him king over Israel, and that he had exalted his kingdom for the sake of his people Israel.
13 And David took more concubines and wives from Jerusalem, after he came from Hebron, and more sons and daughters were born to David.14 And these are the names of those who were born to him in Jerusalem: Shammua, Shobab, Nathan, Solomon, 15 Ibhar, Elishua, Nepheg, Japhia,16 Elishama, Eliada, and Eliphelet.
David Defeats the Philistines
17 When the Philistines heard that David had been anointed king over Israel, all the Philistines went up to search for David. But David heard of it and went down to the stronghold. 18 Now the Philistines had come and spread out in the Valley of Rephaim. 19 And David inquired of the Lord, “Shall I go up against the Philistines? Will you give them into my hand?” And the Lord said to David, “Go up, for I will certainly give the Philistines into your hand.” 20 And David came to Baal-perazim, and David defeated them there. And he said, “The Lord has burst through my enemies before me like a bursting flood.” Therefore the name of that place is called Baal-perazim.  21 And the Philistines left their idols there, and David and his men carried them away.
22 And the Philistines came up yet again and spread out in the Valley of Rephaim. 23 And when David inquired of the Lord, he said, “You shall not go up; go around to their rear, and come against them opposite the balsam trees. 24 And when you hear the sound of marching in the tops of the balsam trees, then rouse yourself, for then the Lord has gone out before you to strike down the army of the Philistines.” 25 And David did as the Lordcommanded him, and struck down the Philistines from Geba to Gezer.
The Ark Brought to Jerusalem
6:1 David again gathered all the chosen men of Israel, thirty thousand. 2 And David arose and went with all the people who were with him from Baale-judah to bring up from there the ark of God, which is called by the name of the Lord of hosts who sits enthroned on the cherubim. 3 And they carried the ark of God on a new cart and brought it out of the house of Abinadab, which was on the hill. And Uzzah and Ahio,  the sons of Abinadab, were driving the new cart,  4 with the ark of God, and Ahio went before the ark.
Uzzah and the Ark
5 And David and all the house of Israel were making merry before the Lord, with songs  and lyres and harps and tambourines and castanets and cymbals. 6 And when they came to the threshing floor of Nacon, Uzzah put out his hand to the ark of God and took hold of it, for the oxen stumbled. 7 And the anger of the Lord was kindled against Uzzah, and God struck him down there because of his error, and he died there beside the ark of God. 8 And David was angry because the Lord had burst forth against Uzzah. And that place is called Perez-uzzah,  to this day. 9 And David was afraid of the Lord that day, and he said, “How can the ark of the Lord come to me?” 10 So David was not willing to take the ark of the Lord into the city of David. But David took it aside to the house of Obed-edom the Gittite. 11 And the ark of the Lord remained in the house of Obed-edom the Gittite three months, and the Lord blessed Obed-edom and all his household.
12 And it was told King David, “The Lord has blessed the household of Obed-edom and all that belongs to him, because of the ark of God.” So David went and brought up the ark of God from the house of Obed-edom to the city of David with rejoicing. 13 And when those who bore the ark of the Lord had gone six steps, he sacrificed an ox and a fattened animal. 14 And David danced before the Lord with all his might. And David was wearing a linen ephod. 15 So David and all the house of Israel brought up the ark of the Lord with shouting and with the sound of the horn.
David and Michal
16 As the ark of the Lord came into the city of David, Michal the daughter of Saul looked out of the window and saw King David leaping and dancing before the Lord, and she despised him in her heart. 17 And they brought in the ark of the Lord and set it in its place, inside the tent that David had pitched for it. And David offered burnt offerings and peace offerings before the Lord. 18 And when David had finished offering the burnt offerings and the peace offerings, he blessed the people in the name of the Lord of hosts 19 and distributed among all the people, the whole multitude of Israel, both men and women, a cake of bread, a portion of meat,  and a cake of raisins to each one. Then all the people departed, each to his house.
20 And David returned to bless his household. But Michal the daughter of Saul came out to meet David and said, “How the king of Israel honored himself today, uncovering himself today before the eyes of his servants’ female servants, as one of the vulgar fellows shamelessly uncovers himself!”21 And David said to Michal, “It was before the Lord, who chose me above your father and above all his house, to appoint me as prince over Israel, the people of the Lord—and I will make merry before the Lord. 22 I will make myself yet more contemptible than this, and I will be abased in your eyes. But by the female servants of whom you have spoken, by them I shall be held in honor.” 23 And Michal the daughter of Saul had no child to the day of her death.
God’s Covenant with David
7:1 Now when the king lived in his house and the Lord had given him rest from all his surrounding enemies, 2 the king said to Nathan the prophet, “See now, I dwell in a house of cedar, but the ark of God dwells in a tent.” 3 And Nathan said to the king, “Go, do all that is in your heart, for the Lord is with you.”
4 But that same night the word of the Lord came to Nathan, 5 “Go and tell my servant David, ‘Thus says the Lord: Would you build me a house to dwell in? 6 I have not lived in a house since the day I brought up the people of Israel from Egypt to this day, but I have been moving about in a tent for my dwelling. 7 In all places where I have moved with all the people of Israel, did I speak a word with any of the judges  of Israel, whom I commanded to shepherd my people Israel, saying, “Why have you not built me a house of cedar?”’ 8 Now, therefore, thus you shall say to my servant David, ‘Thus says the Lord of hosts, I took you from the pasture, from following the sheep, that you should be prince over my people Israel. 9 And I have been with you wherever you went and have cut off all your enemies from before you. And I will make for you a great name, like the name of the great ones of the earth. 10 And I will appoint a place for my people Israel and will plant them, so that they may dwell in their own place and be disturbed no more. And violent men shall afflict them no more, as formerly, 11 from the time that I appointed judges over my people Israel. And I will give you rest from all your enemies. Moreover, the Lord declares to you that the Lord will make you a house. 12 When your days are fulfilled and you lie down with your fathers, I will raise up your offspring after you, who shall come from your body, and I will establish his kingdom. 13 He shall build a house for my name, and I will establish the throne of his kingdom forever. 14 I will be to him a father, and he shall be to me a son. When he commits iniquity, I will discipline him with the rod of men, with the stripes of the sons of men, 15 but my steadfast love will not depart from him, as I took it from Saul, whom I put away from before you. 16 And your house and your kingdom shall be made sure forever before me.  Your throne shall be established forever.’” 17 In accordance with all these words, and in accordance with all this vision, Nathan spoke to David.
David’s Prayer of Gratitude
18 Then King David went in and sat before the Lord and said, “Who am I, O Lord God, and what is my house, that you have brought me thus far?19 And yet this was a small thing in your eyes, O Lord God. You have spoken also of your servant’s house for a great while to come, and this is instruction for mankind, O Lord God! 20 And what more can David say to you? For you know your servant, O Lord God! 21 Because of your promise, and according to your own heart, you have brought about all this greatness, to make your servant know it. 22 Therefore you are great, O Lord God. For there is none like you, and there is no God besides you, according to all that we have heard with our ears. 23 And who is like your people Israel, the one nation on earth whom God went to redeem to be his people, making himself a name and doing for them  great and awesome things by driving out  before your people, whom you redeemed for yourself from Egypt, a nation and its gods? 24 And you established for yourself your people Israel to be your people forever. And you, O Lord, became their God. 25 And now, O Lord God, confirm forever the word that you have spoken concerning your servant and concerning his house, and do as you have spoken. 26 And your name will be magnified forever, saying, ‘The Lord of hosts is God over Israel,’ and the house of your servant David will be established before you. 27 For you, O Lord of hosts, the God of Israel, have made this revelation to your servant, saying, ‘I will build you a house.’ Therefore your servant has found courage to pray this prayer to you. 28 And now, O LordGod, you are God, and your words are true, and you have promised this good thing to your servant. 29 Now therefore may it please you to bless the house of your servant, so that it may continue forever before you. For you, O Lord God, have spoken, and with your blessing shall the house of your servant be blessed forever.”