SQL Server – How to Reverse Engineer Database Diagram

database-diagramsscriptingsql server

I've been trying to find an option similar to MySQL Workbench 'Reverse engineer' for MSSQL Server 2012. I want to generate the SQL script from a diagram I've created. Is such option available for SQL Server? Or would I have to use a third party solution for this?

I tried googling for a solution but I couldn't find anything related.

Thank you.

Best Answer

I probably overlooked this so I'm sorry if I posted this question in vain but I consider this solved. I Expanded the 'Tables' folder of my database and found out that the tables were already there. I'm not sure if they're automatically generated as you build the diagram or if they're created once you generate a backup. All I did was to generate a .bak and a .sql file through the 'Tasks' menu, using the 'Back up...' and 'Generate Scripts...' sub-menus. Again I probably overlooked this before generating a backup and they were already there.