Attaching mdf file to SQL Server gives Error 5120
Some months ago, I needed quickly an SQL Server installation on my laptop. I used an DVD containing some SQL Server 2008, and all was working fine.
Things became complicated at the moment I realised that I installed an Evaluation version. The complication was, that I realised about the Evaluation period at the moment the SQL Server refused to start. Just a few days before I defined lots of tables and created a lot of data in the server, and of course, thought about making a new backup too late.
Receiving Sql Server Error 5120
Sql Server Manager returned Error code 5120. I tried a several things, but couldn't solve it immediately.
Searching on the internet, I found the solution: (1) just copy the mdf-file of the database; (2) de-install SQL Server 2008 Evaluation version; (3) install SQL Server 2008 R2; (4) Run SQL Server Manager (5) Attach the old mdf-file, thus recreating the lost database.
Well, life is easy, isn't it? An hour later, I managed all steps (1) to (4). Attaching the mdf-file nevertheless created a huge headache. I kept keeping an Error 5120. Searching the internet didn't answered my problem directly.
But I did manage to find the solution, being so simple I felt stupid not being able to think about it myself: starting the SQL Server Manager as administrator (right click the program, choose "Start as administrator") solved the issue!
|