Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello,
I am using following query to restore the database. It’s working fine and I am able to restored the database.
SQL
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;


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
Posted
Updated 30-May-12 2:57am
v2

1 solution

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)
 
Share this answer
 
Comments
RD Sh 30-May-12 10:17am    
It’s okay if I copy the backup file for every requested user, but would it be okay to copy from a single backup file(which is 300 MB in size) for every requested user on the same moment?
Corporal Agarn 30-May-12 10:43am    
Why are they at the same moment? It seems that they could access the original database (read-only) and save the trouble.
Anyway, coping 300 MB should not be a big problem. It is like copying any file.
RD Sh 30-May-12 23:23pm    
No, they can't access the original database. There are certain changes in the restored database once the restore done.

Time being, I will copy the backup file for the requested db user and restore the database from copied backup file.

Thanks djj

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900