Sample Header Ad - 728x90

How to Increase The maximum number of allowed pending SQLServerAgent notifications

0 votes
1 answer
176 views
I have a large CI pipeline, it runs a series of deployments against a large set of databases(75 to be specific) on a (mostly) single SQL Server(2019). As part of this CI pipeline, and post deployment I am running a large number of database tests. These tests often create(and delete) SQL Agent jobs as part of there specific prerogatives. They also often invoke standard jobs belonging to a specific database. You can think of the process flow as the following: 1. Set some stuff up 2. Run a job 3. Wait for it to complete 4. Validate it some condition These are being run in CI as the contents of the "setup" and "jobs" can change as the software itself is changes(we store database code in source control and it is deployed with each version of the software). Now most(as far as I'm aware) of the jobs have notifications disabled, and the few that do have notifications enabled are ONLY sending "Failure" notifications: enter image description here So there shouldn't really be that many even with the 75 instance running not that many jobs are failing at the same time, further more we at a later stage prevent the server from sending emails(so suppress these alerts). However, occasionally I do still receive the following error in my database tests: > Unable to post notification to SQLServerAgent (reason: The maximum > number of pending SQLServerAgent notifications has been exceeded. The > notification will be ignored.) Typically I don't care, but this will cause my DB tests to occasionally fail polluting the results of my CI run. How do I increase the number of allowed "Pending SQLServerAgent notifications", I don't care what the affect that this has on the server as long as "some day" the pending notification is made? Is the only way to reduce or eliminate the existing notification configuration in all jobs? Or is there a configuration setting that can be changed here?
Asked by David Rogers (215 rep)
May 10, 2024, 02:44 PM
Last activity: Jul 7, 2025, 01:09 PM