简体   繁体   中英

SQL Server 2014 restore .bak file

I am trying to restore a .bak file (might be created with SQL Server 2010) in SQL Server 2014 with this script

use master;
restore database [Vision] from disk = 'C:\Users\felix_000\Documents\Vision\db\Vision_db.bak'
with replace 

and error log is as following:

Msg 5133, Level 16, State 1, Line 2
Directory lookup for the file "C:\\SQLData\\vision_newschema.mdf" failed with the operating system error 2(The system cannot find the file specified.).
Msg 3156, Level 16, State 3, Line 2
File 'Vision' cannot be restored to 'C:\\SQLData\\vision_newschema.mdf'. Use WITH MOVE to identify a valid location for the file.
Msg 5133, Level 16, State 1, Line 2
Directory lookup for the file "C:\\SQLData\\vision_newschema_log.ldf" failed with the operating system error 2(The system cannot find the file specified.).
Msg 3156, Level 16, State 3, Line 2
File 'Vision_log' cannot be restored to 'C:\\SQLData\\vision_newschema_log.ldf'. Use WITH MOVE to identify a valid location for the file.
Msg 3119, Level 16, State 1, Line 2
Problems were identified while planning for the RESTORE statement. Previous messages provide details.
Msg 3013, Level 16, State 1, Line 2
RESTORE DATABASE is terminating abnormally.

I tried with right click Tasks -> Restore -> Database , it told me that

Restore of database 'Vision' failed. BACKUP LOG cannot be performed because there is no current database backup. (Microsoft.SqlServer.SmoExtended)

Here are the methods I tried,

  1. Run SSMS as administrator
  2. change the file folder security property to FULL CONTROL

确保您没有尝试在Express Edition上恢复Entreprise Edition的备份。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM