Forum Discussion
bboudj
Apr 22, 2023Copper Contributor
Attach/Detach sql server database
I had sql server 2014 installed in my pc on hard drive c:. But then I wanted to improve the pc performance by installing an ssd drive instead of the physical hard drive without taking the precaution ...
bboudj
Apr 24, 2023Copper Contributor
Hi; Using ssms and right clicking on database tab on the left panel, opens a contextual windows with the option of attaching a database. Trying to do just this I get error 5123.
olafhelper
Apr 25, 2023Bronze Contributor
Trying to do just this I get error 5123.
bboudj , please post the complete error message, not only the number.
- bboudjApr 27, 2023Copper Contributor
Thanks for your support. I got tired of trying to attach the database to the new instance of sql on the ssd drive. But each attempt failed. So I reinstalled my old system hard disk on my pc and had sql server detach the database after which I removed the hard disk and reinstalled the ssd drive. I still have to attach the database to sql server. I will try this later. Again thank you for enquiring.
- olafhelperApr 28, 2023Bronze ContributorYou still didn't provide any usefull information and also not the error message; it's impossible to assist you.
- Raksha112May 08, 2023Copper ContributorAs you have mentioned you are facing an error 5123, There are 2 steps to attach your database if you are not able to do that.
Granting permissions: You need to right-click on properties and then under properties select security and edit on permissions and provide the full control access by selecting allow in full control.
Try attaching the database in SQL Server using any of the following methods:
1) BY SSMS: By adding in SSMS
2) By T SQL