July 27th, 2012, 10:46 AM
SQL database transfer to another PC
Hi, I have MSDE 2000 running on client PCs with a database in "C:\Program Files\Microsoft SQL Server\MSSQL\Data\" folder. I've made some changes to some of the tables and would need to replace the new version. I'm a bit confused about how to handle the .mdf and .ldf files. I tried stopping the service, and just copying the files to another computer and it worked on one of them, but not on another. I'm guessing the one that worked was just "luck", so I'd like to ask how to properly detach/attach the databases or back them up? I will not have any SQL Studio or manager or anything (but MSDE 2000) running on the client machine, so how do I register the new DB in the new PC?
I would write a small app that connects to the existing DB and executes SQL commands to update the DB Tables and Stored Procedures I changed, but that would limit me eventually since I need the "clean" database to be restorable when backups are made. I could restore the old version and update it every time, but it would be messy.
Any help appreciated. Thanks!
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!