Showing posts with label constraints. Show all posts
Showing posts with label constraints. Show all posts

Friday, March 23, 2012

reset next identity value

For a set of tables many of which contain FK constraints related to identity
cols in the foreign tables:
When deleting all data (dropping FK constraints first) and then repopulating
data from scripts , how to instruct SS to reset the next identity value to
the identity seed ?TRUNCATE TABLE, or check out DBCC CHECKIDENT (TableName, RESEED)
Roy
On Mon, 27 Feb 2006 17:14:18 -0800, "John A Grandy"
<johnagrandy-at-yahoo-dot-com> wrote:

>For a set of tables many of which contain FK constraints related to identit
y
>cols in the foreign tables:
>When deleting all data (dropping FK constraints first) and then repopulatin
g
>data from scripts , how to instruct SS to reset the next identity value to
>the identity seed ?

Wednesday, March 21, 2012

Reseeding Identity column on subscriber

Hi,
Is it possiible to re-seed the identity column on a subscriber which is
using merge replication.
I am getting PK constraints when inserting a row.
Thanks
have a look at
sp_MSadjustmergeidentity
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"mm" <postto@.news.com> wrote in message
news:uy7V4AFwEHA.3620@.TK2MSFTNGP09.phx.gbl...
> Hi,
> Is it possiible to re-seed the identity column on a subscriber which is
> using merge replication.
> I am getting PK constraints when inserting a row.
> Thanks
>