Sql-server – How to extract data from an MSDE .dat backup file

sql serversql-server-2005

A client wants me to extract customer data from his old system The application he was using appears to have used MSDE as the database and its backups have the extension .dat

SSMS express edition or Access do not appear to have a way to import data from these files.
Can someone point me in the right direction.

Edit

OK Sorry for asking this question as I have just managed to find the solution to.

1: create a new database in sql server 2005

2: select the option to restore

3: Find the .dat file using the dialog, you'll get the message "The backup set holds a backup of a database other than the existing database" (this was the problem for me)

4: In options select "overwrite existing database

The msde .dat file is then imported into sql server

Best Answer

Check thats its a valid MSSQL backup by listing its contents;

RESTORE FILELISTONLY FROM DISK='c:\your.dat'

If ok, note the logical names of the .mdf & .ldf from the results, then;

RESTORE DATABASE MyTempCopy FROM DISK='c:\your.dat'
WITH 
   MOVE 'LogicalNameForTheMDF' TO 'c:\MyTempCopy.mdf',
   MOVE 'LogicalNameForTheLDF' TO 'c:\MyTempCopy_log.ldf'

To restore the backup to the new database MyTempCopy.

Related Topic