Results 1 to 4 of 4
  1. #1
    Join Date
    May 2005
    Posts
    30

    Unanswered: Elevate warnings to errors

    Hi folks,
    I have an issue of capturing and handling some errors when using linked servers and exec and openquery commands. Basically, if the remote side fails for any reason the error I get is only mildly useful. The real reason for failure is contained in an associated warning.

    My question is how can I access the warning information so that it can be used (decision branching, logging, etc.) from within nested stored procedures.

    I know ado, etc. allow me to hook to wanring message events and listen but I need this to be totally server-side within the tsql world.

    Thanks for any ideas, pointers, solutions even!

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Use the CLR ?

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    May 2005
    Posts
    30
    Thanks Pat. Not an option here I'm afraid.

  4. #4
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Have you looked into sp_add_alert?
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •