Unable to obtain query record - Database Mail XPs

Modified on Wed, 3 Apr at 2:30 AM

Problem 


When trying to run the End of Day process the following error occurs: 


Unable to obtain query record. 

SQL Server blocked access to procedure 'dbo.sp_send.dbmall' of component 'Database Mail XPs' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Database Mail XPs' by using sp_configure. For more information about enabling 'Database Mail XPS', search for 'Database Mail XPs' in SQL Server Books Online. Procedure sp_send.dbmail Line Number 0



Solution


The issue relates to the automated email from LawMaster to advise of error messages in the system control report that are encountered when the end of day run is processed. The email address is held on the PROADM User / Resource record. i.e. Maintain User Security > Right click on PROADM > Modify to see the email address being used. 


If you host your own LawMaster database we recommend that you contact your IT People and advise them of the error message below so that they can make the required change to allow the automated email to be sent. 


Once they have made the change the error should no longer occur. This page from the internet might help your IT people: https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/database-mailxps-server-configuration-option?view=sql-server-2017

  1. If you want to retain the email address on the PROADM user and want to complete the EOD or EOM process without an error, get your IT people to make the changes as above. 
  2. Remove the email address from PROADM and do EOD/EOM and you shouldn't experience any error as the email option would be bypassed if the system doesn't find an email address under the PROADM user. Maintain User Security > Right click on PROADM > Modify to remove the email address 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article