Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:4243Abū Bakr b. Isḥāq al-Faqīh > al-ʿAbbās b. al-Faḍl al-Asfāṭī > Aḥmad b. Shabīb from my father > Yūnus > Ibn Shihāb > Ḥamzah b. ʿAbdullāh from his father

[Machine] The dogs used to urinate and defecate in the mosque during the time of the Prophet ﷺ, and they did not change anything about that.  

البيهقي:٤٢٤٣وَأنبأ أَبُو عَبْدِ اللهِ الْحَافِظُ أنبأ أَبُو بَكْرِ بْنُ إِسْحَاقَ الْفَقِيهُ أنبأ الْعَبَّاسُ بْنُ الْفَضْلِ الْأَسْفَاطِيُّ ثنا أَحْمَدُ بْنُ شَبِيبٍ ثنا أَبِي عَنْ يُونُسَ عَنِ ابْنِ شِهَابٍ عَنْ حَمْزَةَ بْنِ عَبْدِ اللهِ عَنْ أَبِيهِ قَالَ

كَانَتِ الْكِلَابُ تَبُولُ وَتُقْبِلُ بِالْمَسْجِدِ أَيَّامَ النَّبِيِّ ﷺ فَلَمْ يَكُونُوا يُغَيِّرُونَ مِنْ ذَلِكَ شَيْئًا  


See similar narrations below:

Collected by Bukhārī, Aḥmad

No sprinkling of water for dogs passing through and urinating the Masjid of the Prophet ﷺ

bukhari:174Aḥmad b. Shabīb from my father > Yūnus > Ibn Shihāb > Ḥamzah b. ʿAbdullāh from his father

My father said. "During the lifetime of Allah's Apostle, the dogs used to urinate, and pass through the mosques (come and go), nevertheless they never used to sprinkle water on it (urine of the dog.)"  

البخاري:١٧٤وَقَالَ أَحْمَدُ بْنُ شَبِيبٍ حَدَّثَنَا أَبِي عَنْ يُونُسَ عَنِ ابْنِ شِهَابٍ قَالَ حَدَّثَنِي حَمْزَةُ بْنُ عَبْدِ اللَّهِ عَنْ أَبِيهِ قَالَ

كَانَتِ الْكِلاَبُ تَبُولُ وَتُقْبِلُ وَتُدْبِرُ فِي الْمَسْجِدِ فِي زَمَانِ رَسُولِ اللَّهِ ﷺ فَلَمْ يَكُونُوا يَرُشُّونَ شَيْئًا مِنْ ذَلِكَ  

ahmad:5389Sakan b. Nāfiʿ al-Bāhilī Abū al-Ḥusayn > Ṣāliḥ b. Abū al-Akhḍar > al-Zuhrī > Sālim b. ʿAbdullāh from his father

I used to sleep in the mosque in the lifetime of the Messenger of Allah ﷺ when I was young and bachelor. The dogs would urinate frequently visit the mosque, and no one would sprinkle over it. (Using translation from Abū Dāʾūd 382)   

أحمد:٥٣٨٩حَدَّثَنَا سَكَنُ بْنُ نَافِعٍ الْبَاهِلِيُّ أَبُو الْحُسَيْنِ حَدَّثَنَا صَالِحُ بْنُ أَبِي الْأَخْضَرِ عَنِ الزُّهْرِيِّ عَنْ سَالِمِ بْنِ عَبْدِ اللهِ عَنْ أَبِيهِ قَالَ

كُنْتُ أَعْزَبَ شَابًّا أَبِيتُ فِي الْمَسْجِدِ فِي عَهْدِ رَسُولِ اللهِ ﷺ وَكَانَتِ الْكِلَابُ تُقْبِلُ وَتُدْبِرُ فِي الْمَسْجِدِ فَلَمْ يَكُونُوا يَرُشُّونَ شَيْئًا مِنْ ذَلِكَ