Click to See Complete Forum and Search --> : [SQLServer Express]how to copy a database to another computer
jhammer
October 16th, 2006, 07:48 AM
I have a database defines in my SQL Server Express.
I installed SQL Server Express on a different computer.
I want to copy my database from the old computer to the new one.
What are the steps that I need to take in order to copy all the tables schemas and data?
(I don't have any security or other administration to worry about).
Shuja Ali
October 16th, 2006, 08:06 AM
You can just copy the database (file) to another location, thats it. And read this
http://msdn2.microsoft.com/en-us/library/ms165673.aspx
jhammer
October 16th, 2006, 09:59 AM
Here are the steps I did:
1. I copied the mdf and ldf files from C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data to the other computer (same location).
2. In the Management tool I right-clicked on Databases, and selected Attach...
3. I clicked on Add... and selected the mdf file that I copied in step 1
That's it. Thanks Shuja.
exterminator
October 17th, 2006, 02:39 PM
Copying the MDF/LDF is the simplest way.
You could also take a backup of the database... and take that file.. create a db (with the same name on the other system) and restore from that file. It should have done the trick as well.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.