tsql-设置选项
我正在使用脚本重建索引,该脚本根据预定义的填充因子重新组织或重建索引。
它位于 SQl 2000 上。
我的脚本中有以下 SET 选项:
SET ANSI_WARNINGS OFF
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
我收到以下错误:
DBCC 失败,因为以下 SET 选项设置不正确: 'ANSI_WARNINGS, ARITHABORT'
那么,它是否告诉我应该打开 ANSI_WARNINGS关闭并包括 ARTHABORT 到打开?
我对此感到困惑。有什么建议吗?
I am rebuilding indexes using a script which reorganises or rebuilds indexes according to a predefined fill factor.
It is on SQl 2000.
I have the following SET options in my script:
SET ANSI_WARNINGS OFF
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
I am getting the following error:
DBCC failed because the following SET options have incorrect settings: 'ANSI_WARNINGS, ARITHABORT'
So, is it telling me that i should turn ANSI_WARNINGS OFF AND INCLUDE ARTHABORT TO ON?
I am confused with this. Any advice?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您想要:
您可以在此处查看有关此内容的更多详细信息:
http://support.microsoft。 com/kb/301292
当您迁移到 SQL Server 2005+ 时,您应该使用 ALTER INDEX REBUILD/REORGANIZE 而不是 DBCC 命令。另外,强烈建议您查看 SQLFool 和 Ola 的选项,它们可以使您的重新索引和重建工作变得更加容易:http://sqlfool.com/2009/06/index-defrag-script-v30/ 和 http://ola.hallengren.com/ 我不记得其中任何一个是否适用于 2000,但值得一试。
I think you want to have:
You can see more detail about this here:
http://support.microsoft.com/kb/301292
When you move to SQL Server 2005+ you should use ALTER INDEX REBUILD/REORGANIZE as opposed to DBCC commands. Also, strongly suggest you check out SQLFool's and Ola's options, they can make your reindexing and rebuilding jobs much easier: http://sqlfool.com/2009/06/index-defrag-script-v30/ and http://ola.hallengren.com/ I don't remember if either of these will work on 2000 but worth checking out.
来自 SQL Server 2000 的SET ANSI_NULLS(但是,后续版本同样适用):
所以,两者都应该打开
From SET ANSI_NULLS for SQL Server 2000 (however, same applies to later versions):
So, both should be ON