If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > we face problem in db2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-25-05, 00:21
shamsherkhan shamsherkhan is offline
Registered User
 
Join Date: Feb 2005
Posts: 1
Red face 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
Reply With Quote
  #2 (permalink)  
Old 02-25-05, 01:07
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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).
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390

Last edited by Marcus_A; 02-25-05 at 01:09.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On