Notification settings aren't being retained After upgrading an iMac and MacBook Air from Mavericks to Yosemite, changes to Notifications aren't being retained:


Looking at the Notifications Preference Pane - there are a set of apps with Notification settings.
Changing Notification settings for any of these apps works - ie I can change the alert style, whether notifications appear in Notification Center, etc. 

These settings are respected until I reboot / logout, at which point they revert back the original settings.
New apps will appear in the preference pane when they are run. Notification settings can be changed. After rebooting, the app disappears from the notification preference pane until I run it again, at which point it appears with default settings.



So what seems to be happening is that these settings aren't being saved to disk. I have: 


repaired permissions
deleted the ~/Library/Application Support/NotificationCenter folder


None of this had made any difference. Does anyone know where these settings are stored?
Fixed:

This thread on the Apple forums is the key:


Open the Library folder in your Home folder.
In the Library folder, open the Application Support folder.
Locate the folder named NotificationCenter. Drag this folder to the desktop.
Next, open the Terminal application and enter the following


.

cd `getconf DARWIN_USER_DIR`
rm -rf com.apple.notificationcenter 
killall usernoted; killall NotificationCenter



Restart your computer.


The issue is clearly to do with the NotificationCenter database. There are 3 files:


db
db-shm
db.wal


In my case db.wal was a 0 byte file compared with 1.9MB on a correctly working Yosemite install. Permissions were correctly set, but looks as if Yosemite wasn't writing to it. Only deleting db.wal didn't fix the problem - another 0 byte file was created on restart. Deleting everything works though!