Re: Copy complete tables - What is the best pattern?
From: Adam Machanic (amachanic_at_hotmail._removetoemail_.com)
Date: 01/07/05
- Next message: Dennis Redfield: "Re: BCP/Bulk Insert from Unix machine"
- Previous message: Dan Guzman: "Re: odbc bcp api vs BCP utility"
- In reply to: Xian: "RE: Copy complete tables - What is the best pattern?"
- Next in thread: Xian: "Re: Copy complete tables - What is the best pattern?"
- Reply: Xian: "Re: Copy complete tables - What is the best pattern?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 7 Jan 2005 09:10:56 -0500
20 tables? -- how about something totally different? Create a new database
just for those tables, use sp_detach_db, detach it, copy it to a new
location, re-attach it using sp_attach_db, and then use sp_renamedb to swap
in the new database...
That will be virtually instant and use very few resources. And it will
maintain your old data in the same place (once you re-attach the
database)... And it's very uncomplicated.
-- Adam Machanic SQL Server MVP http://www.sqljunkies.com/weblog/amachanic -- "Xian" <xcits@newsgroup.nospam> wrote in message news:A7453404-CB93-4488-96E5-9FE1876D2329@microsoft.com... > Hi! > > Thanks for the answers. Here a little bit more information about the system: > > I don't have different databases. TableA and TableB are in the same physical > database. > > The data in the "master" Table can be changed on a timeframe between 1 day > and 6 months (!) (it depends on the bussines case). In this timeframe the > data will be changed daily from aprox. 5 useres. > > Also the real world application has not only TableA and TableB. There are > aprox. 20 Tables which have relationships between them and for all the Tables > I need the "copy" solution. > > One Table holds aprox. 10000 rows, each row has 20 - 100 kB (there is much > of NTEXT in each table.) > > So the drop and rebuild solution is not suiteable for me, because after > "copyying" from TableA to TableB the superusers go on to work on TableA. > > Delta copy looks a little bit to copylicated in this case for me and I have > concerns about unsynchronised data. I need really a 100% exact copy from > TableA in TableB. (Also the unknown timeframe from 1 day to 6 monts looks a > little bit to long delta copy.) > > I'm looking for a solution which does need the least ressources on the > server (the duration for the copy-operation is not so important (in the worst > case this can be up to 1 day! ;-) ) > > So I hope, this input was helpfull. > > Looking forward to hear from you, > > regards, > > Chris >
- Next message: Dennis Redfield: "Re: BCP/Bulk Insert from Unix machine"
- Previous message: Dan Guzman: "Re: odbc bcp api vs BCP utility"
- In reply to: Xian: "RE: Copy complete tables - What is the best pattern?"
- Next in thread: Xian: "Re: Copy complete tables - What is the best pattern?"
- Reply: Xian: "Re: Copy complete tables - What is the best pattern?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|