Interview Questions

1. How can you mount a database from MDF file even if you don’t have the transaction log?

The only time that you can do this is when the DB was shut down cleanly before the log file was lost. It’s still not a good idea. While attaching a data file without the log file may be possible in some circumstances, it is not a recommended approach and is only for cases when the log file has been damaged or lost due to hardware problems and there are no backups available. Of course, you cannot have a database without a log file, so SQL Server just recreates a log file when you attach the database. 

Attaching a data file without the log file breaks the log chain and may render the database transactionally or structurally inconsistent depending on the state of the database before the log file was lost.

By Hena Parveen 2 0
Is this helpful? Yes No

Submit an interview question

Submitted questions and answers are subject to review and editing, and may or may not be selected for posting, at the sole discretion of w3Sniff.

Get Started

Comments

Leave a Comment


Check out more interview questions

Based on your skills

MS SQL Server

1661519 1720 23 859

Angular

42434 92 0 46

Wordpress

34307 72 1 36