尝试使用移动选项获取错误时恢复数据库。 恢复数据库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=...
更多推荐
尝试还原数据库时收到错误
发布评论