Frankly, I think that in order to fight dragons, except for exceptionally small ones, you should have some kind of fantasy ordinance, like ballistas with magical or blessed bolts or something like that, and large weighted nets to hamper its ability to fly, and otherwise a whole host of special gear. Is a rapier any less appropriate than a knightly sword or a warhammer, or even a Viking battle-ax? Most of the ordinary D&D weapons are barely suitable for killing an elephant or rhinoceros, much less a dragon.