.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> Sql Server >> Post New QuestionBookmark and Share Subscribe to Forum

copy databse from one PC to another Pc

Posted By: Nehal     Posted Date: October 29, 2009    Points:2   Category :Sql Server
How can we copy the data base from one pc to another pc.
I am makin project. It is on my Pc. Now how can I Copy my databse to another pc to show my project. It is in asp.net with c#.
And sql server is 2005.
Plz say me whole procedure from start to end.

Responses
Author: Akhil Raj       [Moderator]      
Posted Date: October 29, 2009     Points: 5   

you can use different method like generate script, backup database etc

please review the following articles

http://www.codeproject.com/KB/database/CreateDatabaseScript.aspx


http://www.exforsys.com/tutorials/sql-server-2005/sql-server-database-backup.html


Author: Amit Mehra             
Posted Date: October 29, 2009     Points: 5   

Hi Nehal,

you can get the database backup file .bak and you can restore to destination database..you can do this through wizard but in case if you want to take database backup you can use this query to restore .bak file using SQL Query


To Restore database back file

RESTORE DATABASE [SouthWind]
FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\MyBack.BAK'


Thanks,
Amit
Please "Mark As Answer " if this post help you.
Author: Abhisek Panda             
Posted Date: November 01, 2009     Points: 5   

You can simply copy the database files(.MDF and .LDF) of your project and paste it in the client system. You can find it in Program Files->SQL Server->Data. It may vary accordingly to your system.

After replacing it you can restore it from SQL Server Enterprise Manager.

Author: sriram             
Posted Date: October 28, 2011     Points: 20   

its lanNetwork connection ,in case its LANNETWORK means easy to share the database on pc to another.

Not LANNETWORK means take backup database and copy and restore to another PC.





Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend