Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
SamC
White Water Yakist
3467 Posts |
Posted - 2003-09-10 : 19:01:44
|
| I've got two development PCs, SQL 2000 on both.What's the easiest way to move copies of all the test DBs from one PC to the other and get 'em running?Sam |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-09-10 : 19:14:52
|
| DETACH/ATTACH method is easieast for development. For production, you'd want BACKUP/RESTORE.sp_detach_db and sp_attach_single_file_db are the stored procedures that you'll need. Just run sp_detach_db on the source server for the database that you want to move. Then copy the MDF file from the source server to the destination server. Then run sp_attach_single_file_db on the destination server. You'll then want to run sp_change_users_login if needed to unorphan user accounts.If want the database to still be available on the source server, then you'll need to run sp_attach_db after the sp_detach_db to bring it back online.Tara |
 |
|
|
SamC
White Water Yakist
3467 Posts |
Posted - 2003-09-11 : 08:22:02
|
Thanks Tara |
 |
|
|
|
|
|