1 A song of ascents. Of Shlomo. Unless Hashem builds the house, its builders labor in vain on it; unless Hashem watches over the city, the watchman keeps vigil in vain.
SHEER ha-ma-a-LOT lish-lo-MOH im a-do-NAI lo yiv-NEH VA-yit SHAV a-m’-LU vo-NAV BO im a-do-NAI lo yish-MOR EER SHAV sha-KAD sho-MAYR
א שִׁיר הַמַּעֲלוֹת לִשְׁלֹמֹה אִם־יְהֹוָה לֹא־יִבְנֶה בַיִת שָׁוְא עָמְלוּ בוֹנָיו בּוֹ אִם־יְהֹוָה לֹא־יִשְׁמָר־עִיר שָׁוְא שָׁקַד שׁוֹמֵר׃
127:1 Of Shlomo
Rabbi Avraham Ibn Ezra writes that this psalm was composed after it was told that Shlomo, not David, would build the Beit Hamikdash. In Divrei Hayamim I 22:7-16, David explains to his son Shlomo the immense responsibility Hashem has transferred to him with the task of building the Beit Hamikdash. David himself had been told by God that he would not be given that opportunity, for he had waged too many wars and shed too much blood. His son, however, would be a man of peace who would reign during an era of peace. His name will be Shlomo, meaning peace and tranquility. Therefore he, and not David, will be the one to build the Beit Hamikdash. Instead of being disappointed, David rejoices at God’s decision and blesses his son for the upcoming grand endeavor.