[英]Can't restore a SQL Server database from a backup file - Error: 102
When I try to restore a SQL Server database, I get: 当我尝试还原SQL Server数据库时,我得到:
"An exception occured while executing a Transact-SQL statement or batch. Incorrect syntax near 's' Unclosed quotation mark near character string ". “执行Transact-SQL语句或批处理时发生异常。's'附近的语法不正确字符串附近的引号引起来”。 (Microsoft SQL Server, Error:102)"
(Microsoft SQL Server,错误:102)”
I am not using any script, just clicking "Restore Database", selecting the file (it has no extension, by the way), and get this error. 我没有使用任何脚本,只需单击“还原数据库”,选择文件(顺便说一下,它没有扩展名),并得到此错误。
I tried to search for a solution, but can't find anyone that had a similar problem. 我试图寻找解决方案,但找不到任何遇到类似问题的人。 I would really appreciate any input!
我将不胜感激任何输入!
Thanks! 谢谢!
Make sure that you didn't name the directory using special characters. 确保您没有使用特殊字符命名目录。 For example, I named my directory
SQLDB's\\
and got that error. 例如,我将目录命名为
SQLDB's\\
并收到该错误。 To resolve it, I removed the ' and it worked. 为了解决该问题,我删除了“,并且可以正常使用。
这是由于权限问题引起的。首先,您需要将* .bak文件移动到SQL服务器的数据目录中,然后再试一次。
It is a permission issues for the SQL Server database not user. 这是SQL Server数据库而非用户的权限问题。 Just try to move your *.bak to the data directory where other files kept.
只需尝试将* .bak移至其他文件所在的数据目录即可。 Now repeat that process again.
现在再次重复该过程。
If you find it helpful then, mark it as the correct answer. 如果您认为有帮助,请将其标记为正确答案。
Good Luck! 祝好运!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.