Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Identifying Error

Author  Topic 

sital
Yak Posting Veteran

89 Posts

Posted - 2009-01-29 : 23:14:55
How can one identify what is the error in the query?

What are the commonly made mistakes in SQL Server 2005?

Where should one look for the error since the error displayed in the results pane contains the message no.?So do you recognise error based on that message No.?

raky
Aged Yak Warrior

767 Posts

Posted - 2009-01-29 : 23:38:09
When u execute the query it displays the errormessage,errorid if there are any errors. Just google with errorid.you will get info about it.
Go to Top of Page

sital
Yak Posting Veteran

89 Posts

Posted - 2009-02-02 : 11:31:55
quote:
Originally posted by raky

When u execute the query it displays the errormessage,errorid if there are any errors. Just google with errorid.you will get info about it.



I tried searching it but it is not giving any proper results. So can you please give me any other method or any example of searching it in Google?
Go to Top of Page

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2009-02-02 : 11:46:19
There are a lot of possible errors!

If your sql calls a stored proc and that returns an error value set by some programmer then we've got no idea what that means.

Why don't you post the sql you are trying and the text of the error message?


Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page

sital
Yak Posting Veteran

89 Posts

Posted - 2009-02-03 : 05:29:17
quote:
Originally posted by Transact Charlie

There are a lot of possible errors!

If your sql calls a stored proc and that returns an error value set by some programmer then we've got no idea what that means.

Why don't you post the sql you are trying and the text of the error message?


Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION





Thanks for your support.But I would like to know if there is any idea or trick which you usually apply to solve any error?
Go to Top of Page

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2009-02-03 : 05:35:44
quote:
Originally posted by sital

quote:
Originally posted by Transact Charlie

There are a lot of possible errors!

If your sql calls a stored proc and that returns an error value set by some programmer then we've got no idea what that means.

Why don't you post the sql you are trying and the text of the error message?


Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION





Thanks for your support.But I would like to know if there is any idea or trick which you usually apply to solve any error?



Well first of all I start looking for more information....................................................................................................................................................................................................................


Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page

raky
Aged Yak Warrior

767 Posts

Posted - 2009-02-03 : 05:36:40
There is no trick to solve any error. Just understanding the error message correctly helps us to max extent to solve the error. On practise u will solve the errors quickly if it arises again....Just what u need is practise
Go to Top of Page

sital
Yak Posting Veteran

89 Posts

Posted - 2009-02-03 : 05:38:46
quote:
Originally posted by raky

There is no trick to solve any error. Just understanding the error message correctly helps us to max extent to solve the error. On practise u will solve the errors quickly if it arises again....Just what u need is practise



ok thanks.
Go to Top of Page

sital
Yak Posting Veteran

89 Posts

Posted - 2009-02-03 : 05:38:48
quote:
Originally posted by raky

There is no trick to solve any error. Just understanding the error message correctly helps us to max extent to solve the error. On practise u will solve the errors quickly if it arises again....Just what u need is practise



ok thanks.
Go to Top of Page

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2009-02-03 : 05:42:35
Seriously though (and this will be the last post here unless you stop talking about vague non issues).

If it's in Management studio (which I generally work in all the time). Assuming this is an in vitro SQL error (syntax - error condition whatever) I check the messages tab.

Looking for messages like this:

Msg 208, Level 16, State 1, Line 1
Invalid object name 'bar'.


Normally the text of the message helps me understand what went wrong.

If the problem is not an ERROR per se: something happened that I didn't expect to happen but it didn't FAIL some syntax / referential check then things get complicated -- that's when you have to:

1) Know your schema
3) Know how your code works -- what could possibly go wrong. Do you have enough debug logic in there.

If whatever I'm running just hasn't finished when I expected it to then I'll start looking at running jobs on the database. If there is a problem with the Application using the database my company builds then I've got access to the code and can run my own application in an IDE -- I can then breakpoint the code / trap exceptions / the usual.

In answer to the question:
quote:
I would like to know if there is any idea or trick which you usually apply to solve any error?

NO -- there is NO trick / method that will work for all possible errors.




Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page
   

- Advertisement -