Results 1 to 2 of 2
  1. #1
    Join Date
    May 2002
    Posts
    15

    Unanswered: 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

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5

    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

    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

Posting Permissions

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