Index was outside the bounds of the Array. (Microsoft.SqlServer.smo)

前端 未结 12 1696
有刺的猬
有刺的猬 2020-12-02 22:08

I am using SQL Server 2008 R2. It is working fine. But recently, I have changed my hosting server and I came to know that they have installed SQL Server 2

相关标签:
12条回答
  • 2020-12-02 22:10

    you must use new version of Management Studio. And also you will got an error 29506. so you should run as Administrator for setup. Look this site. http://shareis.com/post/29506-management-studio-express

    0 讨论(0)
  • 2020-12-02 22:11

    I had a similar experience with using SMO via C# with the stack trace:

    [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()
    

    It turned out my versions of the CLR/NCLI/SMO were 10.50.1600.1. Upgrading them to 10.53.6000.34 fixed it - thus allowing the 2008R2 SMO to do many things with 2012 and 2014 servers.

    Get them from the feature pack

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

    0 讨论(0)
  • 2020-12-02 22:14

    This is an issue if you are using 2008 management studio tools to connect to a SQL 2012 instance.

    I experience this a lot if I am working on one server with SQL 2008, and trying to quickly query another server that is running SQL 2012.

    I normally keep my personal workstation on the latest version of management studio (2012 in this case), and am able to administer all servers from there.

    0 讨论(0)
  • 2020-12-02 22:15

    Restarting the Management Studio worked for me.

    0 讨论(0)
  • 2020-12-02 22:16

    You have to use latest version with SSMS

    You can check latest builds via this page https://sqlserverbuilds.blogspot.com/

    0 讨论(0)
  • 2020-12-02 22:17

    It's very old problem with cashed content. MS planning to remove diagrams from SSMS, so they don't care about this. Anyway, solution exists.

    Just close Diagrams tab and open it again. Works with SSMS 18.2.

    0 讨论(0)
提交回复
热议问题