Saturday, February 25, 2012

Can't copy/export a database with identity *NEWBIE*

I have a database where some tables have the IDENTITY = YES.
If I copy or export from ServerA to ServerB, the IDENTITY gets set to No.
This has to be a simple problem.
How is it fixed?
If you are simply doing an export/import you need to create the table with
the desired format on the subscriber/destination/target side - i.e. with the
identity property on the column. Then before you do your import set
identity_insert on for that table, i.e.
SET IDENTITY_INSERT MyTableName ONIf you are using bcp use the -E parameter.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Jeffrey Brandt" <jdbrandt@.verizon.net> wrote in message
news:lO7fi.268$XH5.206@.trndny02...
>I have a database where some tables have the IDENTITY = YES.
> If I copy or export from ServerA to ServerB, the IDENTITY gets set to No.
> This has to be a simple problem.
> How is it fixed?
>
|||You were SOO right.
I ended up using snapshot replication, and pushed it to the other machine.
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:OBM0x%23YtHHA.1728@.TK2MSFTNGP06.phx.gbl...
> You can use queued updating subscribers or merge replication both with
> automatic identity range management.
> HTH,
> Paul Ibison
>

No comments:

Post a Comment