Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Posts
    4

    Unanswered: Restoring SQL Server Databases after uninstalling and reinstalling SQL Server.

    Hi

    I have another question : 1) Restoring SQL Server Databases after uninstalling and reinstalling SQL Server.

    Two days ago there was some problem with Norton Antivirus, so Windows 98 restored itself to a previous state. The SQL Server name was not available when I tried to start again, so I had to uninstall and reinstall SQL Server. I started a new Database just a week before this happened (the change from Access to SQL Server as I stated in the other thread http://www.dbforums.com/showthread.php?threadid=987880) and after reinstallation I could not access the Database any more - even while it is in the Data directory. I did not have any backup to restore from - I just started creating tables, so there was only the Log file created and the MDF database file. I tried to import it for a while to the new server, but as the database is not shown in the new server, it was unable to import like I hoped. So how do you restore it back to SQL Server when you have no backup and only the (undamaged) MDF database file if you only have one server? I had to recreate the Database from scratch again - I don't want it to happen again.

    Regards

    Corné

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    You might be able to reattach the database. Since I assume that SQL Server did a normal shut-down before SQL was uninstalled, the files should have quiessed normally.

    Note that this is somewhat risky, but it is probably better than nothing. Make a backup copy of the files before you try to attach them. Make a second backup of the database if/when you attach it. Pray a lot during the process

    -PatP

  3. #3
    Join Date
    Mar 2004
    Posts
    4
    So how do you reattach the Database, I don't know what you are talking about. When I uninstallled, the directory was C:\Program Files\MSSQL7, but when I reinstalled it, I left it the default C:\MSSQL7 directory. Can this be the problem that the new server don't see the old database, because if this is the reason, then Im confused - well I'm confused already!

  4. #4
    Join Date
    Sep 2003
    Posts
    522
    look up sp_attach_db in bol, it's actually straight forward.

  5. #5
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I'd use sp_attach_db, but there is also SQL Enterprise Mangler for the script-challenged.

    -PatP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •