SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How find out the changes happened for all objects
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mohan123
Constraint Violating Yak Guru

India
252 Posts

Posted - 07/30/2013 :  10:23:00  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

3761 Posts

Posted - 07/30/2013 :  10:37:26  Show Profile  Reply with Quote
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

India
252 Posts

Posted - 07/31/2013 :  02:35:13  Show Profile  Reply with Quote
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

India
52325 Posts

Posted - 07/31/2013 :  02:51:55  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000