Sql-server – SQL Server 2008 R2 Express Edition – generating database create script

schemascriptingsql-server-2008

I need to script a database schema out to T-SQL for inclusion source control. The Express version of SSMS doesn't seem to let you script the entire database, just individual tables. Are there any free tools (scripts or otherwise) that can do this ?

Best Answer

This SQL script is a SQL Server 2005 table scripting tool that I wrote to reverse engineer a database schema to SQL. It might do what you want. Load it in SSMS and set 'Results to Text' from the menu. Then run the script. It will reverse engineer most of the major database objects.