Attempting to create a database diagram causes error "Index was outside the bounds of the array"
When attempting to create a new database diagram on an on premises SQL 2014 database using SQL Server Management Studio 16.5, an error window is shown with error "Index was outside the bounds of the array". Additionally, SSMS 2014 is able to create a database diagram just fine. When back in SSMS 2016, I can view the new diagram, but it is in a window on another monitor, with no ability to resize the window (window chrome is missing).
Database Diagrams is being deprecated for SSMS 18. As such, we have not planned any work on this feature for a while. Please use Visio or any of the 3rd party ER modeling tools for this functionality. I understand some of you may have dependency on this feature. You are welcome to continue using 17.9.1 if it works for you.
1. Would someone from Microsoft please fix the answer? This is no longer being depricated. It has been returned (by popular demand) to an official and fully supported part of the SQL Server Management experience. Leaving the accepted answer as the technology is depricated is a disservice to your customers attempting to find a solution for a very real problem they are having.
2. Include the work around: Close and re-run SQL Server Mangement Studio in an elevated security context (as Adminstrator). Right click on the icon, select "Run as Admin".
I got to this same issue on SSMS 18.5 as it was working and suddenly it did not allow me to modify nor create anymore. Nevertheless I found a fix to it. Just close SSMS and run as administrator and it will work again.
Bug still exists in 18.4. Diagrams very buggy. Anyone recommendations for a free tool to create tables and foreign keys in a diagram?
Longstreet, James [USA] commented
The deprecation also deprecates the ability to create a view with the right click feature of create view from view. That said, the diagram icon still appears on the menu. Why would there be a diagram icon on the menu if it is deprecated?
Do you have a comment or suggestion to improve SQL Server? We’d love to hear it!
Fix the diagramming
Jay (Jules) Walker commented
Will Visio you say. Seems you removed that feature in Visio 2013. What gives? I actually preferred the Visio DB tool. Sooo. any chance you are adding it back to Visio?
Étienne Thouin commented
Database Diagrams have been reinserted in SSMS 18.1 as per popular demand.
Microsoft Support recognizes this as a critical bug.
Diagrams are part of SQL Server feature offering, and there has been no effort from Microsoft Marketing to communicate withdrawal of this feature since 18.1.
As this is a critical bug on a recognized feature, it should be a priority.
What is Microsoft Support's stand on this?
For those coming later and finding the official answer lacking, the correct fix is to run SSMS as administrator. It's a shame the official answer couldn't deign to give that info.
That's not even close to appropriate. I'm not going to install Yet Another Tool to do that. This is a database thing, include it with the database management tools.
Additionally, OP is talking about an older version which has absolutely nothing to do with SSMS 18. Learn to read.
I am getting familiar with SQL server 2016. I tried to click on "New Database Diagram" and got an error message. Someone from Windows is telling us to use that option ER modelling in VISIO. I have a MAC.
I thought SQL server was more powerful than MS ACCESS. What a big disappointment
Alejandro E Beltran commented
I do not want this feature to go away. It is a pain managing diagrams in a third party tool or Visio. I like them right there in the DB
Not keeping this feature in SQL Server Management Studio is a bad idea. It will be a pain in the neck to manage and modify table relationships using Visio. Not to mention making the whole process more complicated than it should be. This is a step backwards.
Deprecated??? Someone lost his bet and now forced to make this decision as a punishment? It is a very annoying decision as others wrote earlier.
For everyone asking why they would deprecate this feature - look at the answer - BUY Visio! Why give a free tool when they have an application they can sell you? It used to be that Visio was licensed as part of the MSDN subscription - but they have removed that from there as well (well, it might be in the crazy expensive enterprise license) - but pretty much now you need to spend a bunch of money on it - or go buy a competing product. Pretty ridiculous really - it's not a lot cheaper than buying a license of SQL Server. Definitely a lot more than SQL Express ;) Considering the database diagram is much less capable than Visio - you might think they would leave it there giving customers the option to go to Visio when it is justified.
Zac Boyles commented
**** Fix ****
As Chuck Bevitt mentioned, this works if you run SSMS as admin. I'm not sure where Dinakar's comments fit into the future but as of today, running as admin fixed this issue on the new machines I installed SQL Server v17.9.1 Dev Ed on.
John Lehew commented
The diagram tool has been there for 20+ years. It should be grandfathered in!
Please add a more respectable message to display when someone tries to utilize the diagram tool.
I'm not sure what the issue is but it should not be that difficult to retain that functionality. I suspect it cannot diagram the graph tables and other database technologies being added to the MS SQL Data Platform. Based on actions it seems MS is focused much more on adding data platform capabilities (which is great) than on maintaining their tools
Mark Woodlief commented
Pathetic.. Likely a PM made the choice to cut it without asking the community..
Earle Sauls commented
Why deprecate such a useful feature? Microsoft please reconsider this stupid move!
Zubeid Hendricks commented
"Database Diagrams is being deprecated for SSMS 18...Dinakar" No ways!!!!! Are you saying we have to go and create this manually? Please, can you add this feature back!
What on earth is wrong with you people?