Since you did not show us the code you are using, you left us in the bit of the dark. But this post seems to discuss this error, with the very same error code: https://www.mssqltips.com/sqlservertip/5552/troubleshooting-sql-server-spsenddbmail-error-failed-to-initialize-sqlcmd-library/, so try that.
error on sending mail.
Hi,
Getting below error while executing from SQL Server Jobs. But when I run from SSMS query window no error showing.
Please help me on this to get rid of.
Message
Executed as user: BEIN\SBSSQLA$. Failed to initialize sqlcmd library with error number -2147467259. [SQLSTATE 42000] (Error 22050). The step failed.
2 answers
Sort by: Most helpful
-
-
PercyTang-MSFT 12,501 Reputation points Microsoft Vendor
2023-05-12T02:28:08.55+00:00 Hi @SVA
You can also refer to this post.
Best regards,
Percy Tang
If the answer is the right solution, please click "Accept Answer". If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.