-
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
-
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!
-
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.
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|