Sayyiduna Samurah (may Allah be pleased with him) reports that the Prophet (peace and blessings be upon him) said: "Do not swear by idols, do not swear by your fathers; swear by Allah."
Al-Bazzar and al-Tabarani in al-Mu'jam al-Kabir recorded it, and (al-Tabarani) added these words: "Swear by Allah, for He loves that you swear by Him, and do not swear with the oath of Satan." Al-Tabarani's chain contains narrators who are mastur (of unknown status), and al-Bazzar's chain is da'if (weak).