小编mbü*_*mbü的帖子

Ubuntu 上的 MS-SQL:无法恢复 database.bak 文件

我无法恢复数据库备份 (db.bak)。

给定以下 Transact-SQL:

1> RESTORE DATABASE db
2> FROM DISK = '/var/opt/mssql/db.bak' ;
3> GO
Run Code Online (Sandbox Code Playgroud)

结果是:

Msg 5133, Level 16, State 1, Server mbü-lubuntu, Line 1
Directory lookup for the file "D:\Program Files\Microsoft SQL 
Server\MSSQL12.MSSQLSERVER2014\MSSQL\DATA\db.mdf" failed with the operating     
system error 2(The system cannot find the file specified.).
Msg 3156, Level 16, State 3, Server mbü-lubuntu, Line 1
File 'db' cannot be restored to 'D:\Program Files\Microsoft SQL 
Server\MSSQL12.MSSQLSERVER2014\MSSQL\DATA\db.mdf'. Use WITH MOVE to     
identify a valid location for the file. …
Run Code Online (Sandbox Code Playgroud)

sql-server database-restore ubuntu-16.04

3
推荐指数
1
解决办法
1990
查看次数