CDR_SERIAL Question
Posted in 2008
Topics: High Availability & Replication, Platform-Specific Issues
Platform: IDS 10 FC5 on Solaris 10 Server 'A' replicating with Server 'B' in ER "update anywhwere" configuration. Server A CDR_SERIAL = 2,1 Server B CDR_SERIAL = 3,2 Server A is used as the primary database server and server B is a failover site. The problem is that server A should have had CDR_SERIAL set to 3,1 instead of 2,1 and consequently it has stomped on the serial values that server B will attempt to generate if and when it is used as the primary server in a failover situation. The way I see it I have 2 not-so-attractive options after reinitializing replication on server A with CDR_SERIAL = 3,1: 1. recopy the databases from server A to server B OR 2. identify all tables using a serial key and modify those fields on server B to SERIAL(max existing value + 1) so that the next serial value is beyond what was already generated on server A. I assume that I would have to stop replication to perform the alter statements. It seems like there ought to be a simpler way to bump up the next serial value on server B, any ideas are greatly appreciated! Thanks, Ben
Ben wrote: > Platform: IDS 10 FC5 on Solaris 10 > > Server 'A' replicating with Server 'B' in ER "update anywhwere" > configuration. > > Server A CDR_SERIAL = 2,1 > Server B CDR_SERIAL = 3,2 > > Server A is used as the primary database server and server B is a > failover site. > > The problem is that server A should have had CDR_SERIAL set to 3,1 > instead of 2,1 and consequently it has stomped on the serial values that > server B will attempt to generate if and when it is used as the primary > server in a failover situation. Not a problem. You can simply set server B to 2,0. That would cause it to generate 2,4,6,8, etc. Server A is currently generating 1,3,5,7, etc. Also, if you wanted to, you could also set both of them to somthing like Server A CDR_SERIAL 10,0 Server B CDR_SERIAL 10,1 And then reset them by doing a dummy insert/delete and thus pushing the next serial value past the current max value. Neither of these would require that you stop replication. You don't have to alter the table to reset the value of the serial column, you simply insert a row containing the actual value at which you want to reset the column to. > > The way I see it I have 2 not-so-attractive options after reinitializing > replication on server A with CDR_SERIAL = 3,1: > > 1. recopy the databases from server A to server B > OR > 2. identify all tables using a serial key and modify those fields on > server B to SERIAL(max existing value + 1) so that the next serial value > is beyond what was already generated on server A. I assume that I would > have to stop replication to perform the alter statements. > > It seems like there ought to be a simpler way to bump up the next serial > value on server B, any ideas are greatly appreciated! > > Thanks, > Ben