尝试还原数据库时收到错误 [英] getting error while trying to restore database

查看:95
本文介绍了尝试还原数据库时收到错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用移动选项获取错误时恢复数据库。

恢复数据库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=...


这篇关于尝试还原数据库时收到错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