מזמור שיר חנוכת הבית לדוד. אמר רב חסדא לית מילתא פליגא שבית המקדש של מטה מכוון כנגד בית המקדש של מעלה. אמר רבי אבא מהו (תהלים כח ב) אל דביר קדשך. ממקום שהדברות יוצאות לעולם שנאמר (ישעיה ב ג) כי מציון תצא תורה ודבר ה' מירושלים. וכתיב (תהלים סח לו) נורא אלקים ממקדשיך: A Psalm, a song for the dedication of the House, of David. Rav Ḥisda said: There is no difference between the Sanctuary of the tribe below and the Sanctuary of the tribe above, i.e., the Temple below corresponds precisely to the Temple above. Rabbi Abba asked: What is the meaning of “O God, the Lord of hosts; hear my prayer; give ear, O God of Jacob. Selah. Behold, O God our shield, and look upon the face of Your anointed. For a day in Your courts is better than a thousand elsewhere; I would rather stand at the threshold of the house of my God than dwell in the tents of wickedness” (Psalms 84:9-11)? The phrase “O God, the Lord of hosts” is a reference to the place where the Divine Utterances issue forth to the world, as it is stated: “For out of Zion shall go forth the law, and the word of the Lord from Jerusalem” (Isaiah 2:3). And it is written: “God in His holy dwelling place, is a father of the fatherless, and a judge of the widows. God settles the solitary in a house; He leads out the prisoners into prosperity; but the rebellious dwell in a parched land” (Psalms 68:6).
דבר אחר מזמור שיר חנוכת הבית. זה שאמר הכתוב (איוב מא ג) מי הקדימני ואשלם. מי חושב בלבו לעשות מצוה לפני ולא השלמתי לאחריו. מי עשה מילה ולא נתתי לו קודם הבן. מי עשה ציצית ולא נתתי לו קודם הטלית. מי עשה מעקה לגגו ולא נתתי לו אני קודם הבית. מי עשה צדקה ולא נתתי לו קודם הדינרים. מי שחשב בלבו לעשות מצוה ולא עשאה אני מעלה עליו כאלו עשאה. שהרי דוד חשב לבנות בית המקדש ונקרא על שמו שנאמר מזמור שיר חנוכת הבית לדוד: Another explanation of Psalm Shir HaMaalot Chanukat HaBayit. This is what the verse (Job 41:3) means: "Who preceded Me, that I should repay?" Who thought in his heart to do a mitzvah before Me and I did not reward him for it? Who performed a commandment and I did not give him the reward before he even did it? Who made tzitzit and I did not give him the reward before he made the garment? Who made a fence for his roof and I did not give him the reward before he built the house? Who gave charity and I did not give him the reward before he gave the coins? Whoever thought in his heart to do a mitzvah, but did not do it, I credit him as if he did it. For David thought to build the Holy Temple and it is named after him, as it says, "A Psalm, a Song of Dedication of the House, for David" (Psalms 30:1).
דבר אחר מזמור שיר חנוכת הבית לדוד. זה שאמר הכתוב (תהלים קמט ה) יעלזו חסידים בכבוד ירננו על משכבותם. בשעה שהצדיקים נפטרין מן העולם שלש כתות של מלאכים מטפלין עמו. אחת אומרת (ישעיה נז ב) יבא שלום. ואחת אומרת ירננו על משכבותם. ואחת אומרת הולך נכוחו. ומהלכות לפניו. א"ר יהודה ב"ר סימון בשם רבי יאשיה כביכול הקב"ה אומר לו שלום. וממי אתה למד מן הרשעים שנאמר (שם כא) אין שלום אמר ה' לרשעים. אם לרשעים אמר קל וחומר לצדיקים שהקב"ה אומר להם שלום. לכך יעלזו חסידים בכבוד. באיזה כבוד בכבוד שהקב"ה עושה לצדיקים בשעה שנפטרין מן העולם והם מקלסין להקב"ה. א"ר חייא בר' יוסי אין בין צדיקים חיים למתים אלא הדבור בלבד והם מקלסין להקב"ה ששם אותם בצרור החיים שנאמר (שמואל-א כה כט) והיתה נפש אדוני צרורה בצרור החיים. ירננו על משכבותם. אין ירננו אלא קילוס. כמה דאמר (תהלים קיח טו) קול רנה וישועה באהלי צדיקים. א"ר יוחנן בשעה שהזקן יושב ודורש ואומר כך אמר פלוני שפתותיו רוחשות ודובבות בקבר שנאמר (שיר השירים ז י) וחכך כיין הטוב. וכתיב (שם) דובב שפתי ישנים. לכך ירננו על משכבותם. אמר דוד (תהלים סא ה) אגורה באהלך עולמים. וכי חשב דוד שהוא חי לעולמים. אלא א"ר יהודה שיהו אומרים משמי בבתי כנסיות ובתי מדרשות. אמר לו הקב"ה חייך אף על פי שאתה מת אין שמך זז מתוך ביתי לעולם אלא על כל קרבן וקרבן מזכירין אותך ואומרים שירים משלך מזמור לדוד. ולא עוד אלא אמר הקב"ה הואיל ואתה חשבת לבנות בית המקדש אף על פי ששלמה בנך בונה אותו על שמך אני קורא אותו ואני כותבו. שנאמר מזמור שיר חנוכת הבית לדוד. לשלמה אינו אומר אלא לדוד: Another psalm, a song for the dedication of the house, by David. This is what the scripture says (Psalm 149:5): "Let the faithful exult in glory, let them sing for joy on their couches." When the righteous depart from this world, three companies of angels attend them: one says (Isaiah 57:2) "Peace be upon him," another says, "Let them sing for joy on their couches," and a third says, "He is going in peace, and his going is in the hands of the Lord." Rabbi Yehuda bar Simon said in the name of Rabbi Yoshiya: It is as if the Holy One, blessed be He, says to the departed, "Peace be upon you." From whom did you learn this about the wicked? As it is said (Isaiah 57:21), "There is no peace, says the Lord, for the wicked." If God said this to the wicked, all the more reason for Him to say "peace" to the righteous. Therefore, "Let the faithful exult in glory." What is the glory that the Holy One, blessed be He, bestows upon the righteous when they depart this world and praise Him? Rabbi Chiya bar Yosei said: There is no difference between the living righteous and the dead except for speech alone, and they praise the Holy One, blessed be He, saying that He has placed them in the bundle of life, as it is said (1 Samuel 25:29), "But the soul of my lord shall be bound up in the bundle of life." "Let them sing for joy on their couches." "Sing for joy" means nothing other than dancing, as it is said (Psalms 118:15) a voice of singing and salvation in the tents of the righteous." Rabbi Yochanan said: "When an elder sits and teaches and his lips move and murmur in the grave, it is said (Song of Songs 7:10) 'Your palate is like the best wine.' And it is written (ibid. 7:9) 'Your lips drip honey.' Therefore, let us rejoice in their beds. David said (Psalms 23:6) 'Surely goodness and mercy shall follow me all the days of my life, and I will dwell in the house of the Lord forever.' Did David think that he would live forever? Rather, Rabbi Yehuda said that this should be said in synagogues and study halls. The Holy One, blessed be He, said to him, 'Even though you are dead, your name does not depart from My house forever. Rather, with every sacrifice that is brought, they mention you and recite songs of yours, such as a Psalm of David.' Moreover, the Holy One, blessed be He, said, 'Since you intended to build the Temple, even though your son Solomon built it in your name, I will call it by your name and write it as a song of David, as it is said, "A Psalm, a Song for the Dedication of the House, of David" (Psalms 30:1). Only for David and not for Solomon is it said.'"...
דבר אחר מזמור שיר חנוכת. זה שאמר הכתוב (תהלים סב יג) ולך ה' חסד כי אתה תשלם לאיש כמעשהו. רבי יהודה ורבי נחמיה אמרי מדת פורענות עקרה ואינה עושה פירות מדה טובה עושה פירות. שנאמר (הושע י יב) זרעו לכם לצדקה קצרו לפי חסד. מה הקב"ה עושה גובה מן האדם עונותיו וחוזר ונותן לו שכרו. רבנן אמרי אפילו עונותיו אינו גובה ממנו בבת אחת שנאמר (עזרא ט יג) כי אתה אלקינו חשכת למטה מעונינו. ר' אלעזר ור' יוסי בר חנינא. ר' אלעזר אמר כף מעויין הוא כף עונות וכף זכיות. ומה הקב"ה עושה מטה כלפי חסד שנאמר (תהלים סב יג) ולך ה' חסד. ורבי יוסי בר חנינא אמר מה הקב"ה עושה חוטף שטר מן העוונות שהן בכף ומיד הזכיות מכריעות. וכן הוא אומר (מיכה ז יח) מי אל כמוך נושא עון ועובר על פשע. ר' נחמיה אומר חשב עכו"ם לעשות עבירה אף על פי שלא עשאה הקב"ה חושבה כאילו עשאה. שכן הוא אומר (דברים כו ה) ארמי אובד אבי. וכי היכן איבד לבן ליעקב. אלא על ידי שחשב לעשות כן מעלה עליו הכתוב כאילו עשאה. ואם חשב עכו"ם מצוה אינו כותבה עד שיעשנה. שנאמר (דניאל ו טו) ועד מעלי שמשא וגו'. ולא חשב לו הקב"ה עד שעשאה. וישראל שחשב לעשות עבירה ולא עשאה אין הקב"ה כותבה עד שיעשנה. שנאמר (מיכה ב א) חושבי און ופועלי רע. אמר דוד אם כן (תהלים סו יח) און אם ראיתי בלבי לא ישמע ה'. ואם חשב לעשות מצוה ונאנס ולא עשאה הקב"ה מעלה עליו כאילו עשאה. תדע לך שהרי דוד חשב לבנות המקדש ואף על פי שלא בנאו נכתב על שמו. שנאמר מזמור שיר חנוכת הבית לדוד. מכאן שכל מי שמצטער על הדבר נקרא על שמו. שכן מצינו במשה על שנצטער בתורה וישב מ' יום ומ' לילה נקרא על שמו. שנאמר (מלאכי ג כב) זכרו תורת משה עבדי. וכן דוד שנצטער עליו תחלה נקרא על שמו. שנאמר מזמור שיר חנוכת הבית: Another thing is a Psalm for the dedication song. This is what the scripture says (Psalm 32:13): "The Lord's unfailing love surrounds the one who trusts in him." Rabbi Yehuda and Rabbi Nehemiah said that the measure of punishment is primary, and it does not yield good fruit, while the measure of good produces good fruit, as it says (Hosea 10:12): "Sow righteousness for yourselves, reap the fruit of unfailing love." What does God do? He collects a person's sins and then gives them their reward. The rabbis said that even if God does not immediately collect a person's sins, as it says (Ezra 9:13): "You, our God, have punished us less than our sins deserved." Rabbi Elazar and Rabbi Yosei bar Hanina said, "The hand with the scales is like the hand with sins and the hand with merits." And what does God do? He inclines the scales toward mercy, as it says (Psalm 32:13): "The Lord's unfailing love surrounds the one who trusts in him." Rabbi Yosei bar Hanina said, "What does God do? He snatches the bill of sins that is in one hand and the merits are immediately decided." As it says (Micah 7:18): "Who is a God like you, who pardons sin and forgives the transgression of the remnant of his inheritance?" Rabbi Nehemiah said, "If a Gentile intends to commit a transgression, even if God did not carry it out, He considers it as if he did it." For he says (Deuteronomy 26:5), "An Aramean tried to destroy my father." But where did Laban destroy Jacob? Rather, because he intended to do so, the scripture considers it as if he had done it. And if a non-Jew intends to perform a mitzvah, it is not written for him until he does it, as it says (Daniel 6:15), "Even until the sun rose." And the Holy One, blessed be He, did not consider it against him until he did it. And if an Israelite intends to commit a sin but does not do it, the Holy One, blessed be He, does not write it until he does it, as it says (Micah 2:1), "Woe to those who devise iniquity and work evil upon their beds." David said, "If I had seen iniquity in my heart, the Lord would not have heard me" (Psalms 66:18). And if one intends to perform a mitzvah but is prevented from doing so, the Holy One, blessed be He, considers it as if he had done it. Know that David intended to build the Temple, and even though he did not build it, it was written in his name, as it says, "A psalm, a song for the dedication of the House, by David" (Psalms 30:1). From this we learn that anyone who is distressed over a matter is called by his name, as we find with Moses, who was distressed over the Torah and is called by his name, as it says (Malachi 3:22), "Remember the Torah of Moses, My servant." Similarly, David, who was distressed over the Temple, is called by his name, as it says, "A psalm, a song for the dedication of the House, by David."
דבר אחר זה שאמר הכתוב (שם טז) אז נדברו יראי ה' איש אל רעהו. רבי חייא בשם רבי אבא אמר בשעה שתלמידי חכמים יושבין ונכבשים אלו לאלו. כענין שנאמר (תהלים מז ד) ידבר עמים תחתנו. הקב"ה מצית לדבריהם שנאמר (מלאכי ג טז) ויקשב ה' וישמע. א"ר יעקב בר זבדי בשם רבי אבהו ולא עוד אלא הקב"ה מאיר להם מעונותיהן. א"ר אבא לכך הן אומר מר (אולי צ"ל - אומרים אמר מר) שהן קוראים למארי דעלמא מר: Another explanation of the verse "Then those who feared the LORD spoke to one another" (Malachi 3:16): Rabbi Chiya, in the name of Rabbi Abba, said that this refers to the time when the sages sit together and engage in Torah study. They debate with one another, similar to what is said in Psalm 47: "He subdued peoples under us." God stimulates their conversation, as it is said in Malachi 3:16: "Then the Lord listened and heard." Rabbi Yaakov bar Zebedi said in the name of Rabbi Abbahu that God illuminates their homes. Rabbi Abba said that this is why the sages are called "mar" (master), which means that they are masters of the world.
דבר אחר מזמור שיר. לפי ששני פעמים נבנה בית המקדש אחד בנה שלמה ואחד בנה עזרא. לפיכך מזמור שיר. מזמור על הראשון ושיר על השני: Another explanation is regarding Psalm 30: A song of dedication of the House. This is because the Holy Temple was built twice: once by King Solomon and another time by Ezra. Therefore, it is called "a psalm" for the first Temple and "a song" for the second.