Toad World® Forums

Attach Database cannot handle renamed .mdf/.ldf files

Steps to reproduce:

  1. Detach an existing database.

  2. Rename the .mdf and .ldf files (i.e. MyNewName.mdf MyNewName.ldf)

  3. Using Toad, Right-Click Databases, Tasks, Attach

  4. Click Add, Browse to the MyNewName.mdf file, click OK.


Files associated with selected database: sub-form shows the

a) Filetype: Data (the .mdf) with the correct filename. (This is correct)

b) Filetype: Log (the .ldf) with the INCORRECT filename. This is expected – that’s how SQL Works, it retrieves the original filenames from the .mdf.

EXPECTED: I should be able to edit the File Path of the Log file and correct the filename to the new (renamed) value.

ACTUAL: The file path is READ ONLY and does not allow edits.

RESULT: Cannot Use Toad for SQL Server to mount databases where files have been renamed!

Work Around: Click the SQL Script tab of the Attach Database screen – then click the button to edit the script in editor.

MANUALLY edit the script in the editor to fix the filename of the .ldf file.

This is REALLY ANNOYING to have to do. Please fix this. This is on:

Toad for SQL Server Beta

Hi Darren,

Thank you. Toad support user select files attach database window. First, we can select the file associated line. Then the line will showup a button "..."

Click the button can select the rename file.