指数数组的边界之外。 (Microsoft.SqlServer.smo)

我正在使用SQL Server 2008 R2 。 它工作正常。 但是最近,我更改了我的托pipe服务器,并且知道他们已经在服务器上安装了SQL Server 2012

现在,问题是,通过SQL Server 2008 R2与服务器数据库连接后,当我点击任何表名或存储过程,我得到错误: Index was outside the bounds of the array. (Microsoft.SqlServer.smo) Index was outside the bounds of the array. (Microsoft.SqlServer.smo)

那么,有没有问题从我这边或从服务器端? 我怎样才能防止这个问题?

将您的SqlServerpipe理工作室从2008年升级到2012年

或者下载SqlServer Management Studio的服务包并更新可能会解决您的问题

您可以从下面的链接下载SQL Server Management Studio 2012

Microsoft®SQLServer®2012 Express http://www.microsoft.com/en-us/download/details.aspx?id=29062

重新启动Management Studio为我工作。

对于我来说,这个问题在SSMS版本2016(13.0.16100.1)中依然存在。

一个体面的解决方法是不要使用“右键单击” – >“添加表格…”对话框,只需将要从对象浏览器添加的表拖动到图表面上。 将鼠标图标更改拖放到“添加”符号中,并在释放鼠标时添加表格。

每次都必须closuresSSMS。

错误消息背后的原因是SQL无法在旧的SQL Server版本中显示新function。

请将您的客户端SQL版本升级到与您的服务器Sql版本相同

如果您使用2008pipe理工作室工具连接到SQL 2012实例,则这是一个问题。

如果我正在使用SQL 2008的一台服务器上工作,并试图快速查询另一台运行SQL 2012的服务器,则会遇到这种情况。

我通常把我的个人工作站保留在最新版本的pipe理工作室(在这种情况下,2012),并能够从那里pipe理所有的服务器。

重新开始工作! 我发现同样的错误添加新表到我的数据库图上的SQL Server 2016年,重新启动SQL Serverpipe理工作室,终于解决了。

您必须使用新版本的Management Studio。 而且你会得到一个错误29506.所以你应该以pipe理员身份运行设置。 看这个网站。 http://shareis.com/post/29506-management-studio-express

我有类似的经验,通过C#使用SMO与堆栈跟踪:

 [1896] System.IndexOutOfRangeException: Index was outside the bounds of the array. [1896] at Microsoft.SqlServer.Management.Smo.BitStorage.SetBit(Int32 itemIndex, BitIndex bitIndex, Boolean value) [1896] at Microsoft.SqlServer.Management.Smo.SqlSmoObject.AddObjectPropsFromDataReader(IDataReader reader, Boolean skipIfDirty, Int32 startColIdx, Int32 endColIdx) [1896] at Microsoft.SqlServer.Management.Smo.SqlSmoObject.ImplInitialize(String[] fields, OrderBy[] orderby) [1896] at Microsoft.SqlServer.Management.Smo.SqlSmoObject.Initialize(Boolean allProperties) [1896] at Microsoft.SqlServer.Management.Smo.SqlSmoObject.OnPropertyMissing(String propname, Boolean useDefaultValue) [1896] at Microsoft.SqlServer.Management.Smo.PropertyCollection.RetrieveProperty(Int32 index, Boolean useDefaultOnMissingValue) [1896] at Microsoft.SqlServer.Management.Smo.PropertyCollection.GetValueWithNullReplacement(String propertyName, Boolean throwOnNullValue, Boolean useDefaultOnMissingValue) [1896] at Microsoft.SqlServer.Management.Smo.Information.get_MasterDBPath() 

原来我的CLR / NCLI / SMO的版本是10.50.1600.1。 将它们升级到10.53.6000.34就可以解决这个问题 – 从而允许2008R2 SMO在2012和2014服务器上做很多事情。

从function包中获取它们

https://www.microsoft.com/en-gb/download/details.aspx?id=44272

更新你的SQLpipe理工作室。 请参阅下面的MSDN链接

https://support.microsoft.com/en-us/kb/2459027

我在SQL-Server 2016中发现了一个图表和Schema的问题,可能对这个主题很有用。 我正在编辑图表(与“销售”模式有关的许多表格),并添加了一个表格,但忘记了声明它的模式,所以它是默认的“dbo”。 然后,当我回到,并打开了模式“销售”,并试图添加一个现有的表… Bluf! 这触发了该线程中描述的完全相同的错误。 我什至尝试了解决方法(拖动表),但没有奏效。 突然间,我发现模式是不正确的,我更新了它,再次尝试,尤里卡! 这个问题马上就离开了…关心。