Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a database in sql server 2008, how can I copy this or i dont know how to say, and use it with the program in another computer.Ex- I have a c# program and I have a register application. If someone registers, they register in the database file, but in sql, how to find this file or copy and use on another computer with the program. Thanks !
Posted
Updated 1-Jan-15 2:03am
v2
Comments
PhilLenoir 24-Sep-14 13:54pm    
Your question isn't clear. If you want to move a SQL database, detach the database, copy the MDF and LDF files and attach on the new computer. Do a web search on Detach SQL Server
Herman<T>.Instance 24-Sep-14 17:27pm    
or he could adjust is connectionstring so the other computer connects to his database
PhilLenoir 24-Sep-14 17:33pm    
Too obvious! :)
ChauhanAjay 24-Sep-14 21:42pm    
You could use any one of the two apporaches below
Approach 1:

You could take a backup of the database on the source and restore it in the destination computer.

Approach 2:
In sql server you have an option to copy database from one sql server to the other sql server you can use this method too.

A database is never copied.
There is only one instance of the database and a connection string is established to connect to that database from all other machines.
 
Share this answer
 
Probably you are trying to do this-

1. Create a backup file from 1st computer
How to Backup a Database using Management Studio[^]
2. Copy this file to the second computer
3. Restore the backup in the 2nd computer
How to Backup a Database using Management Studio[^]
4. Do the required changes application config file for Server, Database and login credentials.

Hopefully, it was helpful :)

In case this doesn't resolve your problem, please let me know :)
 
Share this answer
 
v2

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