简体   繁体   English

在sql server中恢复数据库

[英]Restore database in sql server

I have some sql server's backup file(format .bck). 我有一些sql server的备份文件(格式为.bck)。 In my case, I do not know log file name. 就我而言,我不知道日志文件名。 So I can't use with move in restore command. 因此我无法在restore命令中使用with move Is there anyway to restore database without move? 反正有没有移动恢复数据库? If yes, please guide me. 如果是,请指导我。

I want to use like below one. 我想用下面的一个。

restore database testdb from disk = 'folderpath\aatest.bak'

You sure can know the log file name and use WITH MOVE . 您确定可以知道日志文件名并使用WITH MOVE Use RESTORE FILELISTONLY to retrieve the list of database files (including log) from the backup first. 使用RESTORE FILELISTONLY首先从备份中检索数据库文件列表(包括日志)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM