I need to copy my entire SQL Server 2008 database including the schema and all data verbatim from one computer to another.

How do I do that?

link|improve this question
feedback

4 Answers

up vote 2 down vote accepted

Export the database from the original server and then import it into the new one.

To export right click over the name then Tasks > Backup.... If you make sure you select the "Backup type" as Full and "Backup component" as Database this should copy everything.

To import right click again then Tasks > Restore > Database....

link|improve this answer
This is the best way to do it. Isn't backup/restore different than export/import? – Bratch Jan 12 '10 at 15:24
@Bratch - technically, but the end result is the same. – ChrisF Jan 12 '10 at 16:01
feedback

If you can take it offline for a while, it is quicker to detach it, copy the mdf and ldf files, and then just re-attach it.

link|improve this answer
Will all users and permissions and such be included? – howdy Jan 12 '10 at 15:11
@howdy: Yes, but you will need to re-create the server logins and associated with the database users (the logins exist at the server level, not the database). – Richard Jan 13 '10 at 10:28
Those can be scripted seperately – baldy Jan 14 '10 at 7:41
feedback

This question on Stackoverflow might be of some use to you. How can I export data from SQL Server.

Hope this helps some.

link|improve this answer
feedback

See this MS knowledgebase article: How to move databases between computers that are running SQL Server

link|improve this answer
feedback

Your Answer

 
or
required, but never shown