|
![]() |
|
| Author |
|
|||||||
|
möoby
Posts: 2670
Location: UK
|
ive set up replication from main db to a backup, but apparently the second database cant have identity coloumns. im sure thre must be something ive done wrong.
anyone here done it? |
|||||||
| #0 05:57pm 28/04/05 |
|
|||||||
|
system
|
--
|
|||||||
| #0 |
|
|||||||
|
CaPt0
Posts: 5749
Location: Brisbane, Queensland
|
the replication should be identical?
Ie just tell it to replicate to the second server and should it "cluster" it for you??? Have you need if there is an ms knowlege base article discussing know issues? |
|||||||
| #1 06:23pm 28/04/05 |
|
|||||||
|
CaPt0
Posts: 5750
Location: Brisbane, Queensland
|
I assume you are refering to SQL2000?
Also under which OS? 2k3? |
|||||||
| #2 06:24pm 28/04/05 |
|
|||||||
|
CaPt0
Posts: 5751
Location: Brisbane, Queensland
|
ignore my first post, what mode are you trying to replicate using?
which is your disributer subscriber etc? |
|||||||
| #3 06:30pm 28/04/05 |
|
|||||||
|
Mantra
Posts: 1232
Location: Brisbane, Queensland
|
You cab have identity columns, but they need to be in "chunks". One end of the replication gets to use 0 to 100000 and the other side uses 100000 +. If whatever software is making use of the DB isn't directly using the identity columns, then you can can convert them to GUIDs. It depends on how your app is reading and writing to the DB, but if you're using ADO parametised commands, then you can just convert any references to "ID" columns to a data type of UniqueIdentifier (or whatever it's called), or a string.
er... If that's what you're asking. |
|||||||
| #4 06:57pm 28/04/05 |
|
|||||||
|
möoby
Posts: 2671
Location: UK
|
sql 2000 on 2003. yeah mantra, i just found an article about "chunks"
|
|||||||
| #5 11:49pm 28/04/05 |
|
|||||||
|
Opec
Posts: 3018
Location: Brisbane, Queensland
|
Identity columns are not ideal for replications especially if you're using it as your primary key and foreign key (for obvious reason). You can however, enabled IDENTITY INSERT though so your slave DB will replicate the exact order of your identity column. Good news is, there is a way around it (invoved Identity insert and a few other tricks):
Replicating Identity columns in SQL Server - Customizing replication last edited by Opec at 02:01:19 29/Apr/05 |
|||||||
| #6 02:01am 29/04/05 |
|
|||||||
|
natslovR
Posts: 4320
Location: Sydney, New South Wales
|
i find very few scenarios in which replication makes a good backup solution. generally you are much better off using logshipping.
outline your scenario a bit more clearly and i'll see if i can help. feel free to contact me on email if you want. |
|||||||
| #7 09:21am 29/04/05 |
|
|||||||
|
system
|
--
|
|||||||
| #7 |
|
|||||||
|
| ||||||||