Click here to Skip to main content
15,126,317 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello to all......
Me and my friend are currently working on project using Visual studio 2010 as frount end and SQL Database as back end.
As we both are working on same topic so we made database in both laptop say A and B.
Now when i first make a backup of database from my laptop (say A) and want to restore the same in my friend's laptop (say B),i got the Error message.
The same case occur with the database made in laptop B,and wouldn't restoring in System A.
Can anyone have a solution of this problem.
Currently we both have same Server type i.e. Database Engine.
same Authentication i.e. SQL Server Authentication
same Login ID i.e sa.
but DIFFERENT Server Name and Password.

The Error Message is
Restore failed for Server 'RAJESHKUMARGUPT'. (Microsoft.SqlServer.Smo)

Additional information:
System.Data.SqlClient.SqlError: The media set has 2 media families but only 1 are provided.All
members must be provided. (Microsoft.SqlServer.Smo)
Updated 2-May-12 0:10am
Herman<T>.Instance 1-May-12 14:44pm
what is the errormessage?
after restoring a databse also set the user again to the db. Better get 1 server to which you both can connect!
Shahin Khorshidnia 1-May-12 16:06pm
What is the error?
Rajesh28046Gupta 2-May-12 5:16am
Respected "digimanus" and "Shahin Khorshidnia" Sir/Madam.
Sorry For the inconvinence.....that i have not posted the error message.
now i have updated my question again with the error message.
please suggest your valuable suggestion now.

Be Sure that

* you don't have any other database with same name.
* Your database's name to which you want to restore should be input-ed in, To Database Field
Rajesh28046Gupta 2-May-12 5:17am
sorry sir
this also not worked for me.
Pr!y@ 2-May-12 5:24am
Have a look on this thread :

Click me
Read this article:[^]
It was very useful for me and I think that could solve your problem.
Rajesh28046Gupta 2-May-12 5:36am
Respected Gianmaria Gregori
As per your Suggested Link I got the Error
Restore failed for Server 'RAJESHKUMARGUPT'. (Microsoft.SqlServer.Smo)

Additional information:
System.Data.SqlClient.SqlError:Cannot open backup device 'H:\all'.Operating system error 2(The System Cannot find the path specified(Microsoft.SqlServer.Smo)
Gianmaria Gregori 2-May-12 13:04pm
I don't understand why this happens.
It looks like you have selected a bak file that doesn't exist, but the source selection is guided in the restore procedure.
Rajesh28046Gupta 3-May-12 4:46am
thanks Gianmaria Gregori
Hey have you tried this one
C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Backup
paste your .bak file here in that location and then now run the restore process .. let me know if it is successive or not......
Rajesh28046Gupta 3-May-12 4:45am
sorry but again same error...........
Kalyan33 3-May-12 11:28am
k then try to do back up again ..and restore..
may be once u check the MDF loaction also while restoring the database

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