简体   繁体   English

Ubuntu 18.04 上的 SQL Server 操作系统错误 2(系统找不到指定的文件。)

[英]SQL Server on Ubuntu 18.04 Operating system error 2(The system cannot find the file specified.)

I am trying to backup database on sql server with : BACKUP DATABASE [mydb] TO DISK = N'/path/to/file.bak' WITH NOFORMAT, NOINIT, NOSKIP, REWIND, NOUNLOAD, STATS = 10我正在尝试在 sql server 上备份数据库: BACKUP DATABASE [mydb] TO DISK = N'/path/to/file.bak' WITH NOFORMAT, NOINIT, NOSKIP, REWIND, NOUNLOAD, STATS = 10

It creates backup if the path is /var/opt/mssql/data/file.bak cannot create backup in any other location.如果路径为/var/opt/mssql/data/file.bak则创建备份无法在任何其他位置创建备份。 Is this a permission issue?这是权限问题吗? Does any one had faced the same?有没有人遇到过同样的情况? Thanks in advance.提前致谢。

SQL Server on Linux (on Ubuntu) runs under the user mssql . Linux(在 Ubuntu 上)上的 SQL Server 在用户mssql下运行。 If you want SQL Server to be able to write to that folder, then either the user/group mssql needs write acces to the folder (and able to read/execute any parent folders), the mssql user needs to be part of a group that can, or the permissions for others needs to be set to write.如果您希望 SQL Server 能够写入该文件夹,则用户/组mssql需要对该文件夹进行写入访问(并且能够读取/执行任何父文件夹),则mssql用户需要成为该组的一部分可以,或者需要设置其他人的权限才能写。 Again, all parent folders need to allow access (read/execute).同样,所有父文件夹都需要允许访问(读取/执行)。

If you had a Folder /backups , for example, owned by root: with the permissions 770 , and then a folder /backups/SQLServer/ owned by root:mssql with the permission 775 , then SQL Server would be unable to write to the folder, as it wouldn't have been able to navigate to the folder /backups .如果您有一个文件夹/backups ,例如,由root:拥有,权限为770 ,然后文件夹/backups/SQLServer/root:mssql拥有,权限为775 ,则 SQL Server 将无法写入该文件夹,因为它无法导航到文件夹/backups

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 操作系统错误代码 3(系统找不到指定的路径。)在 linux 服务器上运行的 MSSQL - Operating system error code 3(The system cannot find the path specified.) MSSQL running on linux server 文件的目录查找失败,出现操作系统错误 3(系统找不到指定的路径。) - Directory lookup for the file failed with the operating system error 3 (The system cannot find the path specified.) 尝试在 SQL 服务器“系统找不到指定的文件”中创建或编辑作业步骤时出错。 - Error when trying to create or edit a job step in SQL Server “The system cannot find the file specified.” SQL Server 自定义 CLR 失败并显示错误“无法加载文件或程序集或其依赖项之一。系统找不到指定的文件。” - SQL Server custom CLR fails with error "Could not load file or assembly or one of its dependencies. The system cannot find the file specified." 将MSSQL连接到PHP错误:[系统找不到指定的文件。] - Connecting MSSQL to PHP Error: [The system cannot find the file specified.] 安装SQL Server 2012错误“系统无法打开指定的设备或文件。” - Installing SQL Server 2012 error “The system cannot open the device or file specified.” 无法打开备份设备“ D:\\ Working Projects \\ FullBackUp.BAK”。 操作系统错误3(系统找不到指定的路径。) - Cannot open backup device 'D:\Working Projects\FullBackUp.BAK'. Operating system error 3(The system cannot find the path specified.) SQL 服务器数据库附加错误。 该系统找不到指定的文件 - SQL Server Database Attach error. The system cannot find the file specified 系统找不到生产服务器上指定的文件 - The system cannot find the file specified on Production server 系统找不到IIS服务器中指定的文件 - System cannot find the file specified in iis server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM