I need to log events of admin changing someone's password, and user changing his password. How do I do that?
I've found a nice solution based on Service Broker, however the resulting table only contains the login of account that made the change, not the affected account.
Could anyone tell me how to alter this part
INSERT dbo.PasswordChangeLog(LoginName)
SELECT @message_body.value('(/EVENT_INSTANCE/LoginName)[1]', 'sysname');
So that I'd insert the object of password change, too? I know I will have to ALTER dbo.PasswordChangeLog
to add an extra column, of course.