• Jeff Moden (11/26/2010)


    bjhogan (11/26/2010)


    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.

    Can you post the script, please?

    Yes, this would be very useful. Perhaps even worthy of an article here on SSC!

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2