August 9, 2016 at 12:35 pm
Is there some way to capture
"The module '% depends on the missing object '%'. The module will still be created; however, it cannot run successfully until the object exists."
errors?
It does not cause the CATCH clause of TRY...CATCH to trigger...
Any ideas?
August 9, 2016 at 1:03 pm
AFAIK, errors with severity 10 or lower can't be captured as they're basically warnings.
August 10, 2016 at 6:32 am
Bit of a kludge, but I've found a way. In short,
- create a trace to capture User Error Message events
- script out the trace definition
- start the trace
- run sp_refreshsqlmodule on all modules
- stop the trace
- get the results: SELECT TextData FROM fn_trace_gettable('<output file>.trc', 1) WHERE TextData is not null
- delete trace (optional)
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply