ORA-02449 Oracle Drop Table Error ORA-02449 Oracle Thả Bảng Lỗi

Sometimes when dropping a table in Oracle database by executing DROP TABLE SQL statement, Oracle may return the error ORA-02449 as below: Đôi khi bỏ một bảng trong cơ sở dữ liệu Oracle bằng cách tự thực hiện kê thả TABLE SQL, Oracle tháng năm trở lại với lỗi ORA-02449 như sau:

ORA-02449: unique/primary keys in table referenced by foreign keys ORA-02449: độc đáo / chìa khóa chính trong bảng tham chiếu của nước ngoài phím

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 là các lỗi gây ra bởi những cố gắng để thả một bảng với duy nhất hoặc chính phím tham chiếu của nước ngoài trong một bàn phím, hoặc trong các từ ngữ, bảng, đó là tham chiếu như là một bảng phụ huynh của một ngoại khoá constraint trong một mối quan hệ cha mẹ-con mà thành lập giữa hai nước ngoài thông qua một bàn phím. 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 không cho phép để thả bảng tham chiếu của nước ngoài của các bàn phím mà không cần xác định số Cascade khó khăn trong việc lựa chọn thả TABLE kê, hoặc để thả các phụ huynh mà không có bảng đầu tiên xoá bỏ các nước chủ chốt.

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. Các giải pháp và workaround cho lỗi khi bạn muốn thả các bảng tham chiếu của trẻ em bàn, là sử dụng tùy chọn Cascade khó khăn trong việc thả TABLE kê. For example: Ví dụ:

DROP TABLE table_name CASCADE CONSTRAINTS; Drop TABLE table_name Cascade khó khăn;

The CASCADE CONSTRAINTS option in the DROP TABLE SQL statement will drop the FOREIGN KEY constraints of the child tables referenced. Các tùy chọn Cascade khó khăn trong việc thả TABLE SQL tuyên bố sẽ thả các NGOẠI KEY khó khăn của trẻ bảng tham chiếu.

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. Ngoài ra, bạn có thể tự tay thả nước ngoài, và bỏ chìa khóa then chốt trong các bảng khó khăn trước khi thực hiện các hoạt động thả TABLE trên bảng cha mẹ, thả phím nước ngoài khó khăn trong bảng khác. To check what constraints are referencing a table in Oracle, use the following command: Để kiểm tra những gì khó khăn được tham khảo một bảng trong Oracle, sử dụng các lệnh sau đây:

SELECT * FROM USER_CONSTRAINTS WHERE TABLE_NAME = “ table_name “; CHỌN * TỪ USER_CONSTRAINTS WHERE 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: Bỏ và xóa người sử dụng khó khăn trong Oracle sử dụng các lệnh sau trong SQL * Plus, toad SQL hoặc công cụ khác:

ALTER TABLE table_name DROP CONSTRAINT constraint_name ; Thay đổi TABLE table_name drop CONSTRAINT constraint_name;

IMPORTANT : The page is machine translated and provided "as is" without warranty. Lưu ý: Các trang web là máy tính dịch và cung cấp "như là" mà không có bảo hành. Machine translation may be difficult to understand. Máy dịch thuật có thể là khó hiểu. Please refer to Xin vui lòng tham khảo original English article Tiếng Anh bản gốc bài viết whenever possible. bất cứ khi nào có thể.


4 Responses to “ORA-02449 Oracle Drop Table Error” 4 hồi đáp tới "ORA-02449 Oracle Thả Bảng Lỗi"

  1. Michael Komisarenko Michael Komisarenko
    April 7th, 2009 18:56 7 tháng tư, 2009 18:56
    4 4

    If you need to recreate a table you do not have to drop constraints. Nếu bạn cần một bảng lí bạn không có khó khăn để thả. As an alternative you can disable constraints and then enable them back again. Như là một cách thay thế, bạn có thể vô hiệu hóa khó khăn và sau đó kích hoạt chúng lại một lần nữa.
    The correct select statement to see which foreign keys reference the primary key of the parent table is as follows: Những tuyên bố chọn chính xác để xem có tham khảo nước ngoài phím chính chủ chốt của các phụ huynh là bảng như sau:

    SELECT TABLE_NAME, CONSTRAINT_NAME CHỌN TABLE_NAME, CONSTRAINT_NAME
    FROM USER_CONSTRAINTS TỪ USER_CONSTRAINTS
    WHERE CONSTRAINT_TYPE = 'R' Tìm CONSTRAINT_TYPE = 'R'
    AND R_CONSTRAINT_NAME = parent_table_primary_key; VÀ R_CONSTRAINT_NAME = parent_table_primary_key;

    You can use EXECUTE IMMEDIATE to disable constraints without necessarily dropping them. Bạn có thể sử dụng thực hiện để vô hiệu hoá IMMEDIATE khó khăn mà không nhất thiết phải thả họ.

  2. sangam sangam
    July 24th, 2008 13:21 Tháng bảy 24, 2008 13:21
    3 3

    Great! To lớn! The information provided is very helpful. Các thông tin được cung cấp là rất hữu ích. It seems to be simple but really halps an lot. Nó có vẻ đơn giản nhưng thực sự halps một nhiều. Thanks again. Cảm ơn một lần nữa.

  3. f f
    July 3rd, 2008 06:30 Tháng bảy 3, 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 không seja honesto e indica o liên kết của onde pegou!!!

  4. vipin vipin
    February 8th, 2007 18:51 8 tháng hai, 2007 18:51
    1 1

    what if after dropping the table using the query blow you want again all those constraints. nếu những gì sau khi rơi bảng bằng cách sử dụng các truy vấn blow mà bạn muốn trở lại tất cả những khó khăn.

    DROP TABLE table_name CASCADE CONSTRAINTS; Drop TABLE table_name Cascade khó khăn;

    please tell the query if u knows. xin vui lòng cho biết yêu cầu tìm kiếm nếu u biết.

