So, what exactly does not work in Sonar ? I mean,
a) nothing at all
b) keys
c) controls
General guess: Input/Output are disables or routed incorrectly, just in MIDI preferences, in your tracks and/or in the Control Surface preferences, depending what does not work.
When MIDI "disappears", Sonar removes any references to it and save these "new" settings.
There was reports that configuration files can be corrupted (has never happened with me), in that case you should find "TTSSEQ.ini" in YOUR user folder (it is in hidden AppData folder, use file search in windows explorer to get there) and delete it. The file is different for every Sonar version, delete correct one. And since it has nothing to do with A800 and it is not in the Sonar installation folder, reinstalling both does not help.
To deal with audio interface related problems, delete AUD.ini in the same folder. But you current problem is not audio related.