Restoring database

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Snick

    Restoring database

    Hello,
    due to some testing my SQL Server crashed. I have to reinstall it and ...
    For now I only have .mdf file and nothing else. My question is: is there any
    possibility to restore this .mdf file for SQL 2000? I have some useful data
    in this file and there will be nice to use it.

    Best Regards
    MarciN


  • Simon Hayes

    #2
    Re: Restoring database


    "Snick" <butcher@gold.p l> wrote in message
    news:btueb9$bho $1@news2.ipartn ers.pl...[color=blue]
    > Hello,
    > due to some testing my SQL Server crashed. I have to reinstall it and ...
    > For now I only have .mdf file and nothing else. My question is: is there[/color]
    any[color=blue]
    > possibility to restore this .mdf file for SQL 2000? I have some useful[/color]
    data[color=blue]
    > in this file and there will be nice to use it.
    >
    > Best Regards
    > MarciN
    >
    >[/color]

    You can try using sp_attach_singl e_file_db, but this may not work (it is
    supported only for databases detached with sp_detach_db). If it doesn't
    work, then you should consider contacting MS PSS, if the data is valuable
    enough.

    Simon


    Comment

    • Erland Sommarskog

      #3
      Re: Restoring database

      Snick (butcher@gold.p l) writes:[color=blue]
      > due to some testing my SQL Server crashed. I have to reinstall it and
      > ... For now I only have .mdf file and nothing else. My question is: is
      > there any possibility to restore this .mdf file for SQL 2000? I have
      > some useful data in this file and there will be nice to use it.[/color]

      Beyond the sp_attach_singl e_file_db, there is a way to do this. However,
      this is a dangerous path to go, and I am only sending the instructions
      by mail. And if that data is very dear to you, you should definitely
      cough up the money for a support case. (And learn the lesson and start
      to take backups!)

      It is dangerous, because you build a new clean log file, and you get
      the database exactly in the state of the crash. If the database was
      idle, it may be perfectly fine. If there was activity, it may be
      grossly corrupt. DBCC may or may not reveal anything, but your own
      data could be consistent.

      --
      Erland Sommarskog, SQL Server MVP, sommar@algonet. se

      Books Online for SQL Server SP3 at
      SQL Server 2025 redefines what's possible for enterprise data. With developer-first features and integration with analytics and AI models, SQL Server 2025 accelerates AI innovation using the data you already have.

      Comment

      Working...