It is narrated from Zubayd bin al-Salt that he said: I went out with Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) to al-Jurf. He looked and saw that he had had a wet dream, and he had prayed without taking a ritual bath. He said: By Allah! I did not know about the wet dream, and I prayed while I had not taken a ritual bath. Then he took a ritual bath and washed the place he saw on his clothes, sprinkled water on (the place) he did not see, gave the adhan and the iqamah, and prayed at that same place after the sun had risen high.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 801