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.
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