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 > constraint checking....

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-09-03, 14:07
huskers huskers is offline
Registered User
 
Join Date: May 2002
Posts: 15
constraint checking....

I came across the following questions for constarint checking....can anyone help me out...

1) When constraint checking is suspended or diabled, a table or table space is in which of the following states:
a)Paused b) Check Pending c) Intent locked d) Constranit Waiting

2) A table has a check constraint enforcement turned off, and additional data has been inserted. Which of the following will perform data validation to ensure column values are valid
a) Add trigger b) Collect Statistics c) Reorganize the table d) enable check constraint

My answers are: 1. b and 2. d

Am I right...can we turn off the check constraint?? If yes how can we do it.

Thanks
Reply With Quote
  #2 (permalink)  
Old 08-11-03, 13:42
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Re: constraint checking....

Yes you can.

To turn off checking :
SET INTEGRITY for MyTable OFF

To turn it on:
SET INTEGRITY for MyTable IMMEDIATE CHECKED FORCE GENERATED

There are several caveats to putting a table in the Check Pending state (CPS).
You cannot insert, update, delete, or select from a such a table.

Please read the notes in the SQL manual on SET INTEGRITY for all that can be done while a table is in the CPS.

You should also beware that by putting a table in CPS may cause other tables to go into a CPS also.

HTH

Andy

Quote:
Originally posted by huskers
I came across the following questions for constarint checking....can anyone help me out...

1) When constraint checking is suspended or diabled, a table or table space is in which of the following states:
a)Paused b) Check Pending c) Intent locked d) Constranit Waiting

2) A table has a check constraint enforcement turned off, and additional data has been inserted. Which of the following will perform data validation to ensure column values are valid
a) Add trigger b) Collect Statistics c) Reorganize the table d) enable check constraint

My answers are: 1. b and 2. d

Am I right...can we turn off the check constraint?? If yes how can we do it.

Thanks
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