![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Hello there I have database with many relationsips At the start it is empty and when i'm trying to import to it data. some of the tables are failed due to key violations Is there a way to import the data in this cases? |
#2
| |||
| |||
|
|
Whell Andrew 3rd option is impossible, because i usually do this for upgrating vertion, so the schema is changed 1st option looks the most way. But can i script only the relationships or script droping of them? "Andrew J. Kelly" <sqlmvpnooospam (AT) shadhawk (DOT) com> wrote in message news:O4pknJJCGHA.1312 (AT) TK2MSFTNGP09 (DOT) phx.gbl... You basically have 3 options. 1. Drop the RI, Import the data and then recreate the RI. 2. Script the imports so that they follow Parent Child order. 3. Do a Restore of the full db over top of the Empty DB. I recommend the 3rd option if you want everything. -- Andrew J. Kelly SQL MVP "Roy Goldhammer" <roy (AT) hotmail (DOT) com> wrote in message news:evVFTJICGHA.2664 (AT) TK2MSFTNGP15 (DOT) phx.gbl... Hello there I have database with many relationsips At the start it is empty and when i'm trying to import to it data. some of the tables are failed due to key violations Is there a way to import the data in this cases? |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
You basically have 3 options. 1. Drop the RI, Import the data and then recreate the RI. 2. Script the imports so that they follow Parent Child order. 3. Do a Restore of the full db over top of the Empty DB. I recommend the 3rd option if you want everything. -- Andrew J. Kelly SQL MVP "Roy Goldhammer" <roy (AT) hotmail (DOT) com> wrote in message news:evVFTJICGHA.2664 (AT) TK2MSFTNGP15 (DOT) phx.gbl... Hello there I have database with many relationsips At the start it is empty and when i'm trying to import to it data. some of the tables are failed due to key violations Is there a way to import the data in this cases? |
![]() |
| Thread Tools | |
| Display Modes | |
| |