Agent Pending Actions can get out of synch between the Console, and the database

<!--[if lt IE 9]>


Comments (16)

  1. paul says:

    Thanks.  This helped me out.  I had to resort to the SQL Query.

  2. David says:

    I couldn’t get the query to run (SQL 2008), but I was able to edit the top 200 rows and manually delete the entry. Great Post.

  3. Chuffie says:

    SQL Query worked for me. Thanks. Took me 2 days to find this!!

  4. Maekee says:

    EXCELLENT POST! It solved my problem i have had for a while now. Thanks alot for a great blog.

  5. Srini says:

    Great post this. I resolved the issue with the SQL query.

  6. Johan E says:

    we had this problem after a failed push and then a manuall installation of the agent. we managed to approve it by changing the 'reject' command to approve-agentPendingAction as:

    get-agentPendingAction | where {$_.AgentName -eq ""} | approve-agentPendingAction

    now it shows upp and is healty with the managed agents.


  7. Robbo says:

    it’s the fix i needed. Tried cache clearing on the console, multiple paths to agent re install but only this database entry delete using the stored procedure fixed it.
    Many thanks

  8. Drew says:

    Kevin: On SCOM 2012 SP1 and Forward powershell command update.PS C:|> Get-SCOMPendingManagement | Where-Object {$_.AgentName -eq “Hostname,com”} | Deny-SCOMPendingmanagement.

  9. Souvick Roy says:

    Thanks Kevin
    Am looking into a solution for last 1 month, Your SQL query save me.

  10. Anonymous says:

    Here are some more links from my private collections. This links are very usefull to administrate, configure

  11. Todd B. says:

    Thanks for this post. In our case, I’m surprised that this is still an issue with SCOM 2012. Because we had over 900 agents in this state, our SQL team made it easy for me to address this. I execute the query, then copy the results in a new query that
    deletes a particular set of servers.

    select ‘exec p_AgentPendingActionDeleteByAgentName ”’ + [AgentName] + ””
    FROM [dSCOMMG1ops].[dbo].[AgentPendingAction]
    Where AgentName like ‘Ad%’

  12. Brandy Reid says:

    This blog helped me out today. Thanks for sharing 🙂

  13. Snigdha Naik says:

    i have received alerts for some linux server agents that heartbeat failed in scom 2012 R2.So how to verify what happened to those agents?what might have happened?what would be the resolution . These agents are successfully installed few months back . The
    failing messages of these agents is like "The System is not responding to heartbeats."Could you please help me out here.

  14. Shashikanth says:

    Thanks for sharing the good info, the below command helped me to approve the agent from pending management
    (get-agentPendingAction | where {$_.AgentName -eq ""}|Approve-AgentPendingAction)

  15. Yanni says:

    Yes, try to delete the pending action on Db tabel "agentpendingaction". It’s work. Thks for sharing

  16. Kevin Holman says:

    If you have a LOT of Agent Pending Actions, and you just want to clear them all:

    DECLARE @AgentName nvarchar(MAX)
    WHILE EXISTS(SELECT TOP(1) AgentName FROM AgentPendingAction)
    SET @AgentName = (SELECT TOP(1) AgentName FROM AgentPendingAction)
    SELECT @AgentName
    EXEC p_AgentPendingActionDeleteByAgentName @AgentName

Skip to main content