SQL Server 2000 Error Handling (Part 2)

In the second part of SQL Error Handling article, I want to discuss two other ways SQL Server show its error besides using the ex_raise routine.

The other two are through user_log and scierrlog routine.

The scierrlog routine is responsible for showing the text message in ERRORLOG file, as for user_log is usually shown in SQL Enterprise Manager Console in the form like this :

Or

The source of these error string is either obtained from sqlevn70.RLL as in many cases of informational message that is printed by scierrlog routine, or can also be obtained by searching through master.dbo.sysmessages table, using the error code as the key.

These two routine is can be very useful to track down the causes of some obscure SQL Server error, that is shown as above in SQL EM Console, or in the ERRORLOG file.

Please also be ware that sometimes the given error code can be misleading, such as the above example. Actually those two sample error above is using the same error string that is located in master.dbo.sysmessages table.

For the first case, If I search this table using the error code 22272 as the key, I will not find it because, it is outside the range of error code supplied by sysmessages table.

In the second case, the error code 15004 is found with completely different description.

The actual error code for the above two sample cases is 17750, so it has one problem regarding the DLL loading routine.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: