PLease help after accidental uninstall

  • Hi

    Please help me if you can. I have been having a spring clean on my computer uninstalling various unused programs. I have then uninstalled microsoft sql server 2005 not knowing what this was. It turns out now that it was the database for my accounting software ms office accounting. This has turned out to be a very expensive lesson learned. I have done a system restore and got the software back but still the database has gone.

    Is this gone forever or can some clever person help me retrieve my info.

    Thanks in advance

    Any help welcome.

    Dave

  • The database should be still there. Try to search your local drives for files with .mdf extension.

    Then when you find them, try to figure out which one is for your application. The name will NOT be master.mdf or model.mdf or msdb.mdf.

    Then click Start/Programs/Microsoft SQL Server 2005. Try to find utility SQL Server Management Studio. Connect to local host. Open Object Explorer view (View/Object Explorer menu). Right click on Databases node and choose Attach... Browse to your mdf file and follow the instructions.

    HTH

    Piotr

    ...and your only reply is slàinte mhath

  • You'll need to attach the log file too at the same time.

    So after you browse for *.mdf and find "accounting.mdf", you should also look for "accounting.LDF". You will need both paths known for the attach function.

  • you say you did a system restore? does this mean you restored a backup of the server but SQL server will not start? This will be because database files are locked open and not backed up by OS level backups unless SQL server is stopped first.

    This situation is only recoverable if you have database backups created from within SQL server.

    If the previous posts do not supply an answer to your problem please explain fully what steps you have taken so far and the exact situation you are in now.

    ---------------------------------------------------------------------

  • Hi

    thanks for all the help guys. I have found a file MSSmallBusiness.mdf which is 100mb and I am hoping this is the right file . I have opened up management studio and it asks for a server name. I click the drop down list and there is a database engine name that reflects office accounting but when I try and open it it says cannot connect .

    Please forgive me as all this stuff is a little way over my head but I really appreiciate all the help.

    Thanks again

    Dave

  • You might need to detach the database and then reattach with the .mdf that you have.

    EXEC sp_detach_db 'dbname'

    EXEC sp_attach_single_file_db @dbname = 'dbname',

    @physname = N'C:\dbfile.mdf';

    Thanks..

    The_SQL_DBA
    MCTS

    "Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives."

  • hopefully you also have a file called MSSmallBusiness_log.ldf which is the other part of the database required to complete it, in which case you can attach normally via SSMS.

    Is the SQL service started? go to start - programs - microsoft sql server 2005 - configuration tools - sql server configuration and look under services. Right click and start if not running.

    If it won't start post the contents of the errorlog. Right click on Sqlserver service select properties, startup parameters, the -e option tells you where this is. Probably but not necessarily at

    c:\program files\microsoft sql server\mssql.1\mssql\log\errorlog

    If its running\starts try Using a windows account with local admin on the server see if that gets you in

    ---------------------------------------------------------------------

  • you can also check status\start sql server from services applet - mssqlserver and sqlagent services

    ---------------------------------------------------------------------

  • Hi

    SScrazy . Thanks for the help . I have checked and the service is not started. I can not find the error log as yet but this is the message I get.

    TITLE: Connect to Server

    ------------------------------

    Cannot connect to THEHALL-PC\MSSMLBIZ.

    ------------------------------

    ADDITIONAL INFORMATION:

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Shared Memory Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

    ------------------------------

    BUTTONS:

    OK

    ------------------------------

    Dont know if this helps.

    Thanks again

    Dave

  • sounds like you need to try and start it and if it won't start post the errorlog, or at least the last part of it with any errors.

    ---------------------------------------------------------------------

  • When you use the account package from MS, it does not use SQL Server, it uses a very cut down version of SQL, something like SQL Compact Edition, or something like that. You cna use Office to reinstall SQL, but you will need to try and restore the database itself, if you can find it.

    You can also search for files that have the modified data on or about the last time that you accessed that data last.

    You do know that you can never "uninstall" any software, pieces of it will still be in files, in the registry, on the drive(s), etc.... What you need to do is setup a rebuild cycle for the box. I rebuild mine approx once every year. No longer than a year between rebuilds. I have a few drives partitioned up so that my data is not on the same partition as the OS. After a fresh rebuild, my boxes run really fast, because there is nothing there except for the software that I install.

    This is a good lesson learned the hard way. Next time, either turn the service off and see what does not work, or read about what applications do before attempting to "uninstall" something.

    You should be able to look back thru the event logs and see what the name of the SQL Service and SQL Server was named. It will log each and every time the service was started. From that, you should be able to determine if the service is still on the box. If so, try and start it manually. If not, try reloading the Office Accounting App and let it setup that service once again.

    Andrew SQLDBA

  • 2010-01-07 19:59:56.73 Server Microsoft SQL Server 2005 - 9.00.3077.00 (Intel X86)

    Dec 17 2008 15:19:45

    Copyright (c) 1988-2005 Microsoft Corporation

    Express Edition on Windows NT 6.1 (Build 7231: )

    2010-01-07 19:59:56.76 Server (c) 2005 Microsoft Corporation.

    2010-01-07 19:59:56.76 Server All rights reserved.

    2010-01-07 19:59:56.76 Server Server process ID is 4700.

    2010-01-07 19:59:56.76 Server Authentication mode is WINDOWS-ONLY.

    2010-01-07 19:59:56.78 Server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\LOG\ERRORLOG'.

    2010-01-07 19:59:56.79 Server This instance of SQL Server last reported using a process ID of 5440 at 07/01/2010 19:58:09 (local) 07/01/2010 19:58:09 (UTC). This is an informational message only; no user action is required.

    2010-01-07 19:59:56.79 Server Registry startup parameters:

    2010-01-07 19:59:56.79 Server -d C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\master.mdf

    2010-01-07 19:59:56.79 Server -e C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\LOG\ERRORLOG

    2010-01-07 19:59:56.79 Server -l C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\mastlog.ldf

    2010-01-07 19:59:56.79 Server -T 840

    2010-01-07 19:59:56.79 Server -T 2324

    2010-01-07 19:59:56.81 Server Error: 17113, Severity: 16, State: 1.

    2010-01-07 19:59:56.81 Server Error 2(error not found) occurred while opening file 'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\master.mdf' to obtain configuration information at startup. An invalid startup option might have caused the error. Verify your startup options, and correct or remove them if necessary.

  • As I feared you have lost your system databases in the uninstall. Do you have backups of the master, model and msdb databases (*.bak files).

    From what Andrew says and the fact you are running express edition potentially a reinstall of the app will reinstall the databases for you, so see what the doco says, but make sure you keep your current database files safe.

    ---------------------------------------------------------------------

  • Hi

    I have backup files for the accounting software but when I try to load them it says something about the server not being accesible.

    A network related or instance specific error when connecting.

    Im guessing this is because the datbase is not active.

    Any more help in laymans terms would be greatly appreiciated.

    Thanks Again guys you really have been most helpfull.

    Dave

  • laymans terms is difficult, what you need to do is quite technical.

    You need to rebuild your system databases and then restore those databases from .bak files if you have them. If you do they are most likely in C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\backup.

    Can you find files master.mdf and mastlog.ldf anywhere else? If so what else is in the same location.

    If those files are gone you need to rebuild them, follow procedure rebuilding system databases in this link:

    http://technet.microsoft.com/en-us/library/ms144259(SQL.90).aspx

    As you are on version 3077 you would then have to apply service pack SP2 followed by security patch MS09-004. search in google\microsoft for those keywords and you will find the downloads

    After that you can restore the .bak files for master and msdb if you have them which should get your system back as was.

    http://technet.microsoft.com/en-us/library/ms175535(SQL.90).aspx

    An alternative is to reinstall this software which might reinstall SQL for you. I can't help there hopefully app doco will tell you what to do if its possible.

    ---------------------------------------------------------------------

Viewing 15 posts - 1 through 15 (of 24 total)

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