SQL Server database recovery

callkalpa

Junior member
  • Nov 21, 2006
    166
    0
    16
    Galle
    I had a computer with Windows XP and SQL Server. Due to an error in Windows I had to format the C partition and reinstall Windows XP. Before format I backed up the whole C drive. Now I want to recover my database. But I don't know where the database file is in the backup.

    So what should I do to recover my database ?

    Pls help.........
    URGENT .........
     

    callkalpa

    Junior member
  • Nov 21, 2006
    166
    0
    16
    Galle
    I don't know if there is *.bak. The troubled machine is somewhere else. I did nothing sort of backup database. But I have a full backup of C Drive before the format.

    Any option .................. ?
     

    callkalpa

    Junior member
  • Nov 21, 2006
    166
    0
    16
    Galle
    But even to rename how can I find the path to the database file.

    Is there a single database file or is data saved in a different manner.
     

    callkalpa

    Junior member
  • Nov 21, 2006
    166
    0
    16
    Galle
    OK. I'll try on Saturday and let you know.

    Thanks for the help.

    If this doesn't work have to re-enter data around 2000 pieces :-(
     

    kosandpol

    Well-known member
  • Jun 10, 2008
    45,329
    1,492
    113
    If you had SQL express (desktop edition of SQL server 2005 ) installed, it stores the databases in :
    C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data

    If there's no way to make an SQL backup, copy the *.mdf and th e*.ldf files there for your database. SQL server 2005 and newer versions can recover the database from the mdf and ldf files.
     

    callkalpa

    Junior member
  • Nov 21, 2006
    166
    0
    16
    Galle
    kosandpol said:
    If you had SQL express (desktop edition of SQL server 2005 ) installed, it stores the databases in :
    C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data

    If there's no way to make an SQL backup, copy the *.mdf and th e*.ldf files there for your database. SQL server 2005 and newer versions can recover the database from the mdf and ldf files.

    Thanks mate, I'll try
     

    prabu901104

    Member
    Nov 7, 2008
    1,043
    0
    0
    Sri Lanka The Heaven on Earth
    ado i found a real solution for your problem. follow these steps

    1. copy your old database(.mdf) and database log file(.ldf) from your backup...(C:/Program Files/Microsoft SQL Server/MSSQL.1/MSSQL/DATA/yourDB.mdf & yourDB log.ldf)

    2. Then paste it in your new instance. same location

    3. Open your management studio

    4. Connect and RIGHT click in your database folder then click "attach"

    5. A new window will pop up click "ADD" again a new window will pop up from there choose your DB.mdf file and click OK

    Thats it.... ^_^
     

    zlatan24

    Member
    Jan 26, 2008
    7
    0
    0
    Current trouble can be solved out with the aid of mdf repair. The software owns some necessary facilities for this matter. It scans and analyzes corrupted mdf files after that the tool recovers it and files up to 16TB too. It starts under any software configuration of your system.
     
    Last edited:

    K_ZONE

    Well-known member
  • May 28, 2009
    5,150
    4,041
    113
    invoke db "Injected Memory"

    මචො, Backup path එක හදලා තිබ්බෙ නැත්නම් Backup වෙන්නෙ C:\ එක ඇතුලටමයි.
    Format කරා නම් ඒකත් මැකිලා ඇති :O

    External Drive එකකට හරි Removable Drive එකකට හරි බැකප් වෙන්න නම් ඒක හදන්න ඕන.

    බැකප් කරන වෙලාවට ඒක යන්නෙ Destination List view එකේ add කරලා තියෙන පාත් වලට,.
    http://www.mytechmantra.com/LearnSQ...tabase-Using-SQL-Server-Management-Studio.png

    සාමන්යෙන් Server එක Install කරන වෙලාවටම database File path එකයි Backup Path එකයි ගන්න වෙන Drive එකකට.

    වැඩිය සෙල්ලම් දාන්න කලින් Hard Drive එක Recovery කරලා බැලුව නම් හරි, .Bak file එකක් ඇති කොහේ හරි,.
    (client කෙනෙක්ගෙ Business System එකක DB එකක් නෙමෙයි නේද Delete කරේ ? :D )