SQL Server: How to generate object scripts without DMO/SMO?
i want to generate scripts for database objects, e.g. tables views stored procedures functions Since: SQL Server Management Objects (SMO) SQL Distributed Management Objects (SQL-DMO) (depricated) are not installed on a fresh install of: Windows XP Windows Vista Windows 7 nor are they redistributable, they are not an option ( it will run on a customer's machine ). ( EDIT : It looks as if SMO is actually redistributable as of today.) Is there any source code that converts SELECTs from system tables into associated scripts? i'll start us off with the pseudo-code that scripts a stored procedures,