You know the story. Daniel 2 recounts the historical situation where King Nebuchadnezzar of Babylon requested that the "wise" men of his empire reveal the dream and the interpretation that was troubling him. Obviously, they couldn't do it. So the King's order remained. All the wise men are to be killed because of their inadequacy to fulfill the King's command.
But Daniel heard about this and went before the King and asked for some time so that he may make known the interpretation of the King's dream.
Then the mystery was revealed to Daniel in a night vision (2:19). *NOTE* the very first thing Daniel did was to pray to the Lord and acknowledge God's utter sovereignty.
He did not (first!) run and tell the king so as to save his life. He could have (and, perhaps, many of us would have done that). But he rather took the time to pray and acknowledge that it was God who revealed the dream and its interpretation.
In Daniel's prayer (2:20-23), some amazing theological truths are mentioned:
1. God and His "Name" (=character, being, attributes) are to be praised forever (2:20a).
Not Nebuchadnezzar and his "power", but the God of Israel and His intrinsic and sovereign power is to be praised!
2. Wisdom and power belongs only to the God of Israel (2:20b).
Nebuchadnezzar thought he was quite strong & impenetrable but true wisdom and power resides only with the one, true God of heaven!
3. God and God alone is the one who can change seasons, kings, and empires according to His prerogative (2:21a).
As God will reveal to Nebuchadnezzar, it is God who sets up kings and tears them down. It is God who raises empires and destroys them. All according to His will.
4. God gives wisdom to wise men and knowledge to men of understanding (2:21b).
Nebuchadnezzar's servants couldn't reveal the dream and its interpretation to the King. In fact, they acknowledged this when they said: "there is not a man on earth who could declare the matter to the king (2:10).
5. It is God who can reveal the profound and hidden things. Even darkness cannot be hidden from Him; only light dwells with Him (2:22).
Even the inner thoughts of Nebuchadnezzar cannot be hidden from God. Even that which he didn't even understand was understood plainly and comprehensively by God. Nothing is darkness to God.
6. God is worthy of all thanks and praise (2:23a).
Nebuchadnezzar certainly is not worthy of worship or adoration (as he so desires; cf. Dan 2 and 3). But the God of heaven is worthy of all thanks, praise, and worship!
7. God answers the requests of His people according to His will (2:23b).
God was well-pleased to answer Daniel's request in this matter in the affirmative. God would have been good *if* he had not revealed the dream and its interpretation, but God so chose to reveal it to Daniel to show that God is the one, true God who can in fact reveal mysteries that are not only within human beings (=Nebuchadnezzar) but also regarding the future of human history (2:36ff).
What a theologically loaded prayer. What a sovereign God! What a great lesson that the first thing that Daniel did was to pray and acknowledge thanks and praise to God. Then he went to Nebuchadnezzar and revealed his dream and its interpretation.