March 7, 2017 at 1:17 pm
My work PC had a very small primary drive. My boss was able to get larger drives. This morning my PC's primary drive was replaced and now I'm installing SQL Server 2016 Developer Edition SP1.
However, I made one mistake. I didn't detach any of the databases I had on it. (I put all of my databases onto a secondary drive that the PC has.) I can see them in File Explorer (I'm using Windows 10 Enterprise), so the .mdf and .ldf ffiles are there. Can I just attach to them and that will be enough?
Kindest Regards, Rod Connect with me on LinkedIn.
March 7, 2017 at 1:35 pm
Did you properly shut down the operating system before having the primary drive replaced? If so, SQL Server would have shut itself down and there shouldn't be any problems. If not, I don't know. You can always make backup copies of the files and try attaching to the original.
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)
March 7, 2017 at 1:48 pm
As has been said it depends on whether your SQL Server services shutdown cleanly. If not there are ways to attach a single file as a database, but it will rebuild the log and that will mean you may have consistency issues in the database, but you should still be able to attach them.
March 8, 2017 at 1:03 am
This was removed by the editor as SPAM
March 8, 2017 at 1:21 am
Hi,
if your LDF-File is crashed, you can attach a database without ldf file.
It is hard and tricky, but it is possible:
I had to do this one time, because our LDF-File was crashed during shutodown, and we were not able to attach on the "normal" way.
Best regards,
Andreas
March 8, 2017 at 7:28 pm
sgmunson - Tuesday, March 7, 2017 1:35 PMDid you properly shut down the operating system before having the primary drive replaced? If so, SQL Server would have shut itself down and there shouldn't be any problems. If not, I don't know. You can always make backup copies of the files and try attaching to the original.
Yes, I did an orderly shutdown of my PC. This is good to know sgmunson, thanks.
Kindest Regards, Rod Connect with me on LinkedIn.
March 9, 2017 at 12:36 pm
just to clarify, it's not a case of whether the instance was shutdown cleanly, but whether the database itself was shut down cleanly.
A clean system shutdown is a good start though
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply