ORA-02449 Oracle Drop Table Error ORA-02449 Wyrocznia Spadać Stół Błąd
Sometimes when dropping a table in Oracle database by executing DROP TABLE SQL statement, Oracle may return the error ORA-02449 as below: Czasami, gdy wyrzuca w tabeli bazy danych Oracle wykonując DROP TABLE SQL, Oracle może zwrócić błąd ORA-02449, tak jak poniżej:
ORA-02449: unique/primary keys in table referenced by foreign keys ORA-02449: unikalny / kluczy podstawowych w tabeli, o której mowa zagranicznych klucze
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 błąd jest spowodowany próbą spadek tabeli z unikalnymi lub kluczy podstawowych do których odwołują się klucze zagranicznych w innym stole, lub innymi słowy, że tabela jest wymieniony jako rodzic tabeli przez klucz obcy ograniczeń w relacji rodzic-dziecko że między dwie tabele poprzez klucz obcy. 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 nie pozwalają na spadek tabele do których odwołują się klucze zagranicznych innych tabel bez określenia KASKADA OGRANICZEń opcję w DROP TABLE, lub odrzucić dominującej tabeli bez wyjmowania klucz obcy.
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. Rozwiązanie i obejście błędu jeśli chcesz spadek tabele referenced by dziecko tabel jest użycie opcji CASCADE OGRANICZEń w DROP TABLE oświadczenie. For example: Na przykład:
DROP TABLE table_name CASCADE CONSTRAINTS; DROP TABLE TABLE_NAME KASKADA OGRANICZEń;
The CASCADE CONSTRAINTS option in the DROP TABLE SQL statement will drop the FOREIGN KEY constraints of the child tables referenced. W KASKADA OGRANICZEń opcję w DROP TABLE SQL spadnie do FOREIGN KEY ograniczenia dziecka tabele odwołuje.
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. Można ręcznie spadku i usunąć klucz obcy kluczowych ograniczeń w innych tabel przed wykonywania operacji na DROP TABLE dominującej tabeli, spadek zagranicznego kluczowych ograniczeń w innych tabelach. To check what constraints are referencing a table in Oracle, use the following command: Aby sprawdzić, jakie są ograniczenia określania tabeli w Oracle, należy użyć następującego polecenia:
SELECT * FROM USER_CONSTRAINTS WHERE TABLE_NAME = “ table_name “; SELECT * FROM USER_CONSTRAINTS GDZIE 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: Aby usunąć i spadku użytkownik ograniczeń Oracle użyć następującego polecenia w programie SQL * Plus, Toad SQL lub innych narzędzi:
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. UWAGA: Strona jest maszyna przetłumaczony i dostarczane "tak jak są" bez gwarancji. Machine translation may be difficult to understand. Tłumaczenie maszynowe może być trudne do zrozumienia. Please refer to Proszę odnieść się do original English article oryginalny angielski artykułu whenever possible. ilekroć jest to możliwe.
Related Articles Pokrewne artykuły
- ORA-00942 Table or View Does Not Exist Oracle Error ORA-00942: tabela lub widok nie istnieje Oracle Błąd
- Delete, Remove or Drop Oracle Stored Packages with Drop Package Usuń, Usuń lub Drop Oracle Przechowywane pakiety z pakietu Drop
- Easily Duplicate, Copy or Backup Tables in Oracle, PostgreSQL, DB2 and SQLite with Create Table As SQL Łatwo nie powielać, nie kopiować lub Backup Tabele w Wyrocznia, PostgreSQL, DB2 i SQLite z Utwórz W tabeli SQL
- Oracle ORA-14074 Create or Add New Partition Fails Error ORA-14074 Wyrocznia Utwórz Dodaj nową partycję lub Fails Błąd
- Create, Add or Split Oracle Database Partition Fails with ORA-14080 Error Tworzenie, Dodaj lub Split Oracle Database partycji Fails z ORA-14080 Błąd
- Oracle EXP-00091 Error When Export Database Wyrocznia EXP-00091 Błąd Podczas Wywóz Baza danych
- How to Remove and Drop Datafiles from Tablespace in Oracle Database Jak usunąć i Spadać Datafiles z Tablespace w Oracle Database
- How Drop Tablespace and Recover Oracle Database When Accidentally Delete Datafile Jak Spadać Tablespace i Odzyskać Wyrocznia Baza danych Podczas Przypadkowo Usuń datafile
- Create New Table by Selecting Data from Other Tables with CREATE TABLE AS Utwórz nową tabelę, wybierając Dane z Inny Tabele z CREATE TABLE AS
- Oracle Database Import Error 3113/3114 Oracle Database Import Błąd 3113/3114










































April 7th, 2009 18:56 7 kwietnia 2009 18:56
If you need to recreate a table you do not have to drop constraints. Jeśli musisz ponownie tabeli nie masz spadek ograniczeń. As an alternative you can disable constraints and then enable them back again. Jako alternatywę można wyłączyć ograniczenia, a następnie włączyć je ponownie.
The correct select statement to see which foreign keys reference the primary key of the parent table is as follows: Prawidłowe wybierz oświadczenia, aby sprawdzić, które klawisze zagranicznych odniesienia klucz podstawowy jednostki dominującej tabela przedstawia się następująco:
SELECT TABLE_NAME, CONSTRAINT_NAME SELECT TABLE_NAME, CONSTRAINT_NAME
FROM USER_CONSTRAINTS Z USER_CONSTRAINTS
WHERE CONSTRAINT_TYPE = 'R' GDZIE CONSTRAINT_TYPE = "R"
AND R_CONSTRAINT_NAME = parent_table_primary_key; I R_CONSTRAINT_NAME = parent_table_primary_key;
You can use EXECUTE IMMEDIATE to disable constraints without necessarily dropping them. Możesz użyć EXECUTE IMMEDIATE wyłączyć ograniczenia, bez konieczności opuszczania ich.
July 24th, 2008 13:21 24 lipca 2008 13:21
Great! Świetny! The information provided is very helpful. Przedstawione informacje są bardzo pomocne. It seems to be simple but really halps an lot. Wydaje się proste, ale naprawdę halps jedna partia. Thanks again. Jeszcze raz dziękujemy.
July 3rd, 2008 06:30 3 lipca 2008 06:30
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 zamieścić! Se não seja honesto e indica o link de onde pegou!!! Se não seja honesto e indica o związek de onde pegou!
February 8th, 2007 18:51 8 lut 2007 18:51
what if after dropping the table using the query blow you want again all those constraints. Co zrobić, jeśli po upuszczeniu tabeli za pomocą zapytań cios chcesz ponownie wszystkich tych ograniczeń.
DROP TABLE table_name CASCADE CONSTRAINTS; DROP TABLE TABLE_NAME KASKADA OGRANICZEń;
please tell the query if u knows. należy powiadomić zapytanie u wie.