Solved

6232B_12 Handling Errors in T-SQL Code: What's in an Error?

Posted on 2011-09-16
5
272 Views
Last Modified: 2012-05-12
Hi experts, i am reading about  What's in an Error? but i do not understand

State: Value used to determine the location in code at which an error occurred
can you give me an example or explain me more details?
0
Comment
Question by:enrique_aeo
  • 3
5 Comments
 
LVL 59

Expert Comment

by:Kevin Cross
ID: 36552993
Hi. Think about how you would "locate" code visually. You would use the fact that code is essentially on individual lines, right? http://msdn.microsoft.com/en-us/library/ms178600.aspx ;)
0
 

Author Comment

by:enrique_aeo
ID: 36552998
this is the defintion
"Some error messages can be raised at multiple points in the code for the Database Engine. For example, an 1105 error can be raised for several different conditions. Each specific condition that raises an error assigns a unique state code.

When you are viewing databases that contain information about known issues, such as the Microsoft Knowledge Base, you can use the state number to determine whether the recorded issue is the same as the error you have encountered. For example, if a Knowledge Base Article describes an 1105 error that has a state of 2 and the 1105 error message you received had a state of 3, the error probably has a different cause than the one reported in the article.

A Microsoft support engineer can also use the state code from an error to find the location in the source code where that error code is being raised. This information might provide additional ideas on how to diagnose the problem."
http://msdn.microsoft.com/en-us/library/ms165761.aspx

BUT I DO NOT UNDERSTAND
0
 
LVL 59

Expert Comment

by:Kevin Cross
ID: 36553069
I am sorry. I read that as "state the value used to determine the location..." i.e., error line or line number. :) I will try again now that I see that is about State within error message. When I locate the reference of all 127 states, I will post. At least ERROR_STATE can be 1 - 127 identifying at what stage the error occurred.
0
 
LVL 59

Accepted Solution

by:
Kevin Cross earned 200 total points
ID: 36553077
And, I probably won't find a list *smile* -- state tells the source in SQL Server code that error generated from. As the description suggests, this information is helpful to Microsoft Engineers. You will probably see a number of errors are 1 because they only can get generated from one place. If however, there are multiple places or ways an error can be generated, the state allows the Engineers to pinpoint the exact source.
0
 
LVL 8

Assisted Solution

by:Ghunaima
Ghunaima earned 50 total points
ID: 36553585
http://msdn.microsoft.com/en-us/library/ms180031.aspx

Studying this may help you.  also read about other ERROR-... () functions which are present in Refrence section of the page you specified.
0

Featured Post

[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now