I have just discovered that tables designated for publication cannot be
dropped.
I use snapshot replication for large amounts of data but infrequently.
Often need to refresh the entire table with new values. I do this by
dropping a table and writing a whole new one.
Is there a way to disable this property do that tables can be dropped and
recreated?
Or is there perhaps some other way?
Any hints will be appreciated.
Ernesto,
you could use Truncate Table' instead. This'll remove the rows and leave the
table intact (also resetting the identity column if you have one).You'll
have to drop any FK references before running this against a table, but
presumably you're doing that anyway.
HTH,
Paul Ibison
|||Thanks, that may be what I need.
However, two more questions:
1. What is an FK reference?
It sounds like Truncate will leave the structure intact.
Alas, the routine changes sometimes mean that a new column is added or
dropped from the table.
2. Do you have any suggestions if the structure of the table actually
changes?
Much appreciate your help.
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:#agkcbLgEHA.1656@.TK2MSFTNGP09.phx.gbl...
> Ernesto,
> you could use Truncate Table' instead. This'll remove the rows and leave
the
> table intact (also resetting the identity column if you have one).You'll
> have to drop any FK references before running this against a table, but
> presumably you're doing that anyway.
> HTH,
> Paul Ibison
>
|||Ernesto,
FK references are foreign key references to a primary key on the table you
are truncating.
sp_repladdcolumn can be used to add another column to the table and
subsequently have it replicated (sp_repldropcolumn for the converse).
HTH,
Paul Ibison
Monday, February 13, 2012
beginner question
Labels:
amounts,
bedropped,
beginner,
database,
designated,
discovered,
microsoft,
mysql,
oracle,
publication,
replication,
server,
snapshot,
sql,
tables
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment