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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How find out the changes happened for all objects

Author  Topic 

mohan123
Constraint Violating Yak Guru

252 Posts

Posted - 2013-07-30 : 10:23:00
How i can find out the changes happened in database like modifying functions,table indexes,procedures and adding or removing columns

here in this query

select * from sys.objects
where type IS NOT NULL
and modify_date between '2013-07-21' and '2013-07-29'


but here i am getting created objects list and modifying list.but if i deleted any object it is not showing anything..how can i get the all the changes happened in database between specific dates.
Suggest me !!

P.V.P.MOhan

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-07-30 : 10:37:26
Take a look at the standard schema changes report. You can access that report by right-clicking on the database name in SSMS object explorer, Reports -> Standard Reports -> Schema Change History.
Go to Top of Page

mohan123
Constraint Violating Yak Guru

252 Posts

Posted - 2013-07-31 : 02:35:13
in query side we can do any thing we can do

SELECT object_name(object_id),
object_name(parent_object_id),
*
FROM sys.objects
WHERE type IS NOT NULL
AND modify_date BETWEEN '2013-07-15'
AND '2013-07-31'

if table modified what has been modified like that need to know..suggest me

P.V.P.MOhan
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-07-31 : 02:51:55
One way is to use DDL triggers which can capture the required info

http://www.mssqltips.com/sqlservertip/2085/sql-server-ddl-triggers-to-track-all-database-changes/

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -