m******y 发帖数: 588 | 1 When I'm running EXEC master..xp_cmdshell 'osql .. test.sql ..', I'm not
able to use @@ERROR to catch any error happening when executing test.sql
using osql utility. Is there anyway to error handling that? Thanks. | m******y 发帖数: 588 | 2 Right now whatI did is to write the osql result into a log file and then use
EXEC sp_readerrorlog to find some keyword 'error' ,'invalid object' etc to
handle the errors.
Does anyone know a better way to do this?
Thanks again. |
|