

Use AdventureWorks2017 EXEC sp_changedbowner ‘sa’ĭo you have anything you want me to cover on my next article? Write them down on the comment section down below.Īlternatively, find more interesting topics on JILAXZONE: FREE! If the database is “AdventureWorks2017” and the login id used is “sa”, this is the command you need to run on SSMS. Run the following command to resolve the issue. You may encounter Error 15517 when creating Database Diagram – SQL Server (Microsoft SQL Server, Error: 15517)”, typically the error is because the database owner isn’t the same as the user you are using to login to database.

When restoring AdventureWorks database (or any other database) then tried creating Database Diagram, you may get this error, “Cannot execute as the database principal because the principal “dbo” does not exist, this type of principal cannot be impersonated, or you do not have permission. SQL Server Error: 15517, Principal “dbo” does not exist That’s it! You can redo step #3 to step #8 above on any database you have on SQL Server. If the auto-arrangement is not good enough for you, you can arrange yourself. Generate Latest AdventureWorks Database Diagram (works too for any databases)ġ) Ensure you have SQL Server up database and running, ensure too you have the SQL Server Management Studio (SSMS).Ģ) Ensure you have restored AdventureWorks database (refer here for detail steps).ģ) Open SSMS then open and expand the AdventureWorks database (or any other database you want to generate the database diagram).Ĭlick on Arrange Tables to arrange the Database Diagram tables – SQL ServerĨ) If needed to arrange the tables, do right click on the empty space, and choose “Arrange Tables”. And the good thing is that, this steps is regardless of which version of the AdventureWorks is and also can be used to generate database diagram for other databases as well.
Download adventureworks database for sql server 2017 how to#
Image above is showing the latest AdventureWorks2017 database diagram, however FYI, the database diagram shown above doesn’t have complete set of AdventureWorks tables – I just select what I needed.īut don’t worry, in case the diagram isn’t sufficient for your work, here I’ll show you how to generate the database diagram yourself. Training using the latest Microsoft SQL Server AdventureWorks database and need the latest database diagram?Īs of when this article is written, the latest AdventureWorks database is AdventureWorks2017, found here.
