Tracking Database Changes

  • I'm working on a data dictionary app that would document a database.  ie. a structure like below
    Database
    > Main Objects (tables, views, procedures, functions)
       >> indexes
    > Columns
    I can get the current state/configuration of these items using various SQL system tables, etc. being processed in stored procedures.
    Is there are SQL standard function (v2016, v2017) that identifies database "deletions"?
    i.e.: A table is dropped (and not recreated); A column is deleted from a table.
    (I'm not looking at data within a table)

    Or am I going to have to do a "reverse lookup" where I compare the tables/columns/etc. in my data dictionary database against the  list of current tables identified in, for example, sys.all_objects?

    Hope I made myself clear.

    TIA

  • tnpich - Thursday, January 31, 2019 9:05 AM

    I'm working on a data dictionary app that would document a database.  ie. a structure like below
    Database
    > Main Objects (tables, views, procedures, functions)
       >> indexes
    > Columns
    I can get the current state/configuration of these items using various SQL system tables, etc. being processed in stored procedures.
    Is there are SQL standard function (v2016, v2017) that identifies database "deletions"?
    i.e.: A table is dropped (and not recreated); A column is deleted from a table.
    (I'm not looking at data within a table)

    Or am I going to have to do a "reverse lookup" where I compare the tables/columns/etc. in my data dictionary database against the  list of current tables identified in, for example, sys.all_objects?

    Hope I made myself clear.

    TIA

    Unfortunately no there is no function or anything that identifies objects that have been deleted. You'd need to set up some type of auditing for to track those or compare your latest version against the current database structure.

    Sue

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

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