When I tried to created a database diagram (expand the DB name on Object Explorer, right click on Database Diagrams and select New Database Diagram), I got this error message:
I executed sp_helpdb DBName and got the owner as domain\vrainardi. Then I realise that I actually working offline. My laptop is not connected to the network. Hence no domain, and my user ID becomes invalid, or unauthenticated to be more precise. This is regardless that I’m working on local SQL Server instance, i.e. localhost!
Following the hint on the error message I opened the Files page of the Database Property and got:
So I changed the owner to sa and now when I try to create a database diagram I get:
which is normal. This is because the diagram support objects has not been installed. Instead of going straight to New Database Diagram I should have selected Install Diagram Support first, or so I thought:
But when I clicked on Install Diagram Support as above, I got the same error message again:
So I went back to click New Database Diagram and after clicking yes to the “install diagram support” dialog box, it came up with the Add Table screen*:
*20 years ago a modal box like that used to be called a “dialog box”, but these days people call them “screen” and “page”. I guess if it’s web app then “page” is appropriate but if it’s a Windows app? Well it’s probably right, because Windows app used to be a GDI (form based), but these days it’s WPF.
Any way, now I can create my database diagram/ERD.