user1254579
user1254579

Reputation: 4009

Deleted objects in a database SQL Server 2012

Is there any view or system table in SQL Server which returns all the deleted objects (tables, views etc) in a particular database?

Upvotes: 2

Views: 1771

Answers (2)

Paul Andrew
Paul Andrew

Reputation: 3253

Try this:

SELECT 
    [Operation],
    [Transaction Id],
    [Transaction SID],
    [Transaction Name],
    [Begin Time],
    [SPID],
    [Description]
FROM 
    fn_dblog (NULL, NULL)
WHERE 
    [Transaction Name] = 'DROPOBJ'

Source: https://www.mssqltips.com/sqlservertip/3090/how-to-find-user-who-ran-drop-or-delete-statements-on-your-sql-server-objects/

Upvotes: 2

Martin Smith
Martin Smith

Reputation: 453608

No.

Once they are deleted they are gone.

The space consumed by them will eventually be overwritten, it might be possible to get some information from analysis of the data files before this happens or the transaction log but there is nothing built in.

Upvotes: 5

Related Questions