Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restore a Database With Transaction Log

Status
Not open for further replies.

glennfishwick

IS-IT--Management
Joined
Apr 9, 2002
Messages
8
Location
GB
Does anyone know if it is possible to restore a database without its Transaction Log file. Like when you can do an attach_db without specifying a transaction log and a empty one is created.

Our problem is that an unmanaged site has sent us a database with a massive transaction log that is too big to fit on our database server so we can't get at it to shrink it.
 
Try sp_attach_single_file_db. It can attach just the MDF file and create a new LDF. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Unfortunately the file that I have is in backup format so that will not work.
 
Try this:

Code:
Restore Database DataBaseName From File = 'FileName' With Recovery

After this the database is online and consistent again although you might have lost some data.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top