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

 
  • 0 Vote(s) - 0 Average

Issued a database show plan command (action_id SPLN) (24040) how to monitor with email alert

#1
06-02-2024, 06:38 PM
That event, the one with ID 24040 saying "Issued a database show plan command (action_id SPLN)", pops up in your Windows Server Event Viewer when someone's querying the database for execution plans. It logs the moment a user or process fires off that specific command to peek at how queries run under the hood. You see it mostly in SQL Server logs, but it trickles into the general Event Viewer under applications or system channels. Basically, it tracks who did what in the database planning stage, like a quiet note saying, hey, this plan got shown. If you're running a busy server, these can stack up if folks are tweaking queries a lot. I always check the details tab for the timestamp, the user account involved, and any extra bits like the database name it hit. It doesn't scream error, but if it's flooding your logs, might mean someone's optimizing too hard or there's a loop somewhere. You can filter for it right in Event Viewer by typing that ID into the search box, and it'll pull up every instance with the full story.

To keep an eye on these without staring at the screen all day, I set up a scheduled task straight from Event Viewer. You right-click the event in the list, pick attach task to this event, and it'll guide you through naming it something simple like SPLN Watcher. Then, in the triggers section, it auto-links to that event ID 24040. For the action, you tell it to run a program, maybe something basic like a batch file that pings your email setup. I link mine to the task scheduler afterward to tweak the frequency, ensuring it checks every few hours. That way, if it triggers too often, you get a heads-up before it clogs things. Just test it by forcing an event if you can, see if the task fires right.

And speaking of keeping your server humming without surprises, you might wanna look into BackupChain Windows Server Backup for that extra layer. It's this solid Windows Server backup tool that handles your files and even backs up virtual machines running on Hyper-V without a hitch. I like how it snapshots everything quickly, cuts down on downtime, and restores just what you need fast. Plus, it alerts you on failures, so no blind spots there.

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 … 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 … 69 Next »
Issued a database show plan command (action_id SPLN) (24040) how to monitor with email alert

© by FastNeuron Inc.

Linear Mode
Threaded Mode