Jump to content
  • 0

Synchronize Characters between two databses.


blackms3

Question

Hi Everyone,

Just a little question, I have two instances of mangosd, one with PlayerBot, one without.

I'd like to synchronize characters between the two databases, in order of let the user play in a server or in another and share the same progresses.

Have you an Idea of which queries have I to run? And which table have I to keep updated?

Thanks in advance!

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

Characters have data in so many tables. The spells they know/trained, the inventory, quest status, etc, it's all saved in different tables. They might even show up as the person putting or removing something in a guild bank tab!

So... perhaps it's easier to just export a character and import it again on the other server? I vaguely remember the commands are something like "pdump write" and "pdump load".

Oh, do make a backup when you first test this. I would be surprised if that functionality is often used, so you never know exporting/importing has a little bug :)

Link to comment
Share on other sites

If you still want to synchronise two databases, keep in mind that you can not just sync the whole characters database, you'll have to sync also some of the tables from the realm database as the accounts linked to the characters are stored there and the number of characters per realm also.

Link to comment
Share on other sites

there might be problems using 1 char db to 2 servers,

IF I REMEMBER IT ORRECTLY

each core load some tables from char db to memory and perform some checks when it starts up

and load individual chars as they login

each core will save data from memory to db at set interval or player logout

as proposed lets imagine a simple situation

- 2 diferent players,

- one on each server,

- both using same char db,

- and they get a new item

each server will assign new entry to that item in item_instance, but as server reads it when it starts and keep it on memory just saving eventually, both servers can use same range ID to new entries

as long both players are online, both servers will know what each player has in its inventory, but as both players logout that kind of info inst ther anymore to be read on the fly, so after a while when both players try to connect, both servers will read db and load every thing related to that char id from db

IMO for sure one of those chars wont have that item, as its been long i dont do anything to mangos, i wont dare to predict other errors that will happen, as CHARS DB unlike REALMD DB was never meant to be used by more than one core

but then again, i might be wrong cos its been really long i dont use mangos or any of its variants, but giving heads up to problems that might happen

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use