Identity range problem...
From: Catalin NASTAC (cnastac_at_topinet.com)
Date: 06/23/04
- Next message: Jay: "Re: Replication and Log Size problems"
- Previous message: Paul Ibison: "Re: Performance of replication vs straight dts?"
- Messages sorted by: [ date ] [ thread ]
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.
- Next message: Jay: "Re: Replication and Log Size problems"
- Previous message: Paul Ibison: "Re: Performance of replication vs straight dts?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|