Attaching multiple MDF files as a database

  • Hi,

    I have a database that consists of 2 MDF files, and 2 LDF files. However the machine was re-installed and when the RAID array of the drive holding the logs was rebuilt, we lost the LDF files. The LDF files are not really of importance to me.

    Both MDF files are still OK, but can someone please tell me how to re-attach them? I know that the LDF files are usually re-created, but when I try attaching them wth SQLEM, I select the Data_1 file, the Data_2 file automatically populates on the file list, and the LDF files are marked as missing, which was fine before for single file databases.

    When I click on OK, I get the following error:

    Error 1913: Could not open new database 'DataVault'. CREATE DATABASE is aborted.

    Device activation error. The physical file name 'e:\SQL Logs\DataVault_Log1_Log.ldf' may be incorrect.

    Device activation error. The physical file name 'e:\SQL Logs\DataVault_Log2_Log.ldf' may be incorrect.

    Is there an way I can salvage this data?

    <hr noshade size='1' width='250' color='#BBC8E5'>Kindest Regards,

    Roelof
    <a href='http://' class='authorlink' target='_blank'></a>

    --There are only 10 types of people in the world. Those who understand binary, and those who don't.

  • I think you have a serious problem here.  The log files are tightly coupled to their data files.  If you have a backup it would be best to restore from that.  Barring that I did see an article one on this subject (though I have never had to try it).  A google search found the article (or one similiar anyway) at http://www.spaceprogram.com/knowledge/2002/06/recovering-from-deleted-log-file-on_12.html

    I would practice the steps on a development server and with copies of the MDF files (don't you meand 1 MDF and 1 NDF file?). 

    Anyway good luck and sorry I could not be more help,

    James.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply