Identity range problem...

From: Catalin NASTAC (cnastac_at_topinet.com)
Date: 06/23/04


Date: Wed, 23 Jun 2004 10:36:01 -0400

Hello guys,
I posted one week ago a problem that I have. After 5 days: no answer. But
yesterday it dissapeared from the forum ! Is it possible that someone
"clean" the unanswered questions?
I will re-post my problem:
I have a publisher Pub and a subscriber Sub (actually there are many, but I
will simplify the problem).
We have an application that use an archive / cache concept: during the
creation of an invoice, the transactions are store in a table Cache. When
the invoice is finished, the transactions are moved to Archive table (which
has the same structure as Cache). Each transaction has an unique ID int.
Because the transaction is created in Cache and that ID is used in other
tables (as an referenced key), the Cache table has ID int IDENTITY NOT FOR
REPLICATION. The Archive has no IDENTITY column. When we edit (to view or
modify) an invoice, we copy the transactions from Archive to Cache using SET
IDENTITY INSERT ON.
Because of replication, the article Cache was published using the identity
range split. For example the publisher will take the range from 1 to 1000
and the subcriber from 1001 to 2000. We have the scenario:
1. Pub creates a transaction. This create ID = 1 in Cache.
2. Pub post the transaction. ID = 1 goes in Archive and is deleted from
Cache.
3. Sub creates a transaction. This create ID = 1001 in Cache.
4. Sub post the transaction. ID = 1001 goes in Archive and is deleted from
Cache.
5. Synchronize
6. Both Pub and Sub have in Archive 1 & 1001.
Until now everithing is ok, but now:
7. Pub want to see the transaction made to Sub. It will choose to see the
transaction ID 1001. We have to copy it (on Pub) from Archive to Cache,
using SET IDENTITY INSERT ON, of course. But the seed of Cache (on Pub) will
be re-seed automatically on 1001 and all the range from 2 to 1000 is loose!
And if Pub try to create a new transaction it sais that we have to
synchronize again to get a new range of ID ! I know that NOT FOR REPLICATION
do not re-seed the autoident when inserting values greater that the current,
but how can I do that when I am out of replication?
Thanks a lot in advance.



Relevant Pages

  • [PATCH 02/16] DRBD: lru_cache
    ... The lru_cache is a fixed size cache of equal sized objects. ... bitmap, or other meta data. ... For each transaction recording a change to the active set, ... the lru cache to operate on ...
    (Linux-Kernel)
  • Re: Hibernate over-verbose logging
    ... INFO: configuring from resource: /hibernate.cfg.xml ... Using default transaction strategy ... No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended) ...
    (comp.lang.java.programmer)
  • Re: [PATCH] Fix bad data from non-direct-io read after direct-io write
    ... commits the transaction. ... ->releasepage if jbd is committing the transaction. ... page cache while dio holds a page reference. ...
    (Linux-Kernel)
  • Re: Memory Sizing Advice
    ... The working set of indexes simply don't fit in cache all that well. ... that you're acting as though cache memory isn't an analagous ... Oracle restricts block cleanout for a transaction of any size to 10% ...
    (comp.databases.oracle.server)
  • Re: Write cache on domain controller
    ... AD replication to where? ... Is AD replication or FRS required if there is only one server on the ... Write cache is disabled by default on any DC. ... Also, yes, the FRS is a necessary service, whether anything is getting ...
    (microsoft.public.windows.server.setup)