"And as the light of morning the sun rises" (2 Samuel 23:4). We do not know what is meant by "And as the light of morning the sun rises," but rather, when the Holy One, blessed be He, lit up the morning of the Messiah, He made the sun shine, as it is written concerning him, "And his throne is as the sun before Me" (Psalms 89:37). "A morning without clouds" (2 Samuel 23:4) — this is the Messiah. Another interpretation: "A morning without clouds" — that he does not come through the merit of the fathers. Through whose merit does he come? Through the merit of the Torah. This is what is written: "For my house is not so with God, yet He has made with me an everlasting covenant, etc." (2 Samuel 23:5). "Ordered in all" (2 Samuel 23:5) — in Babylonia; "and kept" — in Media; "for all my salvation and all my desire" — in Greece; "for it shall not sprout" — in Edom; "but a man shall touch them, etc., they shall be utterly burned in their place" (2 Samuel 23:7) — this is the Great Sanhedrin of the Chamber of Hewn Stone.
The Messiah's Dawn and the Merit of Torah in Midrash Shmuel
Midrash Shmuel 29:3
וכאור בקר יזרח שמש (שם שם ד'), אין אנו יודעין מהו וכאור בקר יזרח שמש, אלא כשהאיר הקדוש ברוך הוא בוקרו של משיח הזריח שמש, דכתיב ביה וכסאו כשמש נגדי (תהלים פ"ט ל"ז). בקר לא עבות (שמואל ב' שם) זה משיח. דבר אחר בקר לא עבות, שלא בא בזכות אבות, בזכות מי הוא בא, בזכותה של תורה הדא הוא דכתיב כי לא כן ביתי עם אל כי ברית עולם שם לי וגו' (שם), ערוכה בכל (שם) בבבל, ושמורה במדי, כי כל ישעי וכל חפץ ביון, כי לא יצמח באדום ואיש יגע בהם וגו', שרוף ישרפו בשבת (שם שם ז') זו סנהדרי גדולה של לשכת הגזית.