I need to create a SQL script to generate a Database diagram.
It should accept two parameters:
- DB name
It should create a database diagram in Database Diagrams folder with the underlying tables in the given schema.
I am trying to find the system stored procedure which is being called when we create it by UI.
Please suggest some approach to accomplish this task.