ORA-14451 , creating index for a temporary table [message #235070] |
Fri, 04 May 2007 00:01  |
soujanya_srk
Messages: 111 Registered: November 2006 Location: HYDERABAD
|
Senior Member |
|
|
i have a temporary table like this
CREATE GLOBAL TEMPORARY TABLE TEMP(
ID NUMBER) ON COMMIT DELETE ROWS;
now i am creating a non unique index to it using script
DECLARE
i_tblsp VARCHAR2(30);
l_sqlstmt VARCHAR2(32767);
l_inxname varchar2(30);
l_cnt NUMBER;
BEGIN
--
SELECT tablespace_name
INTO i_tblsp
FROM user_indexes WHERE index_name like 'PK1';
----
begin
select index_name into l_inxname from user_indexes
where index_name like 'IX_TEMP';
exception
when no_data_found then
l_sqlstmt := 'CREATE INDEX IX_TEMP ON TEMP(ID) ';
l_sqlstmt := l_sqlstmt ||' TABLESPACE '||i_tblsp ;
dbms_output.put_line(l_sqlstmt);
EXECUTE IMMEDIATE l_sqlstmt;
end;
----
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE(SQLERRM);
END;
/
i am getting this error
ORA-14451 unsupported feature with temporary table
how to solve this?
|
|
|
Re: ORA-14451 , creating index for a temporary table [message #235072 is a reply to message #235070] |
Fri, 04 May 2007 00:07   |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
Don't specify a tablespace. As you can see, an index on a GTT has no tablespace:
SQL> drop table faq;
Table dropped.
SQL> create global temporary table faq
2 (id number) on commit delete rows;
Table created.
SQL> create index faq_i on faq(id);
Index created.
SQL> select tablespace_name from user_indexes where index_name = 'FAQ_I';
TABLESPACE_NAME
------------------------------
SQL> drop index faq_i;
Index dropped.
SQL> create index faq_i on faq(id) tablespace users;
create index faq_i on faq(id) tablespace users
*
ERROR at line 1:
ORA-14451: unsupported feature with temporary table
SQL> create index faq_i on faq(id) tablespace temp;
create index faq_i on faq(id) tablespace temp
*
ERROR at line 1:
ORA-14451: unsupported feature with temporary table
SQL> create index faq_i on faq(id) tablespace undo;
create index faq_i on faq(id) tablespace undo
*
ERROR at line 1:
ORA-14451: unsupported feature with temporary table
SQL> create index faq_i on faq(id) tablespace system;
create index faq_i on faq(id) tablespace system
*
ERROR at line 1:
ORA-14451: unsupported feature with temporary table
[Updated on: Fri, 04 May 2007 00:10] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|