This project is read-only.

Restore of Databases parallely in SqlServer 2005

Topics: ASP.NET 2.0, Business Logic Layer, Controls, Themes
Jun 3, 2009 at 12:49 PM

hi everyone,

iam just doing a sample task , of restoring 4 databases Parallely as well as sequentially, through C# code. (all together size of DB's are 2GB)

sequentially restoring database one by one.
Sequetial Total Time: 1 minute 20 Seconds (approx)
1st DB: 5 second
2nd DB: 30 Second
3rd DB: 25 Second
4th DB: 20 Second ( Total 1 munute 20 Second)

Parallel restoring database all atonce. The UI(object browser) of sqlserver shows [Restore] for all the databases simultaneously using C# threading code.

Parallel Total Time: 1 minute 45 Seconds (approx)
1st DB: 50 th second
2nd DB: 1 minute 20 th second
3rd DB: 1 minute 45th second
4th DB: 1 minute 45th second


the total parallel time should have been 30second because that was the max time taken by large database (2nd DB - 620MB approx), but it is not so in above case.

after several iteration the total Parallel time always takes more time than total Sequential time.

the same C# code other than restoring databases in SQL SERVER like (Copying files in code, Deploying IIS through code or any other processes) saves more than half of the time.

When it comes to sql server it takes more time(the same threading code). i need to give more specific reason to my team.

i could understand answer like stress will more on sqlserver ( server resources used more) which is not good.

can Someone tell me like specific reason does sqlserver can have only one active connection at a time ( Is this true or anything like this).

IS parallel restoring possible in Sqlserver, to put it simple.

looking for an urgent reply.