cancel
Showing results for 
Search instead for 
Did you mean: 

SERIAL in replication

Former Member
0 Kudos

Hello all, i am designing an schema to use later in replication with maxdb, can i use the serial autoincrement in a table if i am sure it is not updated on two different databases at the same time?

other question any suggestion to the primary key of the tables where i have to write in all databases? were i have not natural keys i thought use a numeric prefix for every site so i cant repeat the same, anything like 115+0000001 where "115" is the site code, 1 is the local site sequence number to the table and the 000000 will be appended by the application, i append this number of 0 (to fill 7 characters) because it is the maximum let me maintain integer datatype in the id column and gives me a really larger space to the sequence, but i suppose a better method exists and i dont know, any suggestions?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

do you want to use the Synchronization Manager to replicate your database?

If you want to use a serial auto increment you should do this only in one database.

e.g.: some kind of master database. The Synchronization Manager will replicate the values to the other client databases. To avoid some kind of disorder the client databases should not update or use an auto increment value.

Best regards

Wolfgang

Former Member
0 Kudos

yes i want to use the synchronization manager, ok i will only use serial in tables where i know i will only write in a database. Thanks.

Former Member
0 Kudos

Hello,

with Synchronization Manager you can handle bidirectional replication. The master and the client databases can update data. It seems you will use the unidirectional mode. The master database should be the database that receives the updates.

Best regards

Wolfgang

Former Member
0 Kudos

i want to do bidirectional replication, in many tables i will use the internal codification i have explained in the first post and to the tables that only will be updated in the master database i will use a default serial in the internal id.