Quoting Commentary for II Samuel 22:1

וַיְדַבֵּ֤ר דָּוִד֙ לַֽיהוָ֔ה אֶת־דִּבְרֵ֖י הַשִּׁירָ֣ה הַזֹּ֑את בְּיוֹם֩ הִצִּ֨יל יְהוָ֥ה אֹת֛וֹ מִכַּ֥ף כָּל־אֹיְבָ֖יו וּמִכַּ֥ף שָׁאֽוּל׃

And David spoke unto the LORD the words of this song in the day that the LORD delivered him out of the hand of all his enemies, and out of the hand of Saul;

Rashi

A shiggayon of David Menachem says (p. 170) that this, too, is one of the names of a melody named for the instrument, and so he explained “on shigyonoth,” [in Habakkuk 3:1]. But our Sages (Mid. Ps. 7:18) explained it as an expression of error, that he confessed and prayed about the error that he had [committed by] reciting a song upon Saul’s downfall, as it is stated (in II Sam. 22:1): “And David spoke to the Lord, etc.” The contents of the psalm, however, do not indicate this, because it speaks of the nations (in verse 9): “May the Lord judge the peoples.” I, therefore, say that he recited it concerning Ishbi in Nob (II Sam. 21:16), who came upon him as a punishment for Saul; as our Rabbis explained, that the Holy One, blessed be He, said to him, “Through you, Doeg the Edomite was banished; through you, Saul and his sons were slain, etc.” as is stated in “Chelek” (Sanh. 95a). The errors that David asked of the Holy One, blessed be He, [were] that he [himself] be delivered into the hands of his enemies and that his descendants should not be destroyed. (The last sentence does not appear in all editions.) [Therefore, because his life was endangered,] David reversed his prayer and prayed that he should not fall into the hands of his enemies. Now this is its meaning: An error that David sang to the Lord because he had erred in saying to the Holy One, blessed be He, to deliver him into the hands of his enemies on account of Saul, who was slain because of him. Another explanation: Concerning the error of the skirt of Saul’s coat, which he had severed.
Ask a RabbiBookmarkShareCopy

Tze'enah Ure'enah

[II Samuel, 22:1–50]
Ask a RabbiBookmarkShareCopy

Tze'enah Ure'enah

[II Samuel, 22:1–22:50]
Ask a RabbiBookmarkShareCopy