CDR Serial question
Posted in 2011
Topics: High Availability & Replication
11.50.FC5 update anywhere for a table being used to generate invoice #'s. Table X has an integer column that is used to generate an invoice number. The integer value is first read, used to create the invoice # and then incremented by one. Since the application can be rapid fire at times a stale value is read in at times on one of the ER pairs due to latency . Understand this has to be update anywhere . We are considering using a serial value in generating the invoice # but the client does not want wide gaps in invoice #'s, i.e if the app does not run on one server for a day or so cdr serial does not advance on that machine. So the question is if there is a way to keep the cdr value in step with the other ER server which would then help solve this problem. Another solution would be to ensure any in-flight transactions for this table are fully applied before reading the table.. not quite sure that's possible however. Thanks...
To guarantee uniqueness across all servers, CDR_SERIAL onconfig parameter must be configured at all ER servers. Please check documentation for details on CDR_SERIAL onconfig parameter. http://publib.boulder.ibm.com/infocenter/idshelp/v117/index.jsp The other approach is to use sequence object to generate unique value. You can make sequences to work very similar to CDR_SERIAL --using "START WITH, INCREMENT BY" clause while creating sequence object-- to guarantee uniqueness across all ER servers. If you do not want to have gaps for invoice id then only solution I can think of is to create sequence object on one server, and access this sequence object remotely from all clients to generate invoice id. Problem with this approach is that you cannot generate invoice id if the server hosting sequence object isn't accessible. Thanks & Regards, Nagaraju From: "MARK JALKIEWICZ" <mark.jalkiewicz@verizon.net> To: ids@iiug.org Date: 05/27/2011 03:38 PM Subject: CDR Serial question [23857] 11.50.FC5 update anywhere for a table being used to generate invoice #'s. Table X has an integer column that is used to generate an invoice number. The integer value is first read, used to create the invoice # and then incremented by one. Since the application can be rapid fire at times a stale value is read in at times on one of the ER pairs due to latency . Understand this has to be update anywhere . We are considering using a serial value in generating the invoice # but the client does not want wide gaps in invoice #'s, i.e if the app does not run on one server for a day or so cdr serial does not advance on that machine. So the question is if there is a way to keep the cdr value in step with the other ER server which would then help solve this problem. Another solution would be to ensure any in-flight transactions for this table are fully applied before reading the table.. not quite sure that's possible however. Thanks... ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum.