After Post Rules
Sometimes rules will fail to run because of extra markup that SQL Server Management Studio (SSMS) automatically inserts in stored procedures.
This article includes information regarding:
Issue: "Run All Rules" not Executing all Rules
The Final Finish Table is not running all of the rules when All - Run all of the rules is selected from the RUN RULES AFTER DOWNLOAD list box.
Look at the Finish Download Messages page, which becomes available on the vertical of any Role after the "Final Finish" is completed.
The Finish Download Messages page shows that the After Rules stop executing whenever one of them reports "-1 rows affected."
Resolution: Remove Code in SSMS
Every SQL Server stored procedure is meant to return a number indicating the total number of rows it inserted/updated/deleted. However, the SET NOCOUNT ON
code that SSMS inserts into new stored procedures will force the procedure to return -1
. It is not counting how many rows are being inserted/updated/deleted. This is a sensible thing to do when you have no interest in how many rows the stored procedure is operating on; however, dspConduct needs this information.
Remove the SET NOCOUNT ON code in SSMS
To remove the SET NOCOUNT ON code that SSMS attached to stored procedures:
- Right-click the stored procedure in SSMS; select Design.
- Highlight the following section of code and hit the Delete key.
- Click Save.