Find Latest version of an object in different database

  • I have two database on same server.

    Some Stored procedure has been updated in one database and some in other databse .

    So i like to find latest copy of procedure in any database.

    Plese suggest..................

    Thanks

    KD

  • You can run below query and check for modify_date field.

    select * from sys.objects WHERE type='P'

    This will work if you have used ALTER PROCEDURE statement to change the procedure.

    If you have used DROP and CREATE statement then as far as I know, there is no way to know the latest procedure. In this case you can use some database comparision tool to listdown the DB changes. And then manually look into the code difference of the SPs.

    Regards,
    Nitin

  • Thanks Nitin

    But it does not work for alter proc command.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply