Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL 2008, Does SQL not keep track of the modified date of anything?

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
US
Is there a way to get view or print a columns list of tables or SP's and see the modified date? like in Windows Explorer you can see the most recent date a file was modified.

I can view teh Object Exploere but all I see i s the creation date.

I need to compare two different SQL Databases Stored Procedures and Tables to know the differences.

DougP
 
Opps the heading should read Modifed DATE not Data.

DougP
 
Try...

select *
from sys.objects
order by modify_date desc

Simi
 
Forgot, if you only want tables or SP's use...


select *
from sys.objects
where type ='U' or type ='P'
order by modify_date desc

Simi
 
The modify date is not 100% reliable (unfortunately). Sometimes developers will drop things and create them instead of altering. Ex:

[tt]
Drop Procedure dbo.Blah
Go
Create Procedure dbo.Blah
-- etc...
[/tt]

OR

[tt]
Alter Procedure dbo.Blah
-- etc.....
[/tt]

My suggestion would be to get a copy of SQL Compare. They have a 14 day trial, which may be enough for you, but the tool is (in my opinion) reasonably priced, and likely something you will use often.

** I am not affiliated with red-gate

-George
Microsoft SQL Server MVP
My Blogs
SQLCop
twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top