dbTalk Databases Forums  

Q: recreate table with index on another tablespace

comp.databases.oracle comp.databases.oracle


Discuss Q: recreate table with index on another tablespace in the comp.databases.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Andy
 
Posts: n/a

Default Q: recreate table with index on another tablespace - 06-22-2004 , 01:11 PM






a new user of oracle 10g.

tried the following statements on scott/tiger with tablespace x

create table mytest (
a varchar2(30)
);

alter table mytest
add constraint pk_a primary key(a);

alter table mytest
enable primary key using index
tablespace users_indx
pctfree 0;

drop table mytest cascade constraints;

sqlplus tells that the second alter statement has problem:
ora-00955: name is already used by an existing object.

May you explain me what is wrong with the statement and how to fix it
so that I can run the statements mupliple times? (if I drop the
tablespace clause in alter table it runs perfectly.)

Thanks very much.

Reply With Quote
  #2  
Old   
zhu chao
 
Posts: n/a

Default Re: Q: recreate table with index on another tablespace - 07-02-2004 , 03:49 AM






you can use:
alter index pk_a rebuild tablespace user_indx;
usmle96 (AT) yahoo (DOT) com (Andy) wrote in message news:<bacee0b8.0406221011.1c834df (AT) posting (DOT) google.com>...
Quote:
a new user of oracle 10g.

tried the following statements on scott/tiger with tablespace x

create table mytest (
a varchar2(30)
);

alter table mytest
add constraint pk_a primary key(a);

alter table mytest
enable primary key using index
tablespace users_indx
pctfree 0;

drop table mytest cascade constraints;

sqlplus tells that the second alter statement has problem:
ora-00955: name is already used by an existing object.

May you explain me what is wrong with the statement and how to fix it
so that I can run the statements mupliple times? (if I drop the
tablespace clause in alter table it runs perfectly.)

Thanks very much.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.