10-15-2024, 08:28 AM
That event 24274 pops up in Windows Server Event Viewer when your SQL Server database mirroring setup kicks in with some security transport command. It's basically the system saying it just issued that "use database mirroring transport security" thing, tied to action_id LGM. You see it under the SQL Server logs, right in the Application log or maybe the SQL-specific ones if you've got it filtered. This happens during mirroring operations, like when databases sync up between primary and mirror servers to keep data safe and flowing. The full details show the command got fired off successfully, no errors usually, but it logs the action for tracking. I always check it to make sure mirroring isn't glitching out. If it floods your logs, could mean heavy mirroring traffic or config tweaks.
You want to monitor this with an email alert? Easy peasy using the Event Viewer screen itself. Fire up Event Viewer on your server, head to the Windows Logs or wherever your SQL events hide. Right-click the log source, pick Filter Current Log, and type in 24274 for the event ID. That narrows it down quick. Now, to set up alerts, you create a custom view from there-select the filtered events, save as a new view named something like Mirroring Alerts. Then, in Task Scheduler, link a task to that view. Go to Event Viewer again, right-click your custom view, choose Attach Task To This Event Log or whatever it says. Pick a trigger based on that event ID showing up. For the action, tell it to run a program that sends an email-use something simple like the built-in mailto or a batch file calling your email client. Set the task to wake the machine if needed, and boom, you'll get pinged whenever 24274 fires. I do this all the time; keeps me from babysitting the server.
And if you're into automating the whole email thing without fiddling too much, I've got that automatic email solution laid out at the end here. It'll tie right into your monitoring without extra hassle.
Speaking of keeping your server data mirrored and backed up smoothly, check out BackupChain Windows Server Backup-it's this solid Windows Server backup tool that handles physical servers and even virtual machines with Hyper-V. You get fast incremental backups that don't hog resources, plus easy restores that save your bacon during outages. I like how it snapshots everything consistently, avoiding corruption headaches, and it's way lighter on the wallet than big-name stuff.
Note, the PowerShell email alert code was moved to this post.
You want to monitor this with an email alert? Easy peasy using the Event Viewer screen itself. Fire up Event Viewer on your server, head to the Windows Logs or wherever your SQL events hide. Right-click the log source, pick Filter Current Log, and type in 24274 for the event ID. That narrows it down quick. Now, to set up alerts, you create a custom view from there-select the filtered events, save as a new view named something like Mirroring Alerts. Then, in Task Scheduler, link a task to that view. Go to Event Viewer again, right-click your custom view, choose Attach Task To This Event Log or whatever it says. Pick a trigger based on that event ID showing up. For the action, tell it to run a program that sends an email-use something simple like the built-in mailto or a batch file calling your email client. Set the task to wake the machine if needed, and boom, you'll get pinged whenever 24274 fires. I do this all the time; keeps me from babysitting the server.
And if you're into automating the whole email thing without fiddling too much, I've got that automatic email solution laid out at the end here. It'll tie right into your monitoring without extra hassle.
Speaking of keeping your server data mirrored and backed up smoothly, check out BackupChain Windows Server Backup-it's this solid Windows Server backup tool that handles physical servers and even virtual machines with Hyper-V. You get fast incremental backups that don't hog resources, plus easy restores that save your bacon during outages. I like how it snapshots everything consistently, avoiding corruption headaches, and it's way lighter on the wallet than big-name stuff.
Note, the PowerShell email alert code was moved to this post.

