Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with importing data, please help. 1

Status
Not open for further replies.

stetocina

Programmer
Joined
Jan 19, 2002
Messages
3
Location
HR
Hi all

I am trying to import a database but the problem is the following.

I backed up the db on the other sql server and brought it to the other sql server and tried to do a restore of the db into the unexistent database(I called this new db new_netsy). I got the following error:

Microsoft SQL-DMO(ODBC SQLSTATE: 42000)
The file 'd:\mssql70\data\new_netsy.mdf' can not be used by RESTORE. Consider using the WITH MOVE option to identify the vali location for the file.
Backup or Restore terminating abnormaly.

Backup file is c:\mssql7\backup\netsy32aa and I dont know where from this d:\mssql70\data\new_netsy.mdf came up.
 
Hi There

The problem you are having is that the path of the files in the new database are different than the one you are trying to restore from.

If you are using Enterprise Manager

1. Right Click on the Database
2. Select All Tasks
3. Select Restore Database
4. Click the Options Tab
5. Ensure the Force Restore over existing database is checked.
6. In the Restore As box, change the path of both the data and log files to that of the database you are trying to restore to.
7. Click <OK>


Hope This Helps.

Bernadette
 
No it doesn't help. I don't have a db. I just want to make a new db from the backup I made on another computer.

 
You can create a new DB on your new server then restore the backup into it, using the instructions above.

Bernadette
 

Dear stetocina
Actually , you have to change the path on option tab. When you restore select the option tab and click on the path and change the path. It should be the same as where you installed the new SQL server.

Actaully, When you create a database; two files are created in the Data folder of mssql70 one for data which is .mdf and other is for log which is .ldf and when you restore other backup in this new database then you have to make sure that the path and the name of the .mdf and .ldf are same.

Regards,
essa2000
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top