Showing posts with label arithabort. Show all posts
Showing posts with label arithabort. Show all posts

Wednesday, February 15, 2012

Error Handling in SQL

Hello Group,
I need help on handling an error. I am trying to handle errors raised by
DBCC DBREINDEX. To force a test I have SET ARITHABORT OFF and SET
QUOTED_IDENTIFIER OFF and issued the statement against a table with a
calculated column.
That raised the "DBCC failed because the following SET options have
incorrect settings: 'QUOTED_IDENTIFIER, ARITHABORT'." error.
My problem is that procedure exits after this error and no statement is
executed after it. I cannot catch it, check its number or continue on the
procedure. How can I do that?
Thanks!
Giovanni BassiAs the batch terminates, there's not much you can do at the TSQL level when you've hit the error. So
you need to prevent it. DBCC USEROPTIONS will show you the value for these options.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Giovanni Bassi" <gbassi@.coair.com> wrote in message news:%234sQc0frDHA.2556@.TK2MSFTNGP09.phx.gbl...
> Hello Group,
> I need help on handling an error. I am trying to handle errors raised by
> DBCC DBREINDEX. To force a test I have SET ARITHABORT OFF and SET
> QUOTED_IDENTIFIER OFF and issued the statement against a table with a
> calculated column.
> That raised the "DBCC failed because the following SET options have
> incorrect settings: 'QUOTED_IDENTIFIER, ARITHABORT'." error.
> My problem is that procedure exits after this error and no statement is
> executed after it. I cannot catch it, check its number or continue on the
> procedure. How can I do that?
> Thanks!
> Giovanni Bassi
>