Sulfamethoxazole and trimethoprim; cotrimoxazole bactrim, bactrim ds, septra, septra ds is a drug prescribed for urinary tract infections utis , middle ear infections, respiratory infections, pneumonia, chancroid, for the prevention of infections of transplant recipients, and prevention of toxoplasma encephalitis in patients with aids.