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 |
|
hussainmsa
Starting Member
1 Post |
Posted - 2008-04-16 : 02:36:38
|
| Hi Guys,I am using Sql server 2005, i am trying to find out all the tables that modified recently. i cant find any last modified date!!.My situation is; i have altered so many tables, usually when i do alter i save the sql file for doing the same alteration in the production database. but somehow i lost the scripts and i am not sure what are the tables that i have modified and what is new.i dont want to overwrite the whole database.can anybody know how to get only the difference.thanks |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2008-04-16 : 03:06:24
|
| Try this in your database: SELECT * FROM sys.all_objects ORDER BY modify_date DESCHowever, I don't know how reliable the modify_date is. What you can do though to prevent this in the future is to create DDL-triggers in your database. Those will fire every time you do modifications in any of your procedures/tables/etc and will also let you save the old version if you want to. Look up "DDL Triggers" in BOL.--Lumbago |
 |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2008-04-16 : 03:08:05
|
| There are also quite a few tools out there that will connect to both the test- and production database and compare them. SQL Compare from Red-Gate is one...--Lumbago |
 |
|
|
|
|
|