简体   繁体   中英

Can't restore a SQL Server database from a backup file - Error: 102

When I try to restore a SQL Server database, I get:

"An exception occured while executing a Transact-SQL statement or batch. Incorrect syntax near 's' Unclosed quotation mark near character string ". (Microsoft SQL Server, Error: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. To resolve it, I removed the ' and it worked.

这是由于权限问题引起的。首先,您需要将* .bak文件移动到SQL服务器的数据目录中,然后再试一次。

It is a permission issues for the SQL Server database not user. Just try to move your *.bak to the data directory where other files kept. Now repeat that process again.

If you find it helpful then, mark it as the correct answer.

Good Luck!

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