ORA-02449 Oracle Drop Table Error ORA-02449 Oracle Drop Table Klaida

Sometimes when dropping a table in Oracle database by executing DROP TABLE SQL statement, Oracle may return the error ORA-02449 as below: Kartais lašinamojo lentelėje Oracle vykdydama DROP TABLE SQL, Oracle, gali grąžinti klaida ORA-02449, kaip nurodyta toliau:

ORA-02449: unique/primary keys in table referenced by foreign keys ORA-02449: unikalus / pirminių raktų lentelėje nurodyti pagal išorinius raktus

The Oracle error is caused by the attempt to drop a table with unique or primary keys referenced by foreign keys in another table, or in other word, the table that is referenced as a parent table by a foreign key constraint in a parent-child relationship that established between two tables through a foreign key. Oracle klaidos sukelia bandymas išskleidžiamajame lentelė su unikaliu arba pirminės raktus, nurodyti pagal išorinius raktus kitoje lentelėje, arba, kitaip tariant, lentelės, kuri yra paminėta kaip patronuojanti stalo užsienio pagrindinius apribojimus, tėvų ir vaikų santykiai kad tarp dviejų lentelių per užsienio klavišą. Oracle does not allow to drop tables referenced by foreign keys of other tables without specifying the CASCADE CONSTRAINTS option in the DROP TABLE statement, or to drop the parent table without first removing the foreign key. Oracle neleidžia išskleidžiamajame lenteles, nurodyti pagal išorinius raktus kitų lenteles nenurodant Kaskados APRIBOJIMUS variantą, DROP TABLE pareiškimas, ar palikti tėvų stalo, išimdami užsienio klavišą.

The solution and workaround for the error when you want to drop tables referenced by child tables, is to use the CASCADE CONSTRAINTS option in the DROP TABLE statement. Tirpalo ir apeiti šią klaidą, kai norite sumažinti lentelėse nurodyti vaikų stalai, yra naudoti Kaskados APRIBOJIMUS variantą, DROP TABLE pareiškimą. For example: Pavyzdžiui:

DROP TABLE table_name CASCADE CONSTRAINTS; DROP TABLE table_name Kaskados APRIBOJIMUS;

The CASCADE CONSTRAINTS option in the DROP TABLE SQL statement will drop the FOREIGN KEY constraints of the child tables referenced. Kaskados APRIBOJIMUS variantą, DROP TABLE SQL bus upuść UŽSIENIO Raktiniai apribojimus vaikas lentelių apibrėžimas.

Alternatively, you can manually drop and remove the foreign key key constraints in other tables before performing the DROP TABLE operations on the parent table, drop the foreign key constraints in other tables. Taip pat galite rankiniu būdu sumažinti ir pašalinti užsienio raktas raktas suvaržymus kitose lentelėse prieš atlikdami DROP TABLE operacijas patronuojančios stalo, išskleidžiamajame užsienio pagrindinius suvaržymus kitose lentelėse. To check what constraints are referencing a table in Oracle, use the following command: Norėdami patikrinti, kokie apribojimai yra nurodyti, lentelėje "Oracle", naudokite šią komandą:

SELECT * FROM USER_CONSTRAINTS WHERE TABLE_NAME = “ table_name “; SELECT * FROM USER_CONSTRAINTS KUR TABLE_NAME = "table_name";

To drop and delete the user constraints in Oracle use the following command in SQL*Plus, Toad or other SQL tools: Siekiant sumažinti ir pašalinti vartotoją apribojimų Oracle naudokite šią komandą, SQL * Plus, rupūžė ar kitų SQL įrankiai:

ALTER TABLE table_name DROP CONSTRAINT constraint_name ; ALTER TABLE table_name DROP constraint constraint_name;

IMPORTANT : The page is machine translated and provided "as is" without warranty. DĖMESIO: Šis puslapis yra mašina išvertė ir pateikiama "kaip yra" be garantijų. Machine translation may be difficult to understand. Mašininio vertimo, gali būti sunku suprasti. Please refer to Remkitės original English article originalas anglų straipsnis whenever possible. jei įmanoma.


4 Responses to “ORA-02449 Oracle Drop Table Error” 4 Responses to "ORA-02449 Oracle Drop Table Klaida"

  1. Michael Komisarenko Michael Komisarenko
    April 7th, 2009 18:56 Balandis 7, 2009 18:56
    4 4

    If you need to recreate a table you do not have to drop constraints. Jei norite atkurti lentelėje jūs neturite kritimas apribojimų. As an alternative you can disable constraints and then enable them back again. Kaip alternatyvą galite išjungti apribojimus ir leisti juos atgal.
    The correct select statement to see which foreign keys reference the primary key of the parent table is as follows: Teisingai pasirinkti pareiškimas, kad pamatytumėte, kurie išorinius raktus nuoroda pagrindinis raktas į patronuojančios lentelę taip:

    SELECT TABLE_NAME, CONSTRAINT_NAME PASIRINKITE TABLE_NAME, CONSTRAINT_NAME
    FROM USER_CONSTRAINTS IŠ USER_CONSTRAINTS
    WHERE CONSTRAINT_TYPE = 'R' KUR CONSTRAINT_TYPE = "R"
    AND R_CONSTRAINT_NAME = parent_table_primary_key; IR R_CONSTRAINT_NAME = parent_table_primary_key;

    You can use EXECUTE IMMEDIATE to disable constraints without necessarily dropping them. Galite naudoti EXECUTE VIDINIŲ išjungti apribojimai nebūtinai lašinamojo jiems.

  2. sangam sangam
    July 24th, 2008 13:21 24 liepa 2008 13:21
    3 3

    Great! Puikus! The information provided is very helpful. Pateikta informacija yra labai naudinga. It seems to be simple but really halps an lot. Jis yra paprastas, bet tikrai halps yra daug. Thanks again. Thanks again.

  3. f f
    July 3rd, 2008 06:30 3 liepa 2008 06:30
    2 2

    Constrangimentos? Constrangimentos? Orra, meu revisa essa tradução aí e testa antes de postar!!! Orra, meu revisa essa tradução aí e testa antes de postar! Se não seja honesto e indica o link de onde pegou!!! Se não seja honesto e indica o nuorodą de onde pegou!

  4. vipin vipin
    February 8th, 2007 18:51 8 Vas 2007 18:51
    1 1

    what if after dropping the table using the query blow you want again all those constraints. ką daryti, jei po lašinamojo lentelėje naudojant užklausą smūgis norite vėl visi tie apribojimai.

    DROP TABLE table_name CASCADE CONSTRAINTS; DROP TABLE table_name Kaskados APRIBOJIMUS;

    please tell the query if u knows. pasakykite užklausą jei ir žino.

Leave a Reply Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> Galite naudoti šias žymeles: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. Subscribe to comments funkcija buvo išjungta. To receive notification of latest comments posted, subscribe to Norėdami gauti pranešimus apie naujausius komentarų, užsiprenumeruoti My Digital Life Comments RSS feed Mano skaitmeninis gyvenimas Komentarų RSS or arba register to receive registruotis, norint gauti new comments in daily email digest. Nauji komentarai kasdien elektroniniu paštu.
Custom Search

New Articles Nauji straipsniai

Incoming Search Terms for the Article Pradedantys Paieška Sąlygos straipsnį

ORA-02449: unique/primary keys in table referenced by foreign keys ORA-02449: unikalus / pirminių raktų lentelėje nurodyti pagal išorinius raktus - -- ora-02449 Ora-02449 - -- ORACLE DROP TABLE FORCE ORACLE DROP TABLE JĖGOS - -- oracle drop table orakulas išskleidžiamajame lentelė - -- ORA-02449: unique/primary keys in table referenced by foreign keys ORA-02449: unikalus / pirminių raktų lentelėje nurodyti pagal išorinius raktus - -- drop table error išskleidžiamajame stalo klaida - -- drop table cascade constraints išskleidžiamajame stalo kaskados apribojimų - -- oracle drop tables orakulas išskleidžiamajame stalai - -- ora 02449 Ora 02449 - -- cascade constraints in oracle Žingsnių apribojimų orakulas - -- oracle drop table syntax orakulas išskleidžiamajame lentelės sintaksė - -- ora-02449 unique primary keys in table referenced by foreign keys Ora-02449 unikalūs pirminių raktų lentelėje nurodyti pagal išorinius raktus - -- drop table with foreign keys oracle išskleidžiamajame lentelės su užsienio raktus orakulas - -- drop table oracle force išskleidžiamajame stalo orakulas jėga - -- oracle delete statements orakulas ištrinti pareiškimai - -- oracle+drop cascade orakulas + lašus kaskados - -- oracle force delete foreign key orakulas jėga ištrinti raktas užsienio - -- why do we use drop table tablename cascade constraints Kodėl mes naudojame išskleidžiamajame lentelės tablename kaskados apribojimų - -- before dropping primary keys the foreign keys should de be dropped or dsiabled in oracle prieš lašinamojo pirminių raktų išorinius raktus turėtų de būti atsisakyta arba dsiabled į orakulas - -- drop table oracle when referenced by foreign key išskleidžiamajame stalo orakulas kai pamatinis užsienio raktas - -- CASCADE DROP ORACLE Kaskados DROP ORACLE - -- drop table oracle išskleidžiamajame stalo orakulas - -- oracle delete cascade orakulas ištrinti kaskados - -- ORA-02449 to drop tablespace ORA-02449 kritimas tablespace - -- 02449 02449 - -- cascade constraint oracle kaskados apribojimas orakulas - -- cascade oracle delete kaskados orakulas ištrinti - -- drop table cascade išskleidžiamajame stalo kaskados - -- DROP TABLE FOREIGN KEYS CASCADE CONSTRAINTS DROP TABLE UŽSIENIO KEYS Kaskados APRIBOJIMUS - -- FORCE DROP ORACLE JĖGOS DROP ORACLE - -- oracle drop table error orakulas išskleidžiamajame stalo klaida - -- possible errors "drop table" galimų klaidų "drop table" - -- USER_CONSTRAINTS oracle delete USER_CONSTRAINTS orakulas ištrinti - -- drop table delete cascade oracle išskleidžiamajame stalo ištrinti kaskados orakulas - -- drop table error in oracle išskleidžiamajame stalo klaida orakulas - -- ex* drop table tablename cascade constraint; ex * išskleidžiamajame lentelės tablename kaskados apribojimą; - -- oracle disable constraints table orakulas išjungti apribojimus lentelė - -- oracle import ORA-02449: unique/primary keys in table referenced by foreign keys orakulas importo ORA-02449: unikalus / pirminių raktų lentelėje nurodyti pagal išorinius raktus - -- ORA-02449 + force drop ORA-02449 + jėga sumažėjo - -- oracle drop table statement primary key orakulas išskleidžiamajame stalo pareiškimą pagrindinis raktas - -- Oracle drop all table constraint Oracle išskleidžiamajame visas lentelės apribojimas - -- ORA-02449: ORA-02449: - -- ORA-02449 cascade ORA-02449 kaskados - -- does delete foreign key,ora code Ar ištrinti raktas užsienio, Ora kodas - -- drop table in oracle which has foreign key references išskleidžiamajame lentelės orakulas kuri raktas užsienio nuorodomis - -- drop table cascade; oracle išskleidžiamajame stalo kaskados; orakulas - -- drop table oracle išskleidžiamajame stalo orakulas - -- oracle ORA-02449 orakulas ORA-02449 - -- ora:02449 Ora: 02449 - -- SQL Error: ORA-02449: unique/primary keys in table referenced by foreign keys SQL klaida: ORA-02449: unikalus / pirminių raktų lentelėje nurodyti pagal išorinius raktus - --