Is there a tsql command on sqlserver 2008 which can be run in order to enable Database Diagramming instead of this dialog appearing:
This database does not have one or more of the support objects required to use database diagramming. Do you wish to create them?
This is the code required to create the objects to enable database diagramming.
Yeah, but first you have to select the option 'YES' to create the support objects to use database diagramming.Later run the below select query under the DB where Database Diagramming needs to be configured.
select * from dtproperties
Alter the table dtproperties by inserting a column 'uvalue' to the table with the below query.As the column will be used in sproc
ALTER TABLE dtproperties ADD [uvalue] nvarchar
So finally right click on the DB to create Database diagramms[Invalid Column name1
The script is a little too long to add here, but here's what you can do. 1) Create a new database. 2) Start sql server profiler 3) Click the "Database Diagrams" folder in management studio. 4) Clear the profiler. 5) Confirm the message box with a prompt to enable diagramming. 6) Profiler now contains the script that enabled diagramming. 7) Select the script in profiler and copy the output from the bottom pane.
Kim