HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

SQL Server making arithmetic abort enabled

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
enabledsqlabortservermakingarithmetic

Problem

I am using SQL Server 2008.

In my stored procedures, I often have to call for XML data type, functions (like split).

Is it possible to permanently enable arithmentic abort for a database? I know it can be done using properties window > options but is there any script i can use to turn it on?

The reason to look for script is obvious; i have too many DBs to do it manually.

I assume set arithabort off and set arithabort on turns on arithabort only for the context.

Solution

As well as Marian's answer which is SQL Server Instance level, you can use ALTER DATABASE to set it individually. You can also use it on the model database so that all new databases inherit the setting

Context

StackExchange Database Administrators Q#11752, answer score: 4

Revisions (0)

No revisions yet.