Home » RDBMS Server » Server Administration » Alter tablespace (oracle dbase 10g, xp)
Alter tablespace [message #402734] Tue, 12 May 2009 04:29 Go to next message
OraVision
Messages: 17
Registered: March 2008
Junior Member
Hi all,
primarily my table "KT_TB_WORKFORCE" was under Tablespace "FLOW_1". I moved this table to tablespace "APEX"
using command below:
alter table KT_TB_WORKFORCE move tablespace apex;

Problem:
If i check out the property of the table i observed Table moved in Tablespace "APEX" but the constraint "KT_TB_WORKFORCE_PK " still using tablespace "FLOW_1". how to reslove it pls
create table KT_TB_WORKFORCE
(
  ROWN   NUMBER(38) not null,
  SLNO   NUMBER(38),
  ID     NUMBER(38),
  NAME   VARCHAR2(100),
  GENDER CHAR(1),
  TYPEW  CHAR(2),
  GARDEN NUMBER(20)
)
tablespace APEX
  pctfree 10
  initrans 1
  maxtrans 255
  storage
  (
    initial 64K
    minextents 1
    maxextents unlimited
  );
-- Create/Recreate primary, unique and foreign key constraints 
alter table KT_TB_WORKFORCE
  add constraint KT_TB_WORKFORCE_PK primary key (ROWN)
  using index 
  tablespace FLOW_1
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 64K
    minextents 1
    maxextents unlimited
  );
alter table KT_TB_WORKFORCE
  add constraint KT_TB_WORKFORCE_FK foreign key (GARDEN)
  references KT_TB_GARDEN (GRDNCODE);

[Updated on: Tue, 12 May 2009 05:43] by Moderator

Report message to a moderator

Re: Alter tablespace [message #402753 is a reply to message #402734] Tue, 12 May 2009 05:44 Go to previous messageGo to next message
Michel Cadot
Messages: 64109
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
alter index ... rebuild tablespace ...

Regards
Michel
Re: Alter tablespace [message #402872 is a reply to message #402734] Tue, 12 May 2009 22:25 Go to previous messageGo to next message
OraVision
Messages: 17
Registered: March 2008
Junior Member
Hi Michel Cadot,


Thank you. It's working.

SQL> alter index kapnatea.KT_TB_WORKFORCE_PK REBUILD TABLESPACE APEX;
    
Re: Alter tablespace [message #402906 is a reply to message #402872] Wed, 13 May 2009 01:10 Go to previous message
Michel Cadot
Messages: 64109
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Thanks for the feedback.

Regards
Michel
Previous Topic: Restrict writing startup information into alert log
Next Topic: .dbf file modified date
Goto Forum:
  


Current Time: Mon Dec 05 09:11:23 CST 2016

Total time taken to generate the page: 0.11240 seconds