Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 inexplicable record deletion

Author  Topic 

fasisi
Starting Member

1 Post

Posted - 2009-03-24 : 01:24:45
hello all,

i have a strange situation. the records in one of the tables in my database is inexplicably deleted. only few person know the access key to do the deletion and they didn't do such deletion.

not only deletion but also alternation on the tables primary key definition.

any one can explain?

thank you,
fasisi

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2009-03-24 : 04:11:48
i think you should explain your question more first?? what do you mean by "alternation" on the primary key?

Em
Go to Top of Page

lionofdezert
Aged Yak Warrior

885 Posts

Posted - 2009-03-25 : 02:07:45
You can check when your table was last time modified, below query will help you to get tables that are modified in last 5 days.BUT for data you must place triggers and history tables.


SELECT [name],create_date,modify_date
FROM
sys.tables
WHERE
modify_date > DATEADD(day,-5,GETDATE())
Go to Top of Page

lionofdezert
Aged Yak Warrior

885 Posts

Posted - 2009-03-25 : 03:17:40
LAST QUERY EXECUTED

SELECT deqs.last_execution_time AS [Time], dest.TEXT AS [Query]
FROM sys.dm_exec_query_stats AS deqs
CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest
ORDER BY deqs.last_execution_time DESC
Go to Top of Page
   

- Advertisement -