none
set arithabort on RRS feed

  • Question

  • How can I grant execute permission to a user to to execute this text command “set arithabort on”  or is there a way to create a own SP for this text command.

    Any help is appreciated.

    Wednesday, October 31, 2012 2:19 PM

Answers

  • To expand a little bit on Scott's answer, you can put that statement inside a stored procedure.  But that changes the setting only while the stored procedure is running.  When the stored procedure completes, the setting of that (and all other SET options) is returned to the value that the option had before the stored procedure was called.

    Tom

    • Proposed as answer by Dalibor Vrsajko, MCSD Wednesday, October 31, 2012 3:50 PM
    • Marked as answer by NaveenCR Wednesday, October 31, 2012 6:25 PM
    Wednesday, October 31, 2012 3:48 PM

All replies

  • All users have permission to do that. 

    Tom

    Wednesday, October 31, 2012 2:28 PM
  • Is there a way to create own sp for this command
    Wednesday, October 31, 2012 2:43 PM
  • As Tom already indicated, any user can execute this statement.  You could create a stored procedure to do that, but it would not have any useful effect.  Please read the documentation on "create procedure" and "set arithabort" and "set ansi_warnings" before you do anything since you need to understand the relationships.  Perhaps the better question to ask is why arithabort is set off for the connections to your database - since the default is ON. 
    Wednesday, October 31, 2012 3:05 PM
  • To expand a little bit on Scott's answer, you can put that statement inside a stored procedure.  But that changes the setting only while the stored procedure is running.  When the stored procedure completes, the setting of that (and all other SET options) is returned to the value that the option had before the stored procedure was called.

    Tom

    • Proposed as answer by Dalibor Vrsajko, MCSD Wednesday, October 31, 2012 3:50 PM
    • Marked as answer by NaveenCR Wednesday, October 31, 2012 6:25 PM
    Wednesday, October 31, 2012 3:48 PM