How to write errorlog to the SQL errorlog file from stored proc
Suppose i am executing a stored proc . Lets there is an exception, how do i write the log in errorlog of MSSQL? I read about RAISERROR, i got to know that it basically throw exception message to the batch or application? can someone provide me some links to read about it. Suppose if the stored procedure returns int after executing , will it still return the value in case raiserror is called?