dbTalk Databases Forums  

Add column to BIG IOT (9.2.0.5)

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Add column to BIG IOT (9.2.0.5) in the comp.databases.oracle.misc forum.



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

Default Add column to BIG IOT (9.2.0.5) - 10-16-2007 , 04:44 AM






Hello

The problem is to adding a column to a big IOT table, 23 millions
records, when trying
the simple "add column.." we get too much undo, the DDL is logged
(even with nologging clause).
I try the to create a empty IOT with the new column,
then a
INSERT /* append parallel...*/ INTO <new_iot> SELECT /*
parallel ..*/ * from <orig_iot>,
but I get a "ORA-00947 not enough value"....seem that oracle need a
value for the new column, how to proceed ? we need direct-insert
nologging and parallel clause to speed the process..

thank yu


Reply With Quote
  #2  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: Add column to BIG IOT (9.2.0.5) - 10-16-2007 , 10:05 AM






Comments embedded.
On Oct 16, 4:44 am, Nonor <ora.emp... (AT) gmail (DOT) com> wrote:
Quote:
Hello

The problem is to adding a column to a big IOT table, 23 millions
records, when trying
the simple "add column.." we get too much undo,
Define 'too much undo', please. And provide the Oracle release you're
using, all four numbers, as this behaviour MAY be release-specific.

Quote:
the DDL is logged
(even with nologging clause).
Specifying NOLOGGING when creating an IOT used to throw an error:

ORA-25182: feature not currently available for index-organized tables

This may also be a bug in the release of Oracle you're using, but we
won't know that until you post that information.

Quote:
I try the to create a empty IOT with the new column,
then a
INSERT /* append parallel...*/ INTO <new_iot> SELECT /*
parallel ..*/ * from <orig_iot>,
but I get a "ORA-00947 not enough value"....seem that oracle need a
value for the new column,
SQL> create table coltest
2 as select * from dba_objects
3 where 0=1;

Table created.

SQL> alter table coltest
2 add mydummy number;

Table altered.

SQL> insert into coltest
2 select * from dba_objects;
insert into coltest
*
ERROR at line 1:
ORA-00947: not enough values

How do you expect to populate x+1 columns with only x columns of
data? You need to either list the columns explicitly which you want
to select:

SQL> insert into coltest
2 select
3 OWNER,
4 OBJECT_NAME,
5 SUBOBJECT_NAME,
6 OBJECT_ID,
7 DATA_OBJECT_ID,
8 OBJECT_TYPE,
9 CREATED,
10 LAST_DDL_TIME,
11 TIMESTAMP,
12 STATUS,
13 TEMPORARY,
14 GENERATED,
15 SECONDARY,
16 1
17 from dba_objects;

11046 rows created.

or list the columns you CAN populate in your insert statement:

insert into coltest
(OWNER,
OBJECT_NAME,
SUBOBJECT_NAME,
OBJECT_ID,
DATA_OBJECT_ID,
OBJECT_TYPE,
CREATED,
LAST_DDL_TIME,
TIMESTAMP,
STATUS,
TEMPORARY,
GENERATED,
SECONDARY)
select *
from dba_objects;

You cannot simply add a column to a table (changing its definition)
then blindly go and attempt to populate that now non-matching
structure with a simple select * from some other table.

Quote:
how to proceed ? we need direct-insert
nologging and parallel clause to speed the process..

Follow the example provided (which you could have found on google.com
had you decided to look) and modify it according to your needs. The
task is simple IF you think it through first.

Quote:
thank yu

David Fitzjarrell



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.