RAISERROR used to define custom error message . this error message can be printed from stored procedure when validation failed
RAISEERROR ('invalid ProductID' 5001, 2)
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I read about using the RAISERROR hack when using a SQL Server Stored Procedure that goes across a Linked Server.
Just wondering what the Syntax is for RAISERROR within a SQL Server Stored Procedured.
Thanks for your review and am hopeful for a reply.
Thanks!
RAISERROR used to define custom error message . this error message can be printed from stored procedure when validation failed
RAISEERROR ('invalid ProductID' 5001, 2)
Hi,@Bobby P
RAISERROR is used to throw an exception or error.
For example,you can add ERROR CHECKS in stored procedure,like this:
IF (@type_id IS NULL)
BEGIN
RAISERROR ('Parameter ''role_type_id'' can not be null.' , 16, 1) WITH NOWAIT
RETURN 1
END
Please refer to this document for more details.
Best regards,
LiHong
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. 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.
I am specifically referring to this link...
https://dba.stackexchange.com/questions/236584/linked-server-returned-message-query-timeout-expired
Can anyone help me out here? This Job will run successfully for 3-4 weeks at a time and then hits this time-out issue out of nowhere it seems. It's driving me CRAZY!
Any insight at all?!?!?