Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restoring SQL 7 databases

Status
Not open for further replies.

LCannon

IS-IT--Management
Oct 15, 2001
85
US
I had a server running SQL 7 blow up and I upgraded the OS (to Windows 2000) and reinstalled SQL 7. Problem now is, how do I get the databases back into SQL 7?
All the files are there, the old MSSQL7 folder and all, but how do I get my new installation of MS SQL7 to read them?
 
Your best bet is to do the following.


Move the old sql 7 data to a temp directory.

Install SQL 7 so that the data directory is exactly the same path as it was before.

Shut down SQL.

Copy the old data over the new data,

Bring SQL back up.

 
I tried that. Can't get the SQL Service to start. It just tries and then stops.

 
By any chance, did you change the name of the server AFTER you installed SQL? I did that once and had to re-install SQL 7 to make the service start.

I can tell you that I run SQL 7 under Win2K on two different servers, and it's been extremely reliable.
 
Did you look in the sql server log, ot the NT event log, to see what the problem was?

Did you install SQL 7 to the same service pack level as it was before?
 
flutepl is mainly correct, except that the master and tempdb cannot be over-written. The User databases(IE the ones created by a developer not SQL install) can be recreated in the same locations, then SQL can be stoped, the data files copied over the newly created ones, then restart SQL. All should be well at that point.
 
Since you have re-installed sql server there is now a new master database.
All the sytem databases have been re-created but none of the user databases would have been affected. Since master is new there are no entries in master for the user databases. Therefore it can't see them.

Run sp_attachdb to attach all your user databases. Then re-create the server logins and run sp_change_users to map the server logins to the old database users.

Since all the files are there the attaching should do the trick. This will make new entries into the master database.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top