Nebuchadnezzar [(the second, who is called in the Book of Chronicles Nebuchadnezzar the Great) wrote Shir HaShirim 100, his mother was called Shamra'am, and similarly in the Midrash Acharei Mot (I have not found it there)], became king of Babylon in the fourth year of Jehoiakim (Yirmiyahu 25). And what is written at the beginning of Daniel, "in the second year of Jehoiakim came Nebuchadnezzar to Jerusalem," is because the first year of Nebuchadnezzar was partly in year two of Jehoiakim and partly in year three of Jehoiakim (Tzeda LaDerech).
And Rashi explained in Daniel that Nebuchadnezzar conquered Jehoiakim in year two of his reign and he was his servant for three years, and what is written "in the second year of Jehoiakim" even though in Yirmiyahu it is written "in the third year of Jehoiakim" means it was year one of Nebuchadnezzar, meaning two years after he rebelled, as it says (II Kings 24) "and Jehoiakim was his servant for three years, and he turned and rebelled against him for three years, and in year three he came upon him," and this was the eighth year of Nebuchadnezzar. The Master said that in the first year he conquered Nineveh, in the second year he came and conquered Jehoiakim, and for three years he served him, and for three years he rebelled against him.
And thus it was the eleventh year of Jehoiakim, three years before being conquered and three years that he served him and three years that he rebelled against him. And then Jehoiakim died under his hand, and Nebuchadnezzar made Jehoiachin king in his place, and so forth. And similarly in Divrei HaYamim II 36]. And Nebuchadnezzar reigned for 45 years [(Seder Olam chapter 28) (and in Vayikra Rabbah after he reigned forty years approximately)], for his son Evil-Merodach reigned 37 years after the exile of Jehoiachin [(as written at the end of II Kings and end of Yirmiyahu)], and Jehoiachin was exiled in year 8 of Nebuchadnezzar [(as written II Kings 24)].
Add 8 years to 37, it equals 45 [(Tzeda LaDerech). Nebuchadnezzar was a reincarnation of Nimrod, beginning nun and end dalet, and so Nebuchadnezzar. And he made the idol through the power of the Holy Names through a plate of the High Priest that Daniel pulled and swallowed from his mouth. Similarly in the days of Enosh they began to call in the name of HaShem, that they knew the Holy Names and wanted to build the tower (Na'ach chapter Noach).
In Midrash Vayikra chapter 2, there is a story of an ox that they pulled to be a sacrifice and it would not be pulled, and a poor man came and in his hand were small beans and he extended them to it and it ate them, and the ox sneezed and extracted a needle and was pulled to be sacrificed. And it appeared to the owner of the ox in a dream that the sacrifice of the poor man preceded yours, etc. And our Sages said that Nebuchadnezzar was the son of Solomon from the Queen of Sheba (see Year 3428).
And our Sages said that he sinned and the Holy One, blessed be He, called him His servant, and in his lifetime he ate grass like an ox and destroyed the Holy Temple. And the story of the ox mentioned above was in the Second Temple, and his rectification in this ox was to be sacrificed because of the magnitude of his sins and his corrupt beliefs that he said "I will ascend upon the heights of the clouds," because he was not pulled, and the needle was his corrupt beliefs.
And for this the merit of the charity that he did on Daniel's advice stood for him. And they said that his name was "poor man" because if he had not fed him he would have died, and he was the poor man mentioned who extended small beans to him, and he recognized in his wisdom the value of the ox, that if it does not sneeze it will be treif, and he wanted to do good to one who did good to him publicly in his lifetime, and because of this charity he reconsidered in repentance, and immediately sneezed and was pulled to sacrifice, giving himself over to be slaughtered willingly to rectify the seventy treifot against the seventy ministers (Bereishit)].