Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /***************************************************************************/
- /******************************TEST FOR ARITHABORT ON***********************/
- /***************************************************************************/
- DECLARE @options TABLE ([name] nvarchar(35), [minimum] int, [maximum] int, [config_value] int, [run_value] int);
- INSERT INTO @options ([name], [minimum], [maximum], [config_value], [run_value])
- EXEC sp_configure 'user_options';
- SELECT 'ARITHABORT ' + CASE WHEN ([config_value] & 64) = 64 THEN 'ON' ELSE 'OFF' END
- FROM @options;
- /***************************************************************************/
- /******************************SET ARITHABORT ON****************************/
- /***************************************************************************/
- -- NOTE: By enabling this at the instance level all .net clients will automatically start connecting with using SET ARITHABORT ON
- DECLARE @options TABLE ([name] nvarchar(35), [minimum] int, [maximum] int, config_value] int, [run_value] int);
- DECLARE @Value INT;
- INSERT INTO @options ([name], [minimum], [maximum], [config_value], [run_value])
- EXEC sp_configure 'user_options';
- SELECT @Value = [config_value] | 64
- FROM @options;
- EXEC sp_configure 'user_options', @Value;
- RECONFIGURE;
- SELECT * FROM @options; -- prior state
- EXEC sp_configure 'user_options'; -- current state
- /***************************************************************************/
- /******************************SET ARITHABORT OFF***************************/
- /***************************************************************************/
- DECLARE @options TABLE ([name] nvarchar(35), [minimum] int, [maximum] int, [config_value] int, [run_value] int);
- DECLARE @Value INT;
- INSERT INTO @options ([name], [minimum], [maximum], [config_value], [run_value])
- EXEC sp_configure 'user_options';
- SELECT @Value = [config_value] & ~64
- FROM @options;
- EXEC sp_configure 'user_options', @Value;
- RECONFIGURE;
- SELECT * FROM @options; -- prior state
- EXEC sp_configure 'user_options'; -- current state
Add Comment
Please, Sign In to add comment