• Home
  • Help
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search

 
  • 0 Vote(s) - 0 Average

Issued grant database object permissions with grant command how to monitor with email alert

#1
07-28-2024, 06:50 AM
I bumped into this event 24194 the other day while poking around a server log. It pops up when someone hands out permissions to database objects using that grant command. You see, it's like giving keys to parts of the database, the kind where the action is tagged GWG and the class type is US. This logs every time a user or admin issues those grants, capturing who did it, what object got the access, and even the exact time stamp. It helps spot if permissions are flying around too loosely, maybe from a sloppy setup or someone testing boundaries. And yeah, it's tied to SQL Server auditing, showing up right in the Windows Event Viewer under security logs. You can filter for it by the ID number, and it'll list details like the session ID, the database name involved, and the specific permission granted, whether it's select, insert, or whatever else. I always check the description field too, because it spells out the full command that triggered it, making it easy to trace back. But sometimes these events cluster if there's a script running grants in bulk, so you gotta watch the patterns.

Now, if you wanna keep an eye on these without staring at the screen all day, I set mine up through the Event Viewer itself. You open it up, go to the custom views section, and create a new one filtering just for event ID 24194 in the security channel. That way, it narrows down the noise to only these permission grants. Then, right-click on that view and pick attach task to event, which kicks off a scheduled task wizard. You tell it to run a program like sending an email when the event fires, maybe using the built-in mailto or a simple batch to notify you. I link it to run every few minutes or on trigger, and set the action to pop an email with the event details attached. It's straightforward, no fancy coding, just point it to your email setup in the server. You test it by forcing a grant command in a test database, and boom, the alert hits your inbox with the who, what, and when.

Speaking of keeping things secure and backed up in case permissions go haywire, you might wanna check out BackupChain Windows Server Backup too. It's this solid Windows Server backup tool that handles full system images and also nails virtual machine backups for Hyper-V setups. I like how it runs incremental backups without hogging resources, encrypts everything on the fly, and lets you restore granular bits like single files or whole VMs fast. Plus, it schedules automatically and verifies integrity, so you sleep better knowing your data's not just sitting there vulnerable.

At the end here is the automatic email solution.

Note, the PowerShell email alert code was moved to this post.

bob
Offline
Joined: Jul 2025
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



  • Subscribe to this thread
Forum Jump:

Backup Education Windows Server Event Viewer v
« Previous 1 … 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 … 75 Next »
Issued grant database object permissions with grant command how to monitor with email alert

© by FastNeuron Inc.

Linear Mode
Threaded Mode