传递的值有问题吗? 解决方案 经过长时间的努力,我们终于解决了这个问题.我只是想分享原因.我们的构建团队维护一个单独的内部工具来部署脚本,该工具在内部触发 SQLCMD(shell)实用程序以在数据库中执行 T-SQL 脚本.罪魁祸首是:默认情况下,QUOTED_IDENTIFIER 在 SQLCMD 模式下运行时为 OFF!通过此工具运行的每个脚本都是在 QUOTED IDENTIFIER OFF 的情况下创建的.我们是唯一使用索引视图的模块.你在我以前的帖子中很熟悉的所有剩余故事:(注意:我会投票给每个人的帖子都有用.I am stuck in a rather strange problem with SQL Server 2005, which throws (using as SP) to the particular table. This worked fine earlier but is throwing this error randomly.I have verified the SP. We didn't manually specify SET QUOTED IDENTIFIER settings inside, so it must be ON by default.Can someone clarify what could be the problem?The table must be created with SET QUOTED IDENTIFIER ON right? I didn't check the table script yet.I have observed that this problem only occur with the SPs doing insert or update on a date column (modifiedAt)... A sample value is '2009-08-10 06:43:59:447'..Is there a problem with the values passed? 解决方案 After a long struggle we were able to fix this problem. I just wanted to share the reason.Our build team maintains a separate in-house tool to deploy scripts, which internally triggers the SQLCMD (shell) utility to execute T-SQL scripts in a db.Here is the culprit: by default, QUOTED_IDENTIFIER is OFF when running in SQLCMD mode!Every script run through this tool is created with QUOTED IDENTIFIER OFF. We are the only module which uses indexed views. All the remaining stories you know well in my previous posts :(NOTE: I am going to vote everyone's post as useful. 这篇关于插入记录时,SET QUOTED IDENTIFIER 应为 ON的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-22 12:08
查看更多