Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2005
    Posts
    1

    Red face Unanswered: we face problem in db2

    hello!

    we are facing some problem in db2 , plz help me. The reason is that, we have parent table and its child tables, which that consist of 7 child table. The problem is that when we drop the parent table from the database, so it has droped from the database, despite the exists child tables. what is the reason? and what am i missing any necessary command. plz help me as soon as possible. thanks.

    shamsher

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    RI is not intended to apply to DDL statements in DB2. It is only intended maintain referential integrity for DML (insert, update, delete SQL statements). DB2 assumes that only DBA's will drop tables, and that they know what they are doing.

    I believe that the child tables should be in check pending status if the parent table is dropped.

    There is a way to specify that a table cannot be dropped with the RESTRICT ON DROP option of the create or alter table. You can set this on or off with an alter table. This is not related to RI constraints.

    If you enable DROPPED TABLE RECOVERY on the create tablespace, you can in theory recover the table (if you have log retain set on).
    Last edited by Marcus_A; 02-25-05 at 02:09.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •