Attix5 Pro FAQ
Search:     Advanced search

How to restore SQL database files with a .DAT extension

Article ID: 130
Last updated: 13 Jul, 2012
Some older SQL servers created a *.DAT file when backing up the SQL databases. SQL unfortunately does not recognise the .DAT extension as a valid backup file so you need to extract the database from this file.
  1. First restore the .DAT file in Server Edition to a temporary location eg: C:\Temp\MyDatabase.dat.
  2. Next you need to confirm what the .DAT file contain. To do this run the following command in SQL:

    RESTORE FILELISTONLY FROM DISK='C:\Temp\MyDatabase.dat'

    This will return a result similar to the info below confirming the .DAT file contains the database files you want to restore:

    LogicalName :: PhysicalName :: FileGroupName

    Data_V2_1_Data :: C:DATABASESMyDatabase.MDF :: PRIMARY
    Data_V2_1_Log :: C:DATABASES\MyDatabase.LDF :: NULL
  3. You can now execute a RESTORE with the desired MOVE options

    RESTORE MyDatabase
    FROM DISK='C:\MyDatabase.dat'
    WITH
    MOVE 'MyDatabase' TO 'C:\DBDataFiles\MyDatabase.mdf',
    MOVE 'MyDatabase_Log' TO 'C:\DBDataFiles\MyDatabase_Log.ldf'
Article ID: 130
Last updated: 13 Jul, 2012
Revision: 1
Views: 18678
Comments: 0
Posted: 02 Mar, 2012 by Van Rensburg J.
Updated: 13 Jul, 2012 by Van Rensburg J.
This article was:  
Prev   Next
Article 127 - Exchange Circular Logging error     Article 131 - Backing Up a MySQL Database using Attix5 Backup Professional SE...