• Have you tried doing this through Powershell? You can easily access the the SQL Server SMO to script out the objects to a file. I hadn't used powershell at all until this past Monday and within a few hours had a script that would dump the schema to a file. It's really really easy. And the code to do this is much more compact than using stored procedures.