One thing is that, in D&D, being dead just makes it easier to interrogate the corpse somehow. You would want a combined effect to be truly thorough, one to wipe the memory, one to kill the spy, one to destroy the corpse(which may or may not be the same as the one that killed the spy) and one to spirit the soul away. Wrecking divinations(e.g. Hindsight) may be handy as well.
For one thing, you could define the level of the spy and the level of resources his opponents possess. Int targeting cocktail of lethal poisons could do the trick, for example, if the spy was rendered an idiot before he died(hence blocking Speak with Dead, or at least tremendously frustrating it). Explosive Runes, or it's mundane equivalent of lots of oil+alchemical fire deals with the corpse.
That said, usually, barring security measures, a combined Dispel Magic and Teleport/Plane Shift effect is ideal, the former to attempt to break any teleportation blockers, and the latter to physically remove the live spy from the scene, upon which he can either go to ground(easy enough, with magical support), or destroy himself in a suitably irreversible manner(e.g diving into lava, leaving no corpse, and nothing to trace where he died either)