How to get Error Message

  • In sql server suppose I do a

    Select * from tt

    Here tt is not there in DB

    So it will give a error as

    Msg 208, Level 16, State 1, Line 1

    Invalid object name 'tt'.

    I want to view " Invalid object name 'tt' "

    Now can anybody help me from where we can get this error message history.

    Is there any tool from where we can view this error messages.

    ITS very URGENT

    Please let me know

  • When you run any query, its results get saved in @@error variable.If the earlier statement is correct then the value is saved as 0 else some number, search the sysmessages table with that error number and you will get the required output, but this output needs to be customised.

  • i am using a vendor product and it is giving error.

    I want to check from the sql side where is the error.

    I cant make any changes to the system.

    I believe there should be a way SQL stores all this exception for that instance.

    I want to view this error messages..

  • I dont think they are saved somewhere, it internally runs the same logic I said above and populates the values.

    You need to customize your code to get the output.

  • thank a lot..i figured it out.

    I enable warnings in the sql profile trace.

    It was simple

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply