同时从单个备份文件还原多个数据库 [英] Restore Multiple Databases from single backup file at same time
问题描述
你好,
我正在使用以下查询来还原数据库.一切正常,我可以还原数据库.
Hello,
I am using following query to restore the database. It’s working fine and I am able to restored the database.
RESTORE DATABASE RestoreDBName
FROM DISK = 'D:BackUpYourBaackUpFile.bak'
WITH MOVE 'MDFLogicalName' TO 'D:RestoreDBName.mdf',
MOVE 'LDFLogicalName' TO 'D:RestoreDBName.ldf',
NOUNLOAD, REPLACE, STATS = 10;
但是在我的应用程序中有一个场景,其中多个用户可以请求从单个备份文件(在SQL Server中)还原数据库.
我正在使用SQL软件包来还原数据库,但是当多个用户试图同时还原数据库时,出现了还原失败错误.
如果有5位用户试图从单个备份文件还原数据库,则只有3位用户可以完成还原,其余2位用户则遇到了还原失败的错误.
如果有人建议我解决此问题的解决方案,那将是不小的希望.
提前谢谢.
_Rahul
But there is a scenario in my application, in which multiple user can request for restoring the database from the single backup file( in SQL Server).
I am using SQL Packages for restoring DB, however I am getting restoration failed error when more than one user trying to restore the DB at the same time.
If there are 5 users trying to restore the DB from the single backup file, then only 3 are able to get restore done and rest 2 users are getting the error for restoration failed.
It would be appreciable if anyone suggest me the solution to get this problem resolved.
Thanks in advance.
_Rahul
推荐答案
是否可以将备份文件复制到用户,以便他们可以从中还原?
如果您需要将备份还原到多台计算机,您是否考虑过使用某种复制方式? (镜像)
Is it possible to copy the backup file to the user so they can restore from it?
If you need to restore a backup to multiple computers have you thought about using some sort of replication? (Mirroring)
这篇关于同时从单个备份文件还原多个数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!