Link to home
Start Free TrialLog in
Avatar of Mark
Mark

asked on

How to restore/reconnect SQL Server data files after reinstallation

I have SQL Server 2005 express. Somehow, the program itself was deleted and I need to reinstall it. The .mdf, .ldf files still exist. For the moment, I have renamed the Data folder to Data_Save to avoid overwriting.

How can I go about reconnecting these file after re-installing Express? Should I rename the Data folder back to its correct name before re-installing?
SOLUTION
Avatar of Robert
Robert
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark
Mark

ASKER

No - this isn't actually my personal computer and the owner has no backups of any kind. That will change after I get things back in action. I've got all the databases in .../MSSQL/Data_Save. I'll move those to a different folder in case that whole directory structure gets clobbered. Then, I'll first install SQL Server and continue with your advice thereafter.

Later ...

Installation instructions say to first download Windows installer 3.1. I've attempted to do that, but I get the error, "Not enough storage is available to process this command." Any idea what's up? In the meantime, I'll try a different browser, and do more research.
Avatar of Mark

ASKER

I decided to skip the Windows Installer step. I couldn't find any resolution to that.

Step 2 gave a link to, "download and install the 32-bit version of Microsoft .NET Framework 2.0." That link said, "We're sorry, this download is no longer available", so I skipped that too.

I just went ahead and ran the SQL Server 2005 express installer (step 3). That seemed to work, but on the "Install Instance" page it had radio buttons for 'Default Instance' or 'Named Instance'. I tried 'Default Instance' first, but it said an instance with this name already existed note that I did not delete any of the existing SQL Server folders). So, I then tried 'Named Instance'. Since I have no idea what the original instance name was, I just picked a name. The installation then ran to completion. It advised to download and  install SQL Server 2005 Service Pack 3, which I did (32-bit version).

First problem: when I run SQL Server Management Studio there are no instances shown at all in the object explorer. What to do?
User generated imageThe 'Installed Instances' button on the SQL Server setup shows the named instance:
User generated image
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark

ASKER

master, msdbdata still exist. The installation process created C:\Program Files\Microsoft SQL Server\MSSQL.2 with apparently new files. The ones I want are in C:\Program Files\Microsoft SQL Server\MSSQL.1.

Sorry, but the "just attach the databases" bit is where I'm stuck. Instructions I've read say, "Connect to your SQL Server Instance." But, that's my first problem. I get "Cannot connect to CANTLEYS-PC". See image.
connect.jpg
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark

ASKER

Decided that the best solution was to re-install from scratch.