Archive
Index was outside the bounds of the array. (Microsoft.SqlServer.Smo) – SQL Server ‘Denali’
Today morning, I read a post on Pinal’s blog. I tried to reproduce the issue, but was unable to do so. Instead, I ran into a different error:
However, this does not stop you from connecting.
You can see from the screen shot that I was able to connect to the Instance, despite the error message. Also, I can access the data without any issues.
I was a bit curious and also tried this on SSMS 2005. And guess what, the same error appears there:
But the consequences are more “SEVERE” in SSMS 2005. You can access the Database, execute queries against it without any issues.
However, the Object Explorer tree does not expand.
Connect Feedback Item : https://connect.microsoft.com/SQLServer/feedback/details/666386/index-was-outside-the-bounds-of-the-array-microsoft-sqlserver-smo-while-connecting-from-ssms-2005-2008
Hope This Helps!
Vishal
If you like this post, do like my Facebook Page -> SqlAndMe
EMail me your questions -> Vishal@SqlAndMe.com
Follow me on Twitter -> @SqlAndMe
“Denali” – Issue with command-line options – SQL Bug
Earlier, I posted about how to connect to a SQL Instance automatically when you launch Management Studio using command-line options.
Management Studio Startup Parameters – Tips & Tricks
This seems to work fine with Management Studio 2005 / 2008.
However, The new version “Denali” seems to have some issue with it.
First of all, the syntax is changed a little bit for “Denali”:
Instead of using:
SSMS -S SERVERNAME\INSTANCENAME -E
you need to add a full colon “:” between the switch and values:
SSMS -S:SERVERNAME\INSTANCENAME -E
This will work fine with “Denali” if you launch SSMS.exe from command-line.
But, if you update the shortcut target for Management Studio as below, you will run into error.
Once, you change the Target, and then launch the SSMS from shortcut, you won’t be connected to “VISHAL\DENALI” instance. Instead, you will get the “Connect to Server” dialogue box:
Now, another issue here is, even if you manually click on “Connect” or “Cancel” on “Connect to Server” dialogue box. Management Studio will not launch. Instead, you will get another error message and Management Studio will close!
Workaround:
Do not use command-line options in shortcut target. If you need to use command-line options launch the Management studio from command prompt.
How to launch Management Studio from command prompt:
1. Go to Start > Run > cmd.exe
2. Type below command (With Quotes) and press Enter (Replace “VISHAL\DENALI” with correct instance name):
cd\”Program Files\Microsoft SQL Server\110\Tools\Binn\ManagementStudio”
SSMS.exe -S:VISHAL\DENALI –E
3. If you want to use SQL Authentication : use below command (With Quotes) and press Enter (Replace “VISHAL\DENALI” with correct instance name):
cd\”Program Files\Microsoft SQL Server\110\Tools\Binn\ManagementStudio”
SSMS.exe -S:VISHAL\DENALI -U:sa -P:MyStrongPassword
Hopefully this will be fixed soon, I have submitted this bug to Microsoft, you can check it on below link:
Command Line Options Not working for SSMS | Microsoft Connect
Hope This Helps!
Vishal
If you like this post, do like my Facebook Page -> SqlAndMe
EMail me your questions -> Vishal@SqlAndMe.com
Follow me on Twitter -> @SqlAndMe