tags:

views:

25

answers:

3

Hi All,

I am in a situation where I need to find the Changes happened to the database since last migration.

Eg: Changes happened to the Stored Procedure,and Views and functions.

How Can I find these Changes.

We are not using any third Party Tools.

Please can any one help me out on this.

Thanks in Advance.

Venkat

+2  A: 

try this:

SELECT
    modify_date
        ,type_desc
        ,name
    FROM sys.objects
    WHERE is_ms_shipped=0
        --AND modify_date>='yyyy/mm/dd'  <--optionally put in your date here
    ORDER BY 1 DESC
KM
Can You please let me know what is the is_ms_shipped?
Anoop
`is_ms_shipped`=`Object is created by an internal SQL Server component.` [sys.objects (Transact-SQL)](http://msdn.microsoft.com/en-us/library/ms190324.aspx)
KM
There are a lot of database entities that are not in `sys.objects`: database principals, permissions, files and filegroups, schemas, services, certificates, types, assemblies and so on and so forth. I reckon though that most of the *interesting* entities are in `sys.objects`.
Remus Rusanu
@Remus Rusanu, OP was asking about: *Stored Procedure,and Views and functions*. All of those are in sys.objects
KM
Thanks for the detailed explanation.I will try to do more research on this.
Anoop
+3  A: 

Use a schema comparison tool like the VSDB Schema Compare (see Compare and Synchronize Database Schemas) or Red Gate's SQL Compare.

Remus Rusanu
+1 because this is the right thing to do but he did say *We are not using any third Party Tools.* so I'm not sure this is the answer he is looking for.
Mark Byers
I actually though he means no third party tools that might have modified the schema, but now I realize you're probably right.
Remus Rusanu
Thanks for the Replies. It's been really helpful.
Anoop
A: 

If you have the old version and new version installed in different SQL Server, then go to the SQL Server Management Studio, right click on your database and choose "Generate Scripts" from the Tasks menu. Choose to export the objects that you are interested in.

Do it for both and diff them.

Lou Franco