—- use the master database
SELECT error, severity, dlevel,
[description]
FROM sysmessagesWHERE
(msglangid = 1033)
-- hint-hint: the msglangid =1033 is for English..
You can use this list of errors and severities to make sure your scripts are neat and clean.
Function | Description |
ERROR_NUMBER() | Returns the number of the error |
ERROR_SEVERITY() | Returns the severity |
ERROR_STATE() | Returns the error state number |
ERROR_PROCEDURE() | Returns the name of the stored procedure or trigger where the error occurred |
ERROR_LINE() | Returns the line number inside the routine that caused the error |
ERROR_MESSAGE() | Returns the complete text of the error message. The text includes the values supplied for any substitutable parameters, such as lengths, object names, or times |
No comments:
Post a Comment