February 28, 2009 at 4:02 am
i want to pass to_date and from_date to a SP and wanted to get the latest modified SP's,Views and Functions and after wanted to get the script of that view or sp or function and Pump the code to a File In a Particular Path like 'd:\Scripts' or so and need to the order as in a particular order like 1 function,
2 views,
3 sp's
ignore tables and other
February 28, 2009 at 6:01 am
what have you tried so far?
you can find all the modified dates and creation dates in sys.objects;
filter the type column for types like 'P' and 'FN', etc
sp_helptext gives you the text of anything except a table; to loop thru that collection, i would probably use a cursor myself.
are you sure you want to write to a file from TSQL? programming languages have a much easier interface to write to a file....
have you looked in the scripts section or googled on hoe to write to a file from TSQL?
sreeman.chakka (2/28/2009)
i want to pass to_date and from_date to a SP and wanted to get the latest modified SP's,Views and Functions and after wanted to get the script of that view or sp or function and Pump the code to a File In a Particular Path like 'd:\Scripts' or so and need to the order as in a particular order like 1 function,2 views,
3 sp's
ignore tables and other
Lowell
February 28, 2009 at 6:05 am
Please post in an appropriate forum next time. The article discussion forums are for discussion of published articles
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply