Error: 1934 INSERT failed because the following SET options have incorrect settings: 'ARITHABORT'.
2012-12-18 14:18
429 查看
今天对一个Index做了调整,为了提高性能将Index修改为FilteredIndex,结果一个JAVA程序出现了下面的错误:
Error: 1934, Severity: 16, State: 1
INSERT failed because thefollowing SET options have incorrect settings: 'ARITHABORT'. Verify that SET options are correct for use withindexed views and/or indexes
on computed columns and/or filtered indexes and/orquery notifications and/or XML data type methods and/orspatial index operations.
抓了一个ProifilerTrace看到出错的语句就是普通的DML插入语句,而且将语句放到SSMS中可以正常执行,但是在程序中一直失败。没有办法将Fliter
Index删除程序恢复正常。
后来查到使用Filter Index,要保证一些SET选项正确:
*SettingANSI_WARNINGS to ON implicitly sets ARITHABORT to ON when the databasecompatibility level is set to 90 or higher. If the database compatibility levelis set to 80 or earlier, the ARITHABORT option must explicitly be set to
ON.
If the SET options areincorrect, the following conditions can occur:
· The filtered index isnot created.
· The Database Enginegenerates an error and rolls back INSERT, UPDATE, DELETE, or MERGE statementsthat change data in the index.
· Query optimizer does notconsider the index in the execution plan for any Transact-SQL statements.
所以使用Filter Index大家一定要谨慎,而且要经过充分的测试之后再放到正式环境。
其实ARITHABORT微软建议是设为开启,默认为开启(参考下文),不知道开发人员为什么要设置为OFF。
http://msdn.microsoft.com/zh-cn/library/ms190306.aspx
Error: 1934, Severity: 16, State: 1
INSERT failed because thefollowing SET options have incorrect settings: 'ARITHABORT'. Verify that SET options are correct for use withindexed views and/or indexes
on computed columns and/or filtered indexes and/orquery notifications and/or XML data type methods and/orspatial index operations.
抓了一个ProifilerTrace看到出错的语句就是普通的DML插入语句,而且将语句放到SSMS中可以正常执行,但是在程序中一直失败。没有办法将Fliter
Index删除程序恢复正常。
后来查到使用Filter Index,要保证一些SET选项正确:
SET options | Required value |
ANSI_NULLS | ON |
ANSI_PADDING | ON |
ANSI_WARNINGS* | ON |
ARITHABORT | ON |
CONCAT_NULL_YIELDS_NULL | ON |
NUMERIC_ROUNDABORT | OFF |
QUOTED_IDENTIFIER | ON |
*SettingANSI_WARNINGS to ON implicitly sets ARITHABORT to ON when the databasecompatibility level is set to 90 or higher. If the database compatibility levelis set to 80 or earlier, the ARITHABORT option must explicitly be set to
ON.
If the SET options areincorrect, the following conditions can occur:
· The filtered index isnot created.
· The Database Enginegenerates an error and rolls back INSERT, UPDATE, DELETE, or MERGE statementsthat change data in the index.
· Query optimizer does notconsider the index in the execution plan for any Transact-SQL statements.
所以使用Filter Index大家一定要谨慎,而且要经过充分的测试之后再放到正式环境。
其实ARITHABORT微软建议是设为开启,默认为开启(参考下文),不知道开发人员为什么要设置为OFF。
http://msdn.microsoft.com/zh-cn/library/ms190306.aspx
相关文章推荐
- INSERT failed because the following SET options have incorrect settings: 'ANSI_PADDING'. Verify that
- INSERT failed because the following SET options have incorrect settings: 'QUOTED_IDENTIFIER'.
- Error: 1934 SET options have incorrect settings: 'ARITHABORT'.
- The call to LoadLibrary(YourExtensionName) failed, Win32 error 0n14001, “This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.”
- [-] Auxiliary failed: Msf::OptionValidateError The following options fa
- The server method '' failed with the following error:" .... and no error description
- INSERT 失败,因为下列 SET 选项的设置不正确: 'ARITHABORT' SET ARITHABORT ON | OFF
- Job for vsftpd.service failed because the control process exited with error code. See "systemctl sta
- Ant BUILD FAILED The following error occurred while executing this line: xxx 解决方案
- Retrieving the COM class factory for component with CLSID … failed due to the following error: 80070005.
- Titanium [ERROR] ** BUILD FAILED ** [ERROR] The following build commands failed: [ERROR]
- Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details
- Jquery 报错 Uncaught InvalidStateError: Failed to set the 'value' property on 'HTMLInputElement':
- Job for php-fpm.service failed because the control process exited with error code. See "systemctl st
- Dockers Job for docker.service failed because the control process exited with error code
- windows 2008 下C#调用office组件访问拒绝的解决方法(failed due to the following error: 80070005 拒绝访问)
- 解决Docker启动服务器链接失败-Job for docker.service failed because the control process exited error code
- failed due to the following error: 80070005解决办法.
- Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.
- Failed to execute request because the App-Domain could not be created. Error: 0x80131902