June 25, 2007 at 2:54 pm
Believe me, Plenty. and with a very high transaction rate.
Now, how many have you replicated using IDENTITY columns ?
* Noel
June 25, 2007 at 3:03 pm
Seq. numbers dictate RBAR approach by definition.
Not high transaction rate really.
And simple "NOT FOR REPLICATION" resolves all problems with IDENTITY.
_____________
Code for TallyGenerator
June 25, 2007 at 3:15 pm
Your answer is an indication of the "Lack of knowledge" in these issues.
When you need to fail over to the replicated site you need to have there the *same* keys. There are *a lot* of kludges to deal with the propblem. Identity partitions, range handling, etc. ALL of them pose problems one way or another.
Sequence TABLES ( which are different from SEQUENCE Numbers) are there for a purpose.
* Noel
June 25, 2007 at 3:34 pm
Not gonna tell I'm an expert in replications.
I did replications for couple of databases (nobody requested more yet ) and IDENTITY was not a problem.
Probably I was not experiencing all possible features in that, but I did not have any problems with copying keys from IDENTITY columns.
Sequence TABLES are not there. Probably for a purpose.
It's you who create those tables.
_____________
Code for TallyGenerator
June 25, 2007 at 3:45 pm
Once again IDENTITY columns *are* problematic in replicated environment with failover scenarios and there are *a lot* of tricks, kludges and workarounds to deal with the problem. Sequence TABLES is nothing but one of those "tricks" and when I said that are there I meant in common DBA Knowledge which apparently ... is not that common
* Noel
June 25, 2007 at 3:53 pm
From my experience I can tell that Sequence TABLES is common VB developers knowledge, not DBA.
_____________
Code for TallyGenerator
June 25, 2007 at 4:56 pm
Noel,
but seriously, what's the problem with IDENTITY NOT FOR REPLICATION?
It worked for me without any complications.
Where is a pitfall?
_____________
Code for TallyGenerator
June 25, 2007 at 6:41 pm
None... we don't use replication for replication
Anyway, wasn't meant to be a challenge, Noel... was just curious.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 25, 2007 at 7:03 pm
If memory serves, the subscriber doesn't increment the seed when you do this, so in a failover, it would be out of synch.
June 25, 2007 at 8:35 pm
Subscriber does no have any seed.
IDENTITY is not replicated if it's NOT FOR REPLICATION.
Subscriber just gets whatever value appears in replicated database.
Including the cases when identity was bypassed (IDENTITY_INSERT ON).
_____________
Code for TallyGenerator
June 26, 2007 at 8:06 am
David was spot on. When you fail over the software that you use must be able to function exactly as it was when connected to the primary.
The "not for replication" conception Sergiy has, is not correct. IT *IS* replicated it is simply bypassed when the replication agent is inserting. Same thing for Trigger, Foreign Keys, etc.
Again, Sergiy you are showing your inexperience in this subject.
* Noel
June 26, 2007 at 8:13 am
Jeff, I am sorry if I missinterpreted your intentions.
There are many cases in which may things that seemed "normal" in non-replicated databases must be changed when replication is in place. This IDENTITY thing happens to be one of them.
I have had to deal with *a lot* of replicated databases latetly therefore most of these issues are very fresh on my mind and thus I thought I could provide some value to this thread
* Noel
June 26, 2007 at 9:00 am
Then you're wasting your time performing replication, as failover won't be pretty when the subscriber-turned-publisher doesn't have a seed.
My earlier suggestion for using blocks of identity values on different tables will also work here, with a slight twist (the twist being that it can technically be considered the same table, depending on how you look at it). You can place a seed on the subscriber that is far outside the range of potential values on the publisher. While failovers will cause the identity column values to be out of sequence, as long as you make the blocks sufficiently large they should retain uniqueness without overlap. So put a seed of 1 on the original publisher, a seed of 1 trillion on the original subscriber, and unless you exceed a trillion records, you won't have issues with inserts. You can even increase that seed if a trillion isn't enough.
June 26, 2007 at 2:56 pm
You probably mixing mirroring with replication.
Replica should not be populated from anywhere but original database.
If you use right thing in a wrong way it will fail, of course.
In my experience we have local mirror and 2 replicas on remote servers. REplicas are just for cutting traffic for remote clients queries, not for replacing failed source database.
If it's failed replicas is just populated from mirror instead.
_____________
Code for TallyGenerator
June 26, 2007 at 3:57 pm
Your "guess" is wrong again! We are *not* using mirroring. If our Primary site goes down we move our clients to the replicas! Simple as that. Meanwhile we use replicas for reporting.
Mirroring was not an option for us. We use multiple databases per app.
* Noel
Viewing 15 posts - 16 through 30 (of 48 total)
You must be logged in to reply to this topic. Login to reply