April 13, 2021 at 4:26 pm
Potentially dumb question. There is 1 x ldf & 1 x mdf for DB1. LocalDB. How do I connect to these? I am unfamiliar with localDB.
If I run [sqllocaldb.exe i] - there are 2 other instances but not those using the log & data files I want to look at.
Is there a way to "start" a localDB instance using this log & data file?
Thank you!
April 13, 2021 at 4:47 pm
Yes. You simply need to "Attach" the database using those two files and it can be done using the Object Explorer window in SSMS. Right click on "Databases" and then select "Attach" from the drop down that appears. Follow your nose after that. If you want to see the code for what's being done (as a start... you really need to read up on the command) then, before you click "OK", click on the "Script" pull down at the top of the "Attach Databases" window that you end up working in.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2021 at 9:07 am
Duh, of course. Thanks Jeff! Appreciate you taking the time to reply. I work alone and every now and again, just get stuck on something and it REALLY helps to have a shove in the right direction.
Have a nice day.
🙂
April 14, 2021 at 6:28 pm
Heh... no problem. We've all had similar problems. Even after more than 2 decades of this stuff, I still have my "WTF? Oh, DUH!" moments especially since, like you, I mostly work alone.
Shifiting gears a bit, I'm "Lovin' the lockdown" because I usually do work better alone (one of my favorite shirts says "Old men aren't hard of hearing... we're tired of listening!). If we ever get back to working in the office, I'm going to wear a shirt that says "Ok.. pandemic is over but I still want some of you to stay away from me". 😀
Anyway, thank you for the feedback... it's let's me know that I'm not the only one in the world with such moments. 😀
--Jeff Moden
Change is inevitable... Change for the better is not.
May 12, 2021 at 12:41 pm
Heh... no problem. We've all had similar problems. Even after more than 2 decades of this stuff, I still have my "WTF? Oh, DUH!" moments especially since, like you, I mostly work alone.
Shifiting gears a bit, I'm "Lovin' the lockdown" because I usually do work better alone (one of my favorite shirts says "Old men aren't hard of hearing... we're tired of listening!). If we ever get back to working in the office, I'm going to wear a shirt that says "Ok.. pandemic is over but I still want some of you to stay away from me". 😀
Anyway, thank you for the feedback... it's let's me know that I'm not the only one in the world with such moments. 😀
I'm with you on that. Fortunately, during my last rare office visit I was delighted to see they're using my desk to store stuff, man thats a really good sign for the possibility of our remote work policy continuing for the time being.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply