all groups > sql server replication > june 2007 >
You're in the

sql server replication

group:

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


Can't copy/export a database with identity *NEWBIE* Jeffrey Brandt
6/23/2007 12:00:00 AM
sql server replication:
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?

Re: Can't copy/export a database with identity *NEWBIE* Paul Ibison
6/23/2007 12:00:00 AM
You can use queued updating subscribers or merge replication both with
automatic identity range management.
HTH,
Paul Ibison

Re: Can't copy/export a database with identity *NEWBIE* Hilary Cotter
6/25/2007 7:33:15 AM
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
[quoted text, click to view]

Re: Can't copy/export a database with identity *NEWBIE* Jeffrey Brandt
6/27/2007 2:44:49 AM
You were SOO right.

I ended up using snapshot replication, and pushed it to the other machine.

[quoted text, click to view]

AddThis Social Bookmark Button