AciDCooL Posted July 7, 2016 Report Share Posted July 7, 2016 (edited) Heya Guys, I have been fiddling with this question, on how to merge two databases. Because I want to merge one server with another. Is there even a way to merge two distinct databases? And with this merge i mean only auth and characters since world is identical anyway. The options I researched are: - NULL all the primairy key's so auto increment will do its job, but there are so many primary keys that i'm not sure that this is even possible. Since removing the keys from say character-aura would mean that the second row correspond to a totally different user. I'm a bit lost with this one. - Export all characters with pdump, since there are more then 300 accounts im not sure this is the best use of my time. If any dba guru or code monkey could step up and give me a hint in the right direction, this will be sincerely appreciated. Edited July 7, 2016 by AciDCooL Link to comment Share on other sites More sharing options...
CDawg Posted July 12, 2016 Report Share Posted July 12, 2016 I just got back working on TC and decided to fire up my very old TC and thought to myself, hmm. let me pull the latest and see the changes they have been working on. I wasn't surprised that almost every table structure had vast differences from 1 year ago. Honestly, the best way I did it was with a script. This is a lot of work (depending on the diff between both DB and table structures). If it's another project outside of TC, it's going to be even more complicated! On 7/7/2016 at 9:32 AM, AciDCooL said: Since removing the keys from say character-aura would mean that the second row correspond to a totally different user. that's what the unique "guid" is for and pdump will allow to insert a character using another guid of your choice. Pull each guid per table and insert. Your newly insert table will have some conflicts. Even going from 1 year old TC with a ton of characters into the newest character DB, required so much work with changes. I don't want to discourage you,.. I would just pick an easy programming lingo like php or perl, get a loop cycle with pdump (if it's successfull which i highly doubt) then go from there. I did it manually with a script almost line by line, bcuz I knew there would be conflicts. And there was, ALOT! 1 Link to comment Share on other sites More sharing options...
AciDCooL Posted July 12, 2016 Author Report Share Posted July 12, 2016 Hey CDawg, I already started scripting something together. Since I was reading up on databases and combining two is a big no no. And it's not discouragement since I thrive on problems like these I was just wondering if I was going in the right direction. I have two semi compatible sides so writing something around pdump is my best and fastest route. Thanks for the headsup! Link to comment Share on other sites More sharing options...
Recommended Posts