Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Data Corruption Issues
 Restore a DB from .mdb and .ldb files.

Author  Topic 

shifis
Posting Yak Master

157 Posts

Posted - 2008-01-21 : 17:03:15
I have troubles with my computer, in the pc I have some databases but the only thing that they can recover were the .mdb and .ldb files.
How can I restore a database from these files?

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2008-01-21 : 17:19:46
.mdb or .mdf?

if mdf/ldf -- see sp_attach_db

sp_attach_db 'dbname', 'pathToDatafile', 'pathToLogfile'
Go to Top of Page

shifis
Posting Yak Master

157 Posts

Posted - 2008-01-21 : 19:06:30
Thank you
Go to Top of Page

fyz
Starting Member

4 Posts

Posted - 2008-05-20 : 02:07:42
quote:
Originally posted by shifis

I have troubles with my computer, in the pc I have some databases but the only thing that they can recover were the .mdb and .ldb files.
How can I restore a database from these files?




Hi,

If you can't restore the database by yourself, I think you can try a utility called Advanced Access Repair to repair your Access file. It works rather well for my corrupt Access files. It is not free, so can be used at last.

Alan


fyz
Go to Top of Page

Leila
Starting Member

5 Posts

Posted - 2008-05-23 : 04:11:21
Hello,

I have a critical situation qith SQL SErver.

We were upgrading a certain problem on the server.
Accidently, all databases have been lost and so the packages with them.

As we do a daily backup of the server's database, we have tried to restore the databases and packages from previous days.

In the data subfolder of SQL Server, we have files such as Test.mdf and Test.ldf

When trying to restore a given Database, we always get an error saying the the file format is not valid.

In your reply, you talked about:
sp_attach_db

sp_attach_db 'dbname', 'pathToDatafile', 'pathToLogfile'

What does these mean and how can they help in resolving the problem???

An if it possible to advise more on the situation we're having, it would then be great.

We're running out of time and the situation is becoming critical as no backup is succeeding (we've tried more than one!!!)
Thanks in advance for your help.
quote:
Originally posted by russell

.mdb or .mdf?

if mdf/ldf -- see sp_attach_db

sp_attach_db 'dbname', 'pathToDatafile', 'pathToLogfile'

Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-05-23 : 23:31:38
Something like:

sp_attach_db 'test', 'c:\test.mdf', 'c:\test.ldf'

Check books online for details.
Go to Top of Page

natguy
Starting Member

2 Posts

Posted - 2008-05-26 : 07:33:39
If it is mdb file or ldb file then you can easily recover data from this. Open these files in MS access and import data from old mdb to new mdb or ldb file. If you get any error use access repair utility. Whenever you import database file, first make a backup of database. download : http://www.repair-access-file.com

Hope it helps
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2008-05-26 : 14:22:39
quote:
Originally posted by Leila

Hello,

I have a critical situation qith SQL SErver.

We were upgrading a certain problem on the server.
Accidently, all databases have been lost and so the packages with them.

As we do a daily backup of the server's database, we have tried to restore the databases and packages from previous days.

In the data subfolder of SQL Server, we have files such as Test.mdf and Test.ldf

When trying to restore a given Database, we always get an error saying the the file format is not valid.

In your reply, you talked about:
sp_attach_db

sp_attach_db 'dbname', 'pathToDatafile', 'pathToLogfile'

What does these mean and how can they help in resolving the problem???

An if it possible to advise more on the situation we're having, it would then be great.

We're running out of time and the situation is becoming critical as no backup is succeeding (we've tried more than one!!!)
Thanks in advance for your help.
quote:
Originally posted by russell

.mdb or .mdf?

if mdf/ldf -- see sp_attach_db

sp_attach_db 'dbname', 'pathToDatafile', 'pathToLogfile'





You mean you have a critical system and aren't running test restores of your databases?
(And why are you storing packages in the database?).

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -