Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am using SQL Server Management Studio 2008. I am connect to localhost and I want to create a database. When I click on New Database, type the name and click ok, I get the message:

Index was outside the bounds of the array (Microsoft.SQLServer.Smo).

share|improve this question

migrated from stackoverflow.com Mar 25 '13 at 14:37

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 5 down vote accepted

Perhaps you have Management Studio 2008 and your localhost is a newer version. If this is the case, you should always use the most recent version of Management Studio even if you sometimes manage lower versions. You can determine the version of the engine you're managing by looking at the top-level node in Management Studio's Object Explorer - 2008 is going to show 10.0.xxxx, 2008 R2 is going to show 10.50.xxxx, and 2012 is going to show 11.0.xxxx. You can tell what version of the client tools you have by going to Help > About.

Another possibility is that you are still using the RTM version of Management Studio 2008. If this is the case, you should apply SP3 (if you are in fact on 2008) or apply SP2 (if you are on 2008 R2, which a lot of people confuse with 2008).

Your best bet, IMHO, is going to be to uninstall the 2008 client tools entirely and install Management Studio 2012 (in SP1, the client tools are now free and fully functional). Not only does it have far fewer bugs like this, and plenty more features, but you won't have to do this later when you have to manage your first 2012 instance (which the 2008 tools aren't going to be very good at).

In the meantime, instead of using the UI as a crutch to create a database, you could learn the DDL and perform this in a query window, which won't have any problems:

CREATE DATABASE MyNewDatabaseName;

You can learn more about the CREATE DATABASE syntax in Books Online.

share|improve this answer
    
Tnx, I just install Management Studio 2012 and it worked. –  Marija Todorović Mar 25 '13 at 18:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.