Leave a Reply Để lại một trả lời

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> Bạn có thể sử dụng các thẻ:<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. Đăng ký nhận xét tính năng đã bị vô hiệu hoá. To receive notification of latest comments posted, subscribe to Để nhận được thông báo về ý kiến mới nhất được đăng, đăng ký với My Digital Life Comments RSS feed Cuộc sống kỹ thuật số Bình luận của tôi nguồn cấp dữ liệu RSS or hoặc register to receive đăng ký để nhận được new comments in daily email digest. Các ý kiến mới trong thư điện tử tiêu hàng ngày.
Custom Search

New Articles Bài viết mới

Incoming Search Terms for the Article Tìm kiếm các điều khoản cho các Điều

ora-02449 ora-02449 - -- ORA-02449: unique/primary keys in table referenced by foreign keys ORA-02449: độc đáo / chìa khóa chính trong bảng tham chiếu của nước ngoài phím - -- ora 02449 ora 02449 - -- ora-02449 unique primary keys in table referenced by foreign keys ora-02449 chính phím duy nhất trong bảng tham chiếu của nước ngoài phím - -- ORACLE DROP TABLE FORCE ORACLE drop TABLE FORCE - -- oracle delete cascade oracle xoá cascade - -- oracle drop table oracle thả bảng - -- drop table oracle thả bảng oracle - -- cascade constraints in oracle cascade khó khăn trong oracle - -- ora-02449 drop table ora-thả 02.449 bảng - -- oracle force drop table oracle lực thả bảng - -- drop table cascade thả bảng cascade - -- drop table error thả các bảng báo lỗi - -- ORA-02449: unique/primary keys in table referenced by foreign keys ORA-02449: độc đáo / chìa khóa chính trong bảng tham chiếu của nước ngoài phím - -- drop table with cascade option thả bảng với tùy chọn cascade - -- force drop table oracle lực lượng vũ trang thả bảng oracle - -- oracle drop table ora-02449 oracle thả bảng ora-02449 - -- Oracle drop table constraints Oracle thả bàn khó khăn - -- oracle drop table with foreign key oracle thả bàn phím với nước ngoài - -- drop table ORA-02449 thả bảng ORA-02449 - -- drop table cascade constraints cascade thả bàn khó khăn - -- oracle drop tables oracle thả bàn - -- ORA-02449: ORA-02449: - -- oracle ORA-02449 oracle ORA-02449 - -- SQL Error: ORA-02449: unique/primary keys in table referenced by foreign keys SQL Error: ORA-02449: độc đáo / chìa khóa chính trong bảng tham chiếu của nước ngoài phím - -- oracle drop constraint oracle thả constraint - -- oracle drop table cascade oracle thả bảng cascade - -- DROP TABLE FORCE oracle Drop TABLE FORCE oracle - -- drop table cascade constraints oracle thả bàn khó khăn cascade oracle - -- oracle delete foreign key oracle xoá chính nước ngoài - -- "michael komisarenko" "michael komisarenko" - -- CASCADE DROP ORACLE Cascade thả ORACLE - -- 02449 02449 - -- cascade constraint oracle cascade constraint oracle - -- ora:02449 ora: 02449 - -- oracle drop table syntax oracle thả bảng cú pháp - -- toad drop table toad thả bảng - -- drop table with foreign keys oracle thả bàn phím với nước ngoài oracle - -- delete from table cascade oracle xoá khỏi bảng cascade oracle - -- DROP CASCADE oracle Thả Cascade oracle - -- drop table table_name cascade constraints thả bảng table_name cascade khó khăn - -- oracle DROP TABLE options oracle drop TABLE tùy chọn - -- oracle command force constraint oracle lệnh lực lượng constraint - -- all tất cả - -- oracle drop constraints oracle thả khó khăn - -- "ORA-02449: unique/primary keys in table referenced by foreign keys" "ORA-02449: độc đáo / chìa khóa chính trong bảng tham chiếu của nước ngoài phím" - -- Drop Table FORCE Thả Bảng FORCE - -- oracle add constraint table or view oracle constraint thêm bảng hoặc xem - -- oracle disable constraints when deleting tables oracle vô hiệu hóa khó khăn khi xóa các bảng - -- drop table ORA-02449: unique/primary keys in table referenced by foreign keys thả bảng ORA-02449: độc đáo / chìa khóa chính trong bảng tham chiếu của nước ngoài phím - --