RESTORE DATABASE mydb
FORM DISK='D:\BACKUP\MYDB.BAK'
WITH NORECOVERY
RESOTRE DATABASE MYDB
如何指定 数据库的还原的路径?
比如我要吧db数据库还原到 d:\data\sqldata\中
要使用RESTORE DATABASE 的哪个参数?
大虾教教!!
7 个解决方案
#1
WITH MOVE '逻辑文件名' TO '物理地址'
#2
RESTORE DATABASE mydb
FORM DISK='D:\BACKUP\MYDB.BAK'
WITH
move 'xxxxx' to 'd:\data\sqldata\',
move 'xxxxx' to 'd:\data\sqldata\',
NORECOVERY
#3
Use master
Restore database BIL from disk='D:\BACKUP\MYDB.BAK'
with standby='d:\undo_MYDB.dat',
move 'MYDB_Data' to 'd:\NEWData\MYDB_Data.mdf',
move 'MYDB_Log' to 'd:\NEWData\MYDB_log.ldf'
#4
with standby='d:\undo_MYDB.dat',
这句是什么意思?
大虾请教一下
#5
#6
命令你自己都写出来了啊
假设数据库名为test,主文件名为test.mdf,日志文件为test_log.ldf,
如果要把文件转移到其它目录,如d:\db,则
restore database test from disk='f:\bak\test_bak'
with move 'test' to 'd:\db\test.mdf',
move 'test_log' to 'd:\db\test_log.ldf'
假设数据库名为test,主文件名为test.mdf,日志文件为test_log.ldf,
如果要把文件转移到其它目录,如d:\db,则
restore database test from disk='f:\bak\test_bak'
with move 'test' to 'd:\db\test.mdf',
move 'test_log' to 'd:\db\test_log.ldf'
#7
...解释得已经比较清楚了
#1
WITH MOVE '逻辑文件名' TO '物理地址'
#2
RESTORE DATABASE mydb
FORM DISK='D:\BACKUP\MYDB.BAK'
WITH
move 'xxxxx' to 'd:\data\sqldata\',
move 'xxxxx' to 'd:\data\sqldata\',
NORECOVERY
#3
Use master
Restore database BIL from disk='D:\BACKUP\MYDB.BAK'
with standby='d:\undo_MYDB.dat',
move 'MYDB_Data' to 'd:\NEWData\MYDB_Data.mdf',
move 'MYDB_Log' to 'd:\NEWData\MYDB_log.ldf'
#4
with standby='d:\undo_MYDB.dat',
这句是什么意思?
大虾请教一下
#5
顶上~!
SIGNATURE----------------------------------------------------------------------
碰碰车小游戏
金庸群侠传3小游戏
疯狂坦克小游戏
SIGNATURE----------------------------------------------------------------------
碰碰车小游戏
金庸群侠传3小游戏
疯狂坦克小游戏
#6
命令你自己都写出来了啊
假设数据库名为test,主文件名为test.mdf,日志文件为test_log.ldf,
如果要把文件转移到其它目录,如d:\db,则
restore database test from disk='f:\bak\test_bak'
with move 'test' to 'd:\db\test.mdf',
move 'test_log' to 'd:\db\test_log.ldf'
假设数据库名为test,主文件名为test.mdf,日志文件为test_log.ldf,
如果要把文件转移到其它目录,如d:\db,则
restore database test from disk='f:\bak\test_bak'
with move 'test' to 'd:\db\test.mdf',
move 'test_log' to 'd:\db\test_log.ldf'
#7
...解释得已经比较清楚了