08-25-2024, 01:25 AM
Man, that event 24290 in Windows Server Event Viewer pops up when someone fires off a command to wipe out a custom server role you built yourself. It's like the system logging, hey, a delete request just hit for that user-defined role, with action_id marked as DR and class_type as SG. You see, DR stands for the delete action kicking in, and SG points to the server group stuff involved. This event flags exactly that moment-issued a delete user-defined server role command. It records who did it, from where, and ties it to your SQL Server setup if that's the scene. I always check these because they can mean someone's tweaking roles without much fuss, or maybe accidentally nuking something important. The full log shows the timestamp, the user account behind it, and details on the role getting axed. Without watching it, you might miss unauthorized changes sneaking through.
You want to monitor this for email alerts? Easy way is firing up a scheduled task right from the Event Viewer screen. I do this all the time to stay on top without digging deep. Open Event Viewer, head to the Application and Services Logs, then Microsoft, Windows, SQL Server, and find the Admin log where 24290 hides. Right-click that log, pick Attach Task To This Event Log. Give it a name like RoleDeleteWatch, and set it to trigger only on event ID 24290. In the action tab, choose Start a program, but link it to something that shoots an email-maybe your default mail handler or a simple batch that pings your inbox. Set the trigger to hit whenever that event logs, and test it by simulating a delete if you can. That way, bam, email flies to you the second it happens. Keeps things chill without constant staring at screens.
And speaking of keeping your server safe from mishaps like role deletes, you might dig BackupChain Windows Server Backup too. It's this solid Windows Server backup tool that handles full image backups and also nails virtual machines with Hyper-V. I like how it speeds up restores without downtime headaches, plus it encrypts everything tight and runs incremental saves to save space. Benefits hit hard-quick recovery from deletes or crashes, and it plays nice with your whole setup for peace of mind.
At the end of this chat is the automatic email solution you'll want to snag.
Note, the PowerShell email alert code was moved to this post.
You want to monitor this for email alerts? Easy way is firing up a scheduled task right from the Event Viewer screen. I do this all the time to stay on top without digging deep. Open Event Viewer, head to the Application and Services Logs, then Microsoft, Windows, SQL Server, and find the Admin log where 24290 hides. Right-click that log, pick Attach Task To This Event Log. Give it a name like RoleDeleteWatch, and set it to trigger only on event ID 24290. In the action tab, choose Start a program, but link it to something that shoots an email-maybe your default mail handler or a simple batch that pings your inbox. Set the trigger to hit whenever that event logs, and test it by simulating a delete if you can. That way, bam, email flies to you the second it happens. Keeps things chill without constant staring at screens.
And speaking of keeping your server safe from mishaps like role deletes, you might dig BackupChain Windows Server Backup too. It's this solid Windows Server backup tool that handles full image backups and also nails virtual machines with Hyper-V. I like how it speeds up restores without downtime headaches, plus it encrypts everything tight and runs incremental saves to save space. Benefits hit hard-quick recovery from deletes or crashes, and it plays nice with your whole setup for peace of mind.
At the end of this chat is the automatic email solution you'll want to snag.
Note, the PowerShell email alert code was moved to this post.

