In sql server 2005/2008, can anyone please advise me on how can i generate scripts automatically of all the objects that let say starts with “Client_”
I already have a query that identifies all the object that starts from “client_”, but i also want to generate there scripts automatically. Doing it manually is a huge task.
select name,type_desc
from sys.objects
where object_definition(object_id) like '%client_%'
Please advise
Massive thanks
Amit
I think you should use
sp_helptextsystem procedure within your select statement.Also you could use database cursor to perform execution of
sp_helptextin a loop:Additional solution is to use
sys.syscommentssystem view. Example: