Enable and Disable constarint
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Enable and Disable constarint

  1. #1
    Join Date
    Aug 2001
    Posts
    56

    Enable and Disable constarint

    hi
    tell if i do enable and dissable the constraint , it will create the index on new records or not.
    Or i have to give the alter index rebuild claues for the rebuilding the index.Please tell me the command also
    thanks in advance
    anuj
    Anuj
    India

  2. #2
    Join Date
    Jan 2002
    Location
    India
    Posts
    105
    dear

    No problems Go on Enabling and disableing constraints. Oracle server will manage the indexes associated with primary key/unique constraints.

    whenever u disable constraint Oracle will drop the Index and when u enable again it will create index.

    viraj
    ----------
    9i OCA
    A Wise Man Knows How much he doesn't know !!!

  3. #3
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    If you have a need to disable and enable PK or unique constraints, create the supporting index before you create the constraint, and DO NOT make the index unique. It will then be used to help enforce the constraint, but will not be dropped/rebuilit when you disable/enable the constraint.

    Also consider whether a DEFERRABLE constraint would be a better option for your situation
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

Posting Permissions

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



Click Here to Expand Forum to Full Width