SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Copy data, including Identity column
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Eagle_f90
Constraint Violating Yak Guru

USA
424 Posts

Posted - 05/25/2013 :  14:33:50  Show Profile  Visit Eagle_f90's Homepage  Reply with Quote
I am trying to the data from my prod db to my dev db but it keeps failing when it trys to insert the identity column's data. I have been trying to use the SQL SErver Import and Export Wizard to copy the data. The failer error I get is "fauilure inserting into the read-only column". How can I go about importing all this data?

--
If I get used to envying others...
Those things about my self I pride will slowly fade away.
-Stellvia

russell
Pyro-ma-ni-yak

USA
5072 Posts

Posted - 05/25/2013 :  15:07:48  Show Profile  Visit russell's Homepage  Reply with Quote
There is a checkbox in the Import/Export Wizard that says "Allow Identity Insert."

Check it.
Go to Top of Page

Eagle_f90
Constraint Violating Yak Guru

USA
424 Posts

Posted - 05/25/2013 :  17:10:47  Show Profile  Visit Eagle_f90's Homepage  Reply with Quote
Took me a bit but i found that option under the edit mappings box. Never looked there since I was just doing a data move from one db to another with identical table setups.

Unfortunatly that is not working either, now it is failing with the error" The INSERT statment conflicted with the FOREIGN KEY constraint"

--
If I get used to envying others...
Those things about my self I pride will slowly fade away.
-Stellvia
Go to Top of Page

MuMu88
Aged Yak Warrior

547 Posts

Posted - 05/25/2013 :  20:22:24  Show Profile  Reply with Quote
Follow-up : http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=185592
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000