尝试还原数据库时收到错误

编程入门 行业动态 更新时间:2024-10-26 22:17:45
本文介绍了尝试还原数据库时收到错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

尝试使用移动选项获取错误时恢复数据库。 恢复数据库CorruptDemoDataPurityfrom disk ='E:\ backup\CorruptDemoDataPurity.bak' with move 'SalesDBData'到'D:\ backup \DemoDataPurity.mdf' ,将'SalesDBLog'移动到'D:\ backup \DemoDataPurity_log.ldf',替换 错误: 消息102,等级15,状态1,行4 'disk'附近的语法不正确。 消息319,级别15,状态1,行5 关键字'with'附近的语法不正确。如果此语句是公用表表达式,xml名称空间子句或更改跟踪上下文子句,则必须以分号结束前一个语句。

While trying to restore my database with move option getting error . restore database CorruptDemoDataPurityfrom disk='E:\backup\CorruptDemoDataPurity.bak' with move 'SalesDBData' to'D:\backup\DemoDataPurity.mdf' , move 'SalesDBLog' to 'D:\backup\DemoDataPurity_log.ldf',replace Error: Msg 102, Level 15, State 1, Line 4 Incorrect syntax near 'disk'. Msg 319, Level 15, State 1, Line 5 Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xml namespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.

推荐答案

请检查MSDN网站的语法。 RESTORE(Transact-SQL) [ ^ ] Please check MSDN site for the syntax. RESTORE (Transact-SQL)[^]

restore database CorruptDemoDataPurityfrom disk=...

如果这是您实际键入的内容,那么您在数据库名称和 FROM 之间缺少空格:

If that's what you actually typed, then you're missing a space between the database name and the FROM:

restore database CorruptDemoDataPurity from disk=...

更多推荐

尝试还原数据库时收到错误

本文发布于:2023-10-28 00:42:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1534997.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   数据库

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!