Getting last modified SQL Database

UrBel 220 Reputation points
2024-10-09T09:44:44.87+00:00

Hi expert,

we've already know how to get last modified data on specific table with SQL Trigger but how do we getting last modified Database either modified data(DML) or modified table\view (DDL) inside?

does anyone have query for this?

great thanks & appreciation for all answer & advice

Warm regards,

UrBel

Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,705 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Olaf Helper 46,551 Reputation points
    2024-10-10T05:27:22.1366667+00:00

    I'm looking for Last modified Database information either table data changes or objects structure(SP,View,schema etc.) inside the database...

    You get the latest modify date/time of objects with

    select max(obj.modify_date) AS last_modify_date
    from sys.objects as obj
    
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.