Главная страница | назад





Article #19508: Raising MSSQL and Sybase errors with a severity <=10 do not get raised by SQL Links.

 Question and Answer Database
FAQ: FAQ4508B — Raising MSSQL and Sybase errors with a severity <=10 do not get raised by SQL Links.
Category: Database (MSSQL)
Platform: All-32Bit
Product: All-32Bit,
Question:
Why don't server errors with a severity <=10 get
raised by SQL Links?
Answer:
According to MS documentation severity Level 0 and 10
are for Status Information only (Reported as Level 0)
These messages are not errors; they provide additional
information after certain statements have executed.
Errors w/severity <=10 are also not returned by MS ODBC.
ADDITIONAL INFORMATION AND EXAMPLES
create procedure myerrorproc as
begin
RAISERROR ('my raiserror',11,127)
end
Using WISQL32:
exec myerrorproc
Returns the following:
Msg 50000, Level 11, State 127
my raiserror
create procedure myerrorproc2 as
begin
RAISERROR ('my raiserror',10,127)
end
Using WISQL32:
exec myerrorproc2
Returns the following:
my raiserror
Info from MS SQL Server knowledgebase:
RAISERROR Statement (version 6.5):
"Messages with severity levels 10 and under are not
errors, but they do provide additional information."
Severity Levels 0 through 18
Severity Level 0 and 10: Status Information (Reported
as Level 0) These messages are not errors; they provide
additional information after certain statements have
executed.
Severity Levels 11 through 16
These messages indicate errors that can be corrected
by the user.
Severity Level 17: Insufficient Resources
These messages indicate that the statement has caused
SQL Server to run out of resources (such as locks or
disk space for the database) or to exceed some limit
set by the SA.
These system limits include the number of databases
that can be open at the same time and the number of
connections allowed to SQL Server. Limits are stored
in the sysconfigures table in the master database and
can be changed with the sp_configure system stored
procedure. (For details about using sp_configure, see
the Microsoft SQL Server Transact-SQL Reference)
Level 17 messages that indicate you have run out of
space can usually be corrected by the database owner.
Other level 17 messages are best addressed by the SA.
Severity Level 18: Nonfatal Internal Error Detected
These messages indicate that there is some type of
internal software problem, but the statement finishes,
and the connection to SQL Server is maintained. For
example, a level 18 message occurs when SQL Server
detects that a decision about the access path for a
particular query has been made without a valid reason.
The SA should be informed every time a level 18 message
occurs.
7/26/99 10:10:23 AM

Last Modified: 01-SEP-99