June 21, 2012 at 2:20 pm
Pretty easy if you had to attach the AdventureWorks MDF files multiple times 😀
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
June 22, 2012 at 1:46 am
A simple one for me thank you very much.
“When I hear somebody sigh, ‘Life is hard,’ I am always tempted to ask, ‘Compared to what?’” - Sydney Harris
June 22, 2012 at 8:50 am
Thanks for the question.
I agree that both options may be correct, depending if the database was shut down cleanly AND only one log file existed for the database file. BOL specifies:
- "If multiple log files exist, they must all be available."
and
- "If a read/write database has a single log file that is currently unavailable, and if the database was shut down with no users or open transactions before the attach operation, FOR ATTACH automatically rebuilds the log file and updates the primary file."
in the FOR_ATTACH option.
"El" Jerry.
July 18, 2012 at 11:24 am
Like those who commented earlier, I think both options work (provided there was a clean shutdown). I picked the second because although I knew the first optioopn would also work I guessed that the question's author didn't.
Tom
July 31, 2012 at 10:34 pm
Why don't you remove a question or clarify it when it is clearly wrong and both answers are working.
I have tested it on my SQL Server and the "wrong" option works fine.
Soren
August 8, 2012 at 12:19 pm
Got it right.
October 6, 2012 at 7:29 am
+1 🙂
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
January 29, 2013 at 8:12 am
nice question.... new thing is added in my knowledge
manik
*******
Manik
You cannot get to the top by sitting on your bottom.
Viewing 8 posts - 16 through 22 (of 22 total)
You must be logged in to reply to this topic. Login to reply