Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jassie
Constraint Violating Yak Guru
332 Posts |
Posted - 2011-03-01 : 09:57:32
|
| I would like to know the following:1. What t-sql can I use to see if a stored procedure has changed? I want to see the last modified date? Would I look atsysobjects?2. What t-sql would I use to see if a view and function changed. I would like to see the last modified date? Would I look atsysview? |
|
|
MIK_2008
Master Smack Fu Yak Hacker
1054 Posts |
Posted - 2011-03-01 : 10:21:44
|
1) if you are using SQL 2008 you can use Sys.objects to get what you need e.g. what SPs are changed .. Where CreatedDate< ModifiedDate and the last modified date is obvious 2) Same is the case for Views and FunctionsCheersMIK |
 |
|
|
jeffw8713
Aged Yak Warrior
819 Posts |
Posted - 2011-03-01 : 16:09:26
|
| Use the Schema Changes History report - which gets this information from the default trace. It will only go back a couple of weeks, so you might want to use profiler to get the actual SQL that is used and extract that information on a scheduled basis.Jeff |
 |
|
|
|
|
|