Copy table data from one db to another on same server
Posted on 2004-04-26
I have been working on a local copy of a db (localDB) and have made a lot of changes to some tables and added some as well. The live db (liveDB) is on a shared host and is still active. So there are a few tables on the liveDB that I will need to get the latest information (ie membertables) from and copy it over to localDB when the revised site goes live.
I spoke to the host and this is what i will do. I will upload localDB under a new name to the server alongside liveDB. So that both dbs are on same server. They will create new DSN for this db for the revised site to use. Once the revised site is live liveDB will be taken down and localDB with the up-to-date info is the new liveDB.
This is what i need.
------> A sql script that i can use to specify a specific table to grab data from liveDB and copy/overwrite it to localDB.
I wont have access to Enterprise Manager at the host or remote access to the dbs so they requested i send a script to accomplish this task, however, I cant seem to be able to find out how to do it. I'm guessin that if it can be done through EM then it should be able to be done through Query Analyzer somehow....
My last option is to have them send me liveDB, i restore it locally then use Enterprise Manager DTS Export Data from it to update localDB.