sqlserver crashed help

  • Problem 1

    This week my wnnt system file corrupted. My backup system file was made before sql was installed. Most of my software installed after the last system backup still works fine but sql appears to be gone. It seem that sql puts a lot of info about itself in the system file. All the sql files are still on my harddrive but there is no longer a listing for sqlserver in add/remove programs. Some of the registry info is misssing too. My first thought was just to reinstall the instance using the same name, logins etc as the last one so all  my programs will work. When I try this the install program tells me that an instance by that name already exists. If I try to use the install disk to remove the instance I get a message saying that no instances of sql exist. What should I do?

    Since I still have all the files, is it possible to get sql back into the system without a reinstall? If not, how can I convince the install disk that the named instance no longer exists so I can just reinstall?

    Problem 2

    Since I have all the mdf and ldf files from my databases, is it possible to reconstruct them once I get sql running. I have sql on another computer and would like to reconstruct the databases there. I cannot find anything in help that tells me how to do this.

  • Suggestion for 1

    I think you must clear the all registry in the system, by deleting the registry manually, after that restart the server and then reinstall the sql server. By the way, check in the services, if the SQL server agent still running, stop it.

    Suggestion for 2

    If you still have the SQL server data file, you can copy it to another machine, and then do the stored procedure SP_ATTACH_DB (you can see in the help online book). It's very simple if you still have the MDF file. My suggestion is, you must have the standby database server if you have critical data.

    Regard's

    -DENI-

  • There is the quick and dirty way or the propper way!

    Option1:

    The propper way is to rebuild from your backups, this will allow recovery of all your databases in a orderd and checked state.

    Option 2:

    Make a copy of all your mdf(primary data file), ldf(log file) and ndf(secondary data file) files. Remember to include ALL your system databases. What I also recommend is to create a BAK directory in the \.\MSSQL\DATA directory, move all the master, model and msdb files into this directory.

    What you need to do is install SQL, and place the default data directory to the exact same place as the first install. This will create a new installation.

    Now install all the patches or service packs that were installed previously.

    After you have brought the versions back inline.

    Stop SQLSERVER and copy the master, model and msdb files back from the BAK directory.

    Restart SQLSERVER, the databases should be back with all the users, jobs, DTS packadges and all the rest, without restoring master and msdb.

    I would not recommend this as a recovery option, I personally would prefer to rebuild from backups but sometimes you don't have any choice.

    Lukas

    Lukas Botha

  • Thank you all for your input. Your ideas sound great but I found a faster solution. When I put in the install cd, i saw a choice for advanced options on about the 4th screen. One of the 2 advanced options is a choice to rebuild the registry hive. You have to remember exactly every choice you made on the original install but it will use your existing files and rebuild the system and registry entries. Fortunally, I alway take notes when I install any software so every thing is back to normal. Thanks again to all.

  • The rebuild registy from the install CD does work, remember to reapply any patches that you used, I would recommend this as a precaution.

    I'ts always good to hear of another SQL Server that is ALIVE!!

    PS: Look at you backups.....

    Lukas Botha

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply