cancel
Showing results for 
Search instead for 
Did you mean: 

MYSQL 2005

Former Member
0 Kudos

Hi experts,

I had installed MYSQL 2005 in small business server 2003. Now i had the problem in restoring of backup file, iam having .bak file in my 😧 of server. when i tried to restore the database using SQL server management studio by creating new databse, i could not do it. The error is occuring, its "Directory lookup for the file: filename.mdf" failed with the operating system error 2. what is the solution for it? what is .mdf? how to resolve this problem and to restore?

thanks,

kannan.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member185954
Active Contributor
0 Kudos

Hi Kamal,

You should check on MSDN website :

http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/sqlbackuprest.mspx#EUEAG

Regards,

Siddhesh

clas_hortien
Active Contributor
0 Kudos

Hi,

the problem is, that when you do a backup of a database, the complete path names are stored within the backup. If you now want to restore ths backup and the path to the former database location doesn't exists, you will get an error 2 (path or file not found). To avoid this, you can use the WITH MOVE method (when you restore with a script, see books online (RESTORE DATABASE) for details) or you change the filenames (Restore as) on the second tab of the restore dialog box to a new location.

Regards

Clas

Former Member
0 Kudos

Hi Kannan,

the mdf is the so called <b>M</b>aster <b>D</b>ata <b>F</b>ile - each SQL Server database consists of at least 1 master data file and 0 - n ndf - files. The Master Data File is necessary as it contains the information which files belong to the database and where they can be found.

The error you have pasted below looks like it's being caused by the fact that the backup drive (which is D according to your explanations) and the datafile drive (I assume it's C) are not the same.

You should try to copy the backup file to the drive where the datafiles will be restored to.

Kind regards,

Beate