I concur with the notes in above posts about ASIO4ALL being for many folks quite unstable and problematic.
If you currently do not have a dedicated audio interface with drivers for your version/level of Windows, then you would likely have the best success with the following configuration:
1. First, go into Windows Control Panel, Hardware and Sound, and click on the link for Manage Audio Devices. Select something OTHER than ASIO4ALL as the Windows Default Audio Device Driver.
2. If needed, remove the check from having ASIO4ALL as your Sonar audio device. (IF your Sonar driver mode is set to ASIO and ASIO4ALL is the selected audio interface, then you do NOT need to remove the check from ASIO4ALL, as you already have the driver mode set to ASIO and this part is all set.
3. If you had to change the Sonar Driver Mode in Preferences to ASIO, then click Apply, then Sonar should automatically pick the ASIO4ALL drivers for you, since those are currently the only ASIO drivers installed on your system.
After the above steps, Windows should no longer try to grab the ASIO4ALL drivers, and you shouldn't lose access to ASIO4ALL as your Sonar audio drivers or the Driver Mode of ASIO.
As soon as your budget allows, I would suggest you look at picking up a dedicated purpose-built audio interface that includes drivers that include Windows 10 (if not on it now you will likely move to Windows 10 at some point). A dedicated audio interface will perform MUCH MUCH better than ASIO4ALL, as it will use dedicated circuitry to do all of the analog/digital conversion for multiple tracks in Sonar, instead of making your poor CPU have to do all that work (which is what happens with ASIO4ALL). You will have MUCH smoother and better sounding playback, with FAR less recording latency when properly using an actual audio interface, rather than ASIO4ALL.
A reasonable USB audio interface with a couple of mic/instrument inputs and outputs will run you around $150 USD, and will make everything work LOTS better than ASIO4ALL. IF you need additional inputs and outputs, the cost for an audio interface will go up - mine is a Presonus AudioBox 1818VSL, and new it seems to be running around $400 or so, depending on where you would get it. (it has 8 decent mic preamps and good analog/digital converters, and is pretty rugged - I also happen to have picked up an expansion unit for it, giving me 16 mic/instrument inputs, which I use to mic entire drum kits with each kit piece having its own input on the interface),
I wish you the best with all of it,
Bob Bone