How to find the date and time of last updated table?
Answers were Sorted based on User's Feedback
Answer / monal
USE TRIGGER OR ADD DATETIMESTAMP COLUMN IN A TABLE WITH
DEFAULT VALUE OF GETDATE()
| Is This Answer Correct ? | 9 Yes | 2 No |
Answer / sanjeev kumar
SELECT OBJECT_NAME(OBJECT_ID) AS tablename,
last_user_update
FROM sys.dm_db_index_usage_stats
WHERE database_id = DB_ID( 'your_database_name')
and user_updates>0
order by last_user_seek desc
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / smitha
select name,create_date,modify_date from sys.tables
order by modify_date desc
| Is This Answer Correct ? | 5 Yes | 3 No |
Answer / vidit tyagi
SELECT OBJECT_NAME(OBJECT_ID) AS DatabaseName,
last_user_update,*
FROM sys.dm_db_index_usage_stats
WHERE database_id = DB_ID( 'DataBaseName')
AND OBJECT_ID=OBJECT_ID('TableName')
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / ram
USE TRIGGER OR ADD DATETIMESTAMP COLUMN IN A TABLE WITH
DEFAULT VALUE OF GETDATE()
| Is This Answer Correct ? | 1 Yes | 1 No |
select scn_to_timestamp(max(ora_rowscn)) from <TN>
| Is This Answer Correct ? | 0 Yes | 0 No |
What can be used instead of trigger?
What is sql service broker?
What is the difference between update lock and exclusive lock?
What are the disadvantages of primary key and foreign key in SQL?
Explain the steps to use transact-sql cursor?
When setting replication, is it possible to have a publisher as 64 bit sql server and distributor or subscribers as a 32 bit sql server?
What is sql server profiler trace data file?
What is history table in sql server?
How to loop through returning rows?
Can we install sql server 2016 on windows 7?
How to get the definition of a stored procedure back?
How to provide default values to stored procedure parameters?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)