[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Missing Table

Posted on 2005-04-22
8
Medium Priority
?
187 Views
Last Modified: 2010-03-19
I have a missing table in the database, I would like to know if I can see when it was deleted. How can I view transaction log? Is there any way to recreate it, roll back the transaction?

thanks
0
Comment
Question by:pfslink
  • 3
  • 2
5 Comments
 
LVL 5

Expert Comment

by:obahat
ID: 13843115
You can restore your latest backup + transaction logs onto another DB and see whether the table is there.
Generally, unless you have auditing turned on, there is no way (that I am familiar with) of telling when the table was dropped.
0
 

Author Comment

by:pfslink
ID: 13843170
how would you know if auditing is turned on?
0
 

Author Comment

by:pfslink
ID: 13843233
and how would you restore the transaction logs?
0
 
LVL 5

Expert Comment

by:obahat
ID: 13843603
Gimme a sec... looking for the script that does that...
0
 
LVL 5

Accepted Solution

by:
obahat earned 2000 total points
ID: 13844678
RESTORE DATABASE [<DBName>]
FROM
DISK = "<Path>\<FileName>.BAK"
WITH  FILE = 1,  NOUNLOAD ,  STATS = <Value>,  NORECOVERY
GO

RESTORE LOG [<DBName>]
FROM DISK = "<Path>\<FileName>.TRN"
WITH  FILE = 1,  NOUNLOAD ,  STATS = <Value>,  RECOVERY
GO

You can read more about this in the books online, under the RESTORE command.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Suggested Courses

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question