CONSTRAINT WILL MOVE TO TABLESPACE
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: CONSTRAINT WILL MOVE TO TABLESPACE

  1. #1
    Join Date
    May 2002
    Posts
    232
    Hiii,I have table it is stored in tools tablespace but it's primary key constraint is stored in some other table space.
    So,Now i like move primary key constraint from users tables to tools space?
    how?
    ex--CONSTRAINT COMP_PKEY
    PRIMARY KEY ( CARDID, CATEGORYID )
    USING INDEX
    TABLESPACE USERS PCTFREE 10
    STORAGE ( INITIAL 65536 ))
    TABLESPACE TOOLS
    PCTFREE 10
    PCTUSED 40
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 65536
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    FREELISTS 1 FREELIST GROUPS 1 )
    NOCACHE;
    kavitha

  2. #2
    Join Date
    Jan 2002
    Location
    Up s**t creek
    Posts
    1,525
    If you just want to move the constraints associated index use ALTER INDEX xxx REBUILD ... with the new tablespace in the storage parameter

    Regards
    Jim
    Oracle Certified Professional
    "Build your reputation by helping other people build theirs."

    "Sarcasm may be the lowest form of wit but its still funny"

    Click HERE to vist my website!

  3. #3
    Join Date
    Jul 2002
    Posts
    2

    Smile

    Make sure nobody is modifiying data in the table.

    Drop the INDEX and the CONSTRAINT

    Re-create the constraint (like your example), specifying the correct tablespace, which will then create the index in the correct place.

    Remember that it is the index that is asociated with the primary key constraint that gets stored there. The constraint itself is just a rule that Oracle needs to enforce, and is stored in the data dictionary.

  4. #4
    Join Date
    Feb 2000
    Location
    Singapore
    Posts
    1,758
    Hiii,I have table it is stored in tools tablespace but it's primary key constraint is stored in some other table space.
    So,Now i like move primary key constraint from users tables to tools space?
    how?
    I am assuming that when you said "stored constraint" you meant Index associated with constraint.

    It is a good practice to keep your Tables and Indexes in different tablespaces. Do you have any specific reason to move them into one tablespace.

    Sanjay


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