Here's what you need to do
Sounds like you don't have WDM Midi output device. I had the same problem and here's how I solved it. Go to Options and select Audio from the drop down list. Under "Playback and Recording" change the driver mode from WDM to MME (32 Bit). Then click on "Always open all devices." Click OK. You will get a message saying that you need to close down and restart Sonar for the changes to take effect. Do this and follow the instructions to test the audio output device. When prompted for the midi output device, select the new Midi output device which should be your second option after the Microsoft midi mapper. In my case, it was "Microsoft GS Wavetable Synth" - I'm using Windows XP. You cannot select Microsoft Midi Mapper as the output device for Sonar. It won't play anything. If you still only see midi mapper as the only midi output device, your aud.ini file may be corrupt. That's a different problem altogether. Follow these instructions I outlined above and you should be rock'n and roll'n in no time.
Hope this helps.