nbkd72e
asked on
How to reverse-engineer the DDLs of all database objects with a script?
I need a mechanism which could be executed in a script (either Windows or UNIX) to generate the DDLs of re-creating all DB objects (tables, views, stored procedures etc.) in a given SQL Server 2008 database.
Any suggestion?
Any suggestion?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
SMO sounds like a promising solution. Yes, code would be very helpful.
I can write code for you, but it might take time. you can read the article below and help yourself -
http://philergia.wordpress.com/2011/02/28/using-powershell-and-smo-to-script-sql-server-database-objects-3/u
http://philergia.wordpress.com/2011/02/28/using-powershell-and-smo-to-script-sql-server-database-objects-3/u
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks folks. Now I have enough information to start with my solutions, probably powershell + SMO. It would be even better if SMO has a Java interface.
ASKER