Drop unused column in compressed table

Good day for all.
I have partitioned compressed table under 10.2.0.4 database. I need to remove column, and did it according metalink note 429898.1, but then i execute command alter table .... drop unused columns, i got error ORA-39726 (unsupported add/drop column operation for compreseed table), so it mean that proposed workaround don't works now.
Does anyone have new workaround for this problem?

alter table MY_TABLE set unused(MY_FNG_COLUMN);
-- success
alter table MY_TABLE drop unused columns;
-- error

Similar Messages

  • Dropping unused columns from database table

    I have an existing table called TUSER. I have mapped some fields, but not
    all fields, as some are inserted by other applications and for reporting
    purposes.
    I am using JDK 1.3.1_02, Windows 2000, SQL Server 2000 database, Kodo
    JDOEE 2.2.6 and JBoss 3.0.0.
    When I refresh the datastore it drops all columns that are not mapped
    (note that these colums can contain null values):
    [java] [ connection: 2961925; statement: 2766626; time: Thu Jul 04
    15:33:22 JST 2002 ] ALTER TABLE TUSER ADD Job_Title_ID VARCHAR(255)
    [java] [ connection: 2961925; statement: 1582473; time: Thu Jul 04
    15:33:22 JST 2002 ] ALTER TABLE TUSER DROP COLUMN MAILUSERID
    [java] [ connection: 2961925; statement: 5237832; time: Thu Jul 04
    15:33:22 JST 2002 ] ALTER TABLE TUSER DROP COLUMN PHONENUMBERS
    [java] [ connection: 2961925; statement: 2191491; time: Thu Jul 04
    15:33:22 JST 2002 ] ALTER TABLE TUSER DROP COLUMN EMPLOYEENO
    [java] [ connection: 2961925; statement: 894443; time: Thu Jul 04
    15:33:22 JST 2002 ] ALTER TABLE TUSER DROP COLUMN MDATE
    [java] [ connection: 2961925; statement: 531758; time: Thu Jul 04
    15:33:22 JST 2002 ] ALTER TABLE TUSER DROP COLUMN STATUSCHANGETIME
    [java] [ connection: 2961925; statement: 5899013; time: Thu Jul 04
    15:33:23 JST 2002 ] ALTER TABLE TUSER DROP COLUMN FINISHDATE
    [java] [ connection: 2961925; statement: 8146001; time: Thu Jul 04
    15:33:23 JST 2002 ] ALTER TABLE TUSER DROP COLUMN LASTLOGGEDMBOARD
    [java] [ connection: 2961925; statement: 7756310; time: Thu Jul 04
    15:33:23 JST 2002 ] ALTER TABLE TUSER DROP COLUMN DEL_FLG
    [java] [ connection: 2961925; statement: 6817858; time: Thu Jul 04
    15:33:23 JST 2002 ] ALTER TABLE TUSER DROP COLUMN PERMIT_CD
    [java] [ connection: 2961925; statement: 7754670; time: Thu Jul 04
    15:33:23 JST 2002 ] ALTER TABLE TUSER DROP COLUMN LASTLOGGEDREQUESTER
    [java] [ connection: 2961925; statement: 7332084; time: Thu Jul 04
    15:33:24 JST 2002 ] ALTER TABLE TUSER DROP COLUMN MSG_SERVER
    [java] [ connection: 2961925; statement: 1691809; time: Thu Jul 04
    15:33:24 JST 2002 ] ALTER TABLE TUSER DROP COLUMN AUTORUN
    [java] [ connection: 2961925; statement: 5253969; time: Thu Jul 04
    15:33:24 JST 2002 ] ALTER TABLE TUSER DROP COLUMN REG_DATE
    [java] [ connection: 2961925; statement: 4977422; time: Thu Jul 04
    15:33:24 JST 2002 ] ALTER TABLE TUSER DROP COLUMN PERMIT_LST
    [java] [ connection: 2961925; statement: 4343712; time: Thu Jul 04
    15:33:24 JST 2002 ] ALTER TABLE TUSER DROP COLUMN ALLOWREPL
    [java] [ connection: 2961925; statement: 7104150; time: Thu Jul 04
    15:33:24 JST 2002 ] ALTER TABLE TUSER DROP COLUMN EMAIL
    [java] [ connection: 2961925; statement: 4395840; time: Thu Jul 04
    15:33:24 JST 2002 ] ALTER TABLE TUSER DROP COLUMN MANAGERSTATUS
    [java] [ connection: 2961925; statement: 2417379; time: Thu Jul 04
    15:33:24 JST 2002 ] ALTER TABLE TUSER DROP COLUMN MD5_DIGEST
    [java] [ connection: 2961925; statement: 2865120; time: Thu Jul 04
    15:33:25 JST 2002 ] ALTER TABLE TUSER DROP COLUMN SMTPADDRESS
    15:33:25 JST 2002 ] INSERT INTO JDO_SCHEMA_METADATAX(CLASSNAMEX) VALUES
    ('com.gulfnet.g
    roupcast.data.User')
    Is this meant to happen? I am guessing not. Is there a way to tell the
    schematool to not remove existing columns?
    Thanks in advance.
    Kam

    You can in fact tell the schematool not to drop columns it doesn't know about. When you run the schematool, use the "add" action rather than "refresh". Then it will only add columns, never drop them. See the documentation for details:
    http://www.solarmetric.com/Software/Documentation/2.2.5/manual.html#schema_manipulation

  • Drop column from compressed table

    NLSRTL
    11.2.0.3.0
    Production
    Oracle Database 11g Enterprise Edition
    11.2.0.3.0
    64bit Production
    PL/SQL
    11.2.0.3.0
    Production
    TNS for Linux:
    11.2.0.3.0
    Production
    Hello,
    I read about how to drop column from a compressed table - first set it unused and then drop the unused columns. However, in the example below on the database I ran it, it does not work. Please, can you tell me WHEN this approach does not work. What it is dependent on - parameters or something else. Why I cannot drop the unused columns?
    And the example along with the errors:
    create table tcompressed compress as select * from all_users;
    > table TCOMPRESSED created.
    alter table tcompressed add x number;
    > table TCOMPRESSED altered.
    alter table tcompressed drop column x;
    >
    Error report:
    SQL Error: ORA-39726: unsupported add/drop column operation on compressed tables
    39726. 00000 -  "unsupported add/drop column operation on compressed tables"
    *Cause:    An unsupported add/drop column operation for compressed table
               was attemped.
    *Action:   When adding a column, do not specify a default value.
               DROP column is only supported in the form of SET UNUSED column
               (meta-data drop column).
    alter table tcompressed set unused column x;
    > table TCOMPRESSED altered.
    alter table tcompressed drop unused columns;
    >
    Error report:
    SQL Error: ORA-39726: unsupported add/drop column operation on compressed tables
    39726. 00000 -  "unsupported add/drop column operation on compressed tables"
    *Cause:    An unsupported add/drop column operation for compressed table
               was attemped.
    *Action:   When adding a column, do not specify a default value.
               DROP column is only supported in the form of SET UNUSED column
               (meta-data drop column).
    As you can see even after altering the table by setting the column X as unused I still cannot drop it by using DROP UNUSED COLUMNS.
    Thank you.

    check this link it might help. At the end it has also mentioned of a bug check the same.
    http://sharpcomments.com/2008/10/ora-39726-unsupported-adddrop-column-operation-on-compressed-tables.html

  • Dropping Unused column

    Hi All,
    I am working on version 11.2.0.3.0 ( windows server 2008 ).
    While dropping unused column i am getting below error
    SQL> create table er (ab varchar2(50), aa varchar2(50)) compress;
    SQL> alter table er set unused column ab;
    Table altered.
    SQL>
    SQL>
    SQL>
    SQL>
    SQL> alter table er drop unused columns;
    alter table er drop unused columns
    ERROR at line 1:
    ORA-39726: unsupported add/drop column operation on compressed tables

    i can't do such things for these number of tablesThat is the funniest thing I've heard in a while. If you can "alter table xxx drop unused columns," why can't you do what is suggested.
    And no, it's not a bug.
    And no, there is not "another way around"

  • How to add column to compressed table

    Hi gurus,
    Can any one help me how to add a column to compressed tables
    Thanks in advance

    The only difference is if added column has default value. In that case:
    SQL> create table tbl(id number,val varchar2(10))
      2  /
    Table created.
    SQL> insert into tbl
      2  select level,lpad('X',10,'X')
      3  from dual
      4  connect by level <= 100000
      5  /
    100000 rows created.
    SQL> select bytes
      2  from user_segments
      3  where segment_name = 'TBL'
      4  /
         BYTES
       3145728
    SQL> alter table tbl move compress
      2  /
    Table altered.
    SQL> select bytes
      2  from user_segments
      3  where segment_name = 'TBL'
      4  /
         BYTES
       2097152
    SQL> alter table tbl add name varchar2(5) default 'NONE'
      2  /
    alter table tbl add name varchar2(5) default 'NONE'
    ERROR at line 1:
    ORA-39726: unsupported add/drop column operation on compressed tables
    SQL> alter table tbl add name varchar2(5)
      2  /
    Table altered.
    SQL> update tbl set name = 'NONE'
      2  /
    100000 rows updated.
    SQL> commit
      2  /
    Commit complete.
    SQL> select bytes
      2  from user_segments
      3  where segment_name = 'TBL'
      4  /
         BYTES
       7340032
    SQL> select compression from user_tables where table_name = 'TBL'
      2  /
    COMPRESS
    ENABLED
    SQL> alter table tbl move compress
      2  /
    Table altered.
    SQL> select bytes
      2  from user_segments
      3  where segment_name = 'TBL'
      4  /
         BYTES
       2097152
    SQL> SY.

  • ORA-12983: cannot drop all columns in a table

    Hi,
    I am creating a table with two columns.
    I have modified a column as unused using ALTER statement.
    After that i have tried to drop the another column by using ALTER statement.
    But it throws an error ORA-12983: cannot drop all columns in a table.
    is it not possible to achieve this via ALTER statement?
    thanks

    is there any other way to find the name of the columns which have been marked as unused?Don't think so, and you would not be able to do much about. You won't be able to reference it, you won't be able to un-unuse it, and you would even be able to add a new column having same name.
    Why are you using SET UNUSED in the first place?
    Regards
    Peter
    Quoting myself:
    You won't be able to reference itMaybe not good enough:
    SQL> select column_name, data_type, segment_column_id
      from user_tab_cols
    where table_name = 'T';
    COLUMN_NAME                    DATA_TYPE   SEGMENT_COLUMN_ID
    SYS_C00001_11051618:28:14$     NUMBER                      1
    B                              NUMBER                      2
    SYS_C00003_11051618:28:14$     NUMBER                      3
    3 rows selected.
    select "SYS_C00003_11051618:28:14$" from t
    Error at line 1
    ORA-00904: "SYS_C00003_11051618:28:14$": invalid identifier
    SQL> alter table t drop column "SYS_C00001_11051618:28:14$";
    Table altered.
    SQL> select column_name, data_type, segment_column_id
      from user_tab_cols
    where table_name = 'T';
    COLUMN_NAME                    DATA_TYPE   SEGMENT_COLUMN_ID
    B                              NUMBER                      
    1 row selected.
    Note: Both columns "disappeared"  Thanks MichaelS
    Edited by: Peter on May 16, 2011 9:29 AM

  • DROP UNUSED COLUMN

    Dear Guru’s
    I have a situation where I need to drop specific columns which are set to unused!
    Say, I have 3 unused columns in a table – and now I want to drop only one unused column from that.
    SQL> alter table scott.emptest set unused (ENAME);
    Table altered.
    SQL> alter table scott.emptest set unused (COMM);
    Table altered.
    Once I set some columns un-used, now I want to drop only one un-used Column “ENAME”
    SQL> alter table scott.emptest drop column ENAME;
    alter table scott.emptest drop column ENAME
    ERROR at line 1:
    ORA-00904: "ENAME": invalid identifier
    which in turn throws this error!
    Help appreciated!
    Thanks in advanced
    Ravi Prakash

    SCOTT@demo102> create table tbl_25 as select * from emp
    SCOTT@demo102> /
    Table created.
    SCOTT@demo102> desc tbl_25
    Name                                      Null?    Type
    EMPNO                                              NUMBER(4)
    ENAME                                              VARCHAR2(10)
    JOB                                                VARCHAR2(9)
    MGR                                                NUMBER(4)
    HIREDATE                                           DATE
    SAL                                                NUMBER(7,2)
    COMM                                               NUMBER(7,2)
    DEPTNO                                             NUMBER(2)
    SCOTT@demo102> alter table tbl_25 set unused (deptno)
    SCOTT@demo102> /
    Table altered.
    SCOTT@demo102> alter table tbl_25 set unused (comm);
    Table altered.
    SCOTT@demo102> desc tbl_25
    Name                                      Null?    Type
    EMPNO                                              NUMBER(4)
    ENAME                                              VARCHAR2(10)
    JOB                                                VARCHAR2(9)
    MGR                                                NUMBER(4)
    HIREDATE                                           DATE
    SAL                                                NUMBER(7,2)
    SCOTT@demo102> select * from all_unused_col_tabs where table_name ='TBL_25';
    OWNER                          TABLE_NAME                          COUNT
    SCOTT                          TBL_25                                  2
    SCOTT@demo102> alter table tbl_25 drop unused column;
    Table altered.
    SCOTT@demo102> select * from all_unused_col_tabs where table_name ='TBL_25';
    no rows selected
    SCOTT@demo102> Nicolas.
    Add queries on all_unused_col_tabs.
    Message was edited by:
    N. Gasparotto

  • How to get Materialized View to ignore unused columns in source table

    When updating a column in a source table, records are generated in the corresponding materialized view log table. This happens even if the column being updated is not used in any MV that references the source table. That could be OK, so long as those updates are ignored. However they are not ignored, so when the MV is fast refreshed, I find it can take over a minute, even though no changes are required or made. Is there some way of configuring the materialized view log such that the materialized view refresh ignores these updates ?
    So for examle if I have table TEST:
    CREATE table test (
    d_id NUMBER(10) PRIMARY KEY,
    d_name VARCHAR2(100),
    d_desc VARCHAR2(256)
    This has an MV log MLOG$_TEST:
    CREATE MATERIALIZED VIEW LOG ON TEST with rowid, sequence, primary key;
    CREATE MATERIALIZED VIEW test_mv
    refresh fast on demand
    as
    select d_id, d_name
    from test;
    INSERT 200,000 records
    exec dbms_mview.refresh('TEST_MV','f');
    update test set d_desc = upper(d_desc) ;
    exec dbms_mview.refresh('TEST_MV','f'); -- This takes 37 seconds, yet no changes are required.
    Oracle 10g/11g

    I would love to hear a positive answer to this question - I have the exact same issue :-)
    In the "old" days (version 8 I think it was) populating the materialized view logs was done by Oracle auto-creating triggers on the base table. A "trick" could then make that trigger become "FOR UPDATE OF <used_column_list>". Now-a-days it has been internalized so such "triggers" are not visible and modifiable by us mere mortals.
    I have not found a way to explicitly tell Oracle "only populate MV log for updates of these columns." I think the underlying reason is that the MV log potentially could be used for several different materialized views at possibly several different target databases. So to be safe that the MV log can be used for any MV created in the future - Oracle always populates MV log at any update (I think.)
    One way around the problem is to migrate to STREAMS replication rather than materialized views - but it seems to me like swatting a fly with a bowling ball...
    One thing to be aware of: Once the MV log has been "bloated" with a lot of unneccessary logging, you may perhaps see that all your FAST REFRESHes afterwards becomes slow - even after the one that checked all the 200000 unneccessary updates. We have seen that it can happen that Oracle decides on full table scanning the MV log when it does a fast refresh - which usually makes sense. But after a "bloat" has happened, the high water mark of the MV log is now unnaturally high, which can make the full table scan slow by scanning a lot of empty blocks.
    We have a nightly job that checks each MV log if it is empty. If it is empty, it locks the MV log and locks the base table, checks for emptiness again, and truncates the MV log if it is still empty, before finally unlocking the tables. That way if an update during the day has happened to bloat the MV log, all the empty space in the MV log will be reclaimed at night.
    But I hope someone can answer both you and me with a better solution ;-)

  • How to Identify unused columns in a table

    Hiiya..
    Is there a way to find out that following columns of table X,Y, Z have never been used. So that, I can check with the FCs and mark them un-used (using ALTER TABLE).
    I don't want to go through every line of (avlbl) PLSQL code to identify that so and so column of so and so table has never been used. Is there any view or any sys proc/pkg using which I can identify them.
    TIA

    Guido
    Not getting you exactly. What I am doing is pick all the columns one by one and search in all_source (like where TEXT like %COLUMN_NAME%). Now what about 'AND <UnusedColumn> IS NULL'
    Sidhu

  • Drop column from compressed partitioned table

    Hi,
    DB version is 11.2.02.
    We have table which is range partitioned and sub-partitioned by list.
    Table is also compressed.
    When I try to drop a column, I get error.
    CREATE TABLE DWH_REP.P_RATING (
      id_source$                 NUMBER(38,0)  NULL,
      time_insert$               DATE          ,
      time_update$               DATE          ,
      FLG_CURRENT$               NUMBER(38,0)  ,
      FLG_CHANGED$               NUMBER(38,0)  ,
      id_audit$                  NUMBER(38,0)  ,
      ID_DATE_PSTING             NUMBER(38,0)  ,
      partner_rating_id          VARCHAR2(256) ,
      partner_id                 VARCHAR2(256) ,
      id_partner                 NUMBER(38,0)  , 
      rating_system_id           VARCHAR2(256) ,
      rating_id                  VARCHAR2(256) ,
      date_rating                DATE          ,
      date_follow_up             DATE          ,
      risk_team_id               VARCHAR2(256) ,
      risk_team_descr            VARCHAR2(256) ,
      risk_team_changed_id       VARCHAR2(256) ,
      risk_team_changed_descr    VARCHAR2(256) ,
      date_risk_team_changed     DATE          ,
      assignment_id              VARCHAR2(256) ,
      date_assignment            DATE          ,
      date_assignment_confirmed  DATE          ,
      date_assignment_expiration DATE          ,
      flg_exception              VARCHAR2(256) ,
      exception_id               VARCHAR2(256) ,
      date_exception             DATE         
    -- TABLESPACE DWH_REP_DATA
    PARTITION BY RANGE (FLG_CURRENT$, ID_DATE_PSTING)
       SUBPARTITION BY LIST (ID_SOURCE$)
       (PARTITION P_RATING_2010               
           VALUES LESS THAN (0, 20110101)
           SUBPARTITION P_RATING_2010_UCS VALUES  (10) TABLESPACE DWH_O_2010_TBS,
           SUBPARTITION P_RATING_2010_UCM VALUES (11) TABLESPACE DWH_O_2010_TBS,
    --     SUBPARTITION P_RATING_2010_ORBI30 VALUES  (30) TABLESPACE DWH_O_2010_TBS,
    --     SUBPARTITION P_RATING_2010_ORBI31 VALUES  (31) TABLESPACE DWH_O_2010_TBS,
           SUBPARTITION P_RATING_2010_CETELEM VALUES  (40) TABLESPACE DWH_O_2010_TBS,
    --     SUBPARTITION P_RATING_2010_MILES VALUES  (60) TABLESPACE DWH_O_2010_TBS,
    --     SUBPARTITION P_RATING_2010_BHI VALUES  (80) TABLESPACE DWH_O_2010_TBS,
           SUBPARTITION P_RATING_2010_DF VALUES  (DEFAULT) TABLESPACE DWH_O_2010_TBS),   
         PARTITION P_RATING_2011            
           VALUES LESS THAN (0, 20120101)
           SUBPARTITION P_RATING_2011_UCS VALUES (10) TABLESPACE DWH_O_2011_TBS,
           SUBPARTITION P_RATING_2011_UCM VALUES (11) TABLESPACE DWH_O_2011_TBS,
    --     SUBPARTITION P_RATING_2011_ORBI30 VALUES (30) TABLESPACE DWH_O_2011_TBS,
    --     SUBPARTITION P_RATING_2011_ORBI31 VALUES (31) TABLESPACE DWH_O_2011_TBS,
           SUBPARTITION P_RATING_2011_CETELEM VALUES (40) TABLESPACE DWH_O_2011_TBS,
    --     SUBPARTITION P_RATING_2011_MILES VALUES (60) TABLESPACE DWH_O_2011_TBS,
    --     SUBPARTITION P_RATING_2011_BHI VALUES (80) TABLESPACE DWH_O_2011_TBS,
           SUBPARTITION P_RATING_2011_DF VALUES (DEFAULT) TABLESPACE DWH_O_2011_TBS),
        PARTITION P_RATING_current           
           VALUES LESS THAN (maxvalue, maxvalue)
           SUBPARTITION P_RATING_CUR_UCS VALUES (10) TABLESPACE DWH_O_CRT_UCS_TBS,
           SUBPARTITION P_RATING_CUR_UCM VALUES (11) TABLESPACE DWH_O_CRT_UPM_TBS,
    --     SUBPARTITION P_RATING_CUR_ORBI30 VALUES (30) TABLESPACE DWH_O_CRT_ORBI30_TBS,
    --     SUBPARTITION P_RATING_CUR_ORBI31 VALUES (31) TABLESPACE DWH_O_CRT_ORBI31_TBS,
           SUBPARTITION P_RATING_CUR_CETELEM VALUES (40) TABLESPACE DWH_O_CRT_CETELEM_TBS,
    --     SUBPARTITION P_RATING_CUR_MILES VALUES (60) TABLESPACE DWH_O_CRT_MILES_TBS,
    --     SUBPARTITION P_RATING_CUR_BHI VALUES (80) TABLESPACE DWH_O_CRT_BHI_TBS,
           SUBPARTITION P_RATING_CUR_DF VALUES (DEFAULT) TABLESPACE DWH_O_CRT_DF_TBS))
    ENABLE ROW MOVEMENT
    NOLOGGING
    COMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    ALTER TABLE DWH_REP.P_RATING DROP COLUMN ID_PARTNER;
    ORA-39726: unsupported add/drop column operation on compressed tables

    littleboy wrote:
    Hi,
    DB version is 11.2.02.
    We have table which is range partitioned and sub-partitioned by list.
    Table is also compressed.
    When I try to drop a column, I get error.
    CREATE TABLE DWH_REP.P_RATING (
    id_source$                 NUMBER(38,0)  NULL,
    time_insert$               DATE          ,
    time_update$               DATE          ,
    FLG_CURRENT$               NUMBER(38,0)  ,
    FLG_CHANGED$               NUMBER(38,0)  ,
    id_audit$                  NUMBER(38,0)  ,
    ID_DATE_PSTING             NUMBER(38,0)  ,
    partner_rating_id          VARCHAR2(256) ,
    partner_id                 VARCHAR2(256) ,
    id_partner                 NUMBER(38,0)  , 
    rating_system_id           VARCHAR2(256) ,
    rating_id                  VARCHAR2(256) ,
    date_rating                DATE          ,
    date_follow_up             DATE          ,
    risk_team_id               VARCHAR2(256) ,
    risk_team_descr            VARCHAR2(256) ,
    risk_team_changed_id       VARCHAR2(256) ,
    risk_team_changed_descr    VARCHAR2(256) ,
    date_risk_team_changed     DATE          ,
    assignment_id              VARCHAR2(256) ,
    date_assignment            DATE          ,
    date_assignment_confirmed  DATE          ,
    date_assignment_expiration DATE          ,
    flg_exception              VARCHAR2(256) ,
    exception_id               VARCHAR2(256) ,
    date_exception             DATE         
    -- TABLESPACE DWH_REP_DATA
    PARTITION BY RANGE (FLG_CURRENT$, ID_DATE_PSTING)
    SUBPARTITION BY LIST (ID_SOURCE$)
    (PARTITION P_RATING_2010               
    VALUES LESS THAN (0, 20110101)
    SUBPARTITION P_RATING_2010_UCS VALUES  (10) TABLESPACE DWH_O_2010_TBS,
    SUBPARTITION P_RATING_2010_UCM VALUES (11) TABLESPACE DWH_O_2010_TBS,
    --     SUBPARTITION P_RATING_2010_ORBI30 VALUES  (30) TABLESPACE DWH_O_2010_TBS,
    --     SUBPARTITION P_RATING_2010_ORBI31 VALUES  (31) TABLESPACE DWH_O_2010_TBS,
    SUBPARTITION P_RATING_2010_CETELEM VALUES  (40) TABLESPACE DWH_O_2010_TBS,
    --     SUBPARTITION P_RATING_2010_MILES VALUES  (60) TABLESPACE DWH_O_2010_TBS,
    --     SUBPARTITION P_RATING_2010_BHI VALUES  (80) TABLESPACE DWH_O_2010_TBS,
    SUBPARTITION P_RATING_2010_DF VALUES  (DEFAULT) TABLESPACE DWH_O_2010_TBS),   
    PARTITION P_RATING_2011            
    VALUES LESS THAN (0, 20120101)
    SUBPARTITION P_RATING_2011_UCS VALUES (10) TABLESPACE DWH_O_2011_TBS,
    SUBPARTITION P_RATING_2011_UCM VALUES (11) TABLESPACE DWH_O_2011_TBS,
    --     SUBPARTITION P_RATING_2011_ORBI30 VALUES (30) TABLESPACE DWH_O_2011_TBS,
    --     SUBPARTITION P_RATING_2011_ORBI31 VALUES (31) TABLESPACE DWH_O_2011_TBS,
    SUBPARTITION P_RATING_2011_CETELEM VALUES (40) TABLESPACE DWH_O_2011_TBS,
    --     SUBPARTITION P_RATING_2011_MILES VALUES (60) TABLESPACE DWH_O_2011_TBS,
    --     SUBPARTITION P_RATING_2011_BHI VALUES (80) TABLESPACE DWH_O_2011_TBS,
    SUBPARTITION P_RATING_2011_DF VALUES (DEFAULT) TABLESPACE DWH_O_2011_TBS),
    PARTITION P_RATING_current           
    VALUES LESS THAN (maxvalue, maxvalue)
    SUBPARTITION P_RATING_CUR_UCS VALUES (10) TABLESPACE DWH_O_CRT_UCS_TBS,
    SUBPARTITION P_RATING_CUR_UCM VALUES (11) TABLESPACE DWH_O_CRT_UPM_TBS,
    --     SUBPARTITION P_RATING_CUR_ORBI30 VALUES (30) TABLESPACE DWH_O_CRT_ORBI30_TBS,
    --     SUBPARTITION P_RATING_CUR_ORBI31 VALUES (31) TABLESPACE DWH_O_CRT_ORBI31_TBS,
    SUBPARTITION P_RATING_CUR_CETELEM VALUES (40) TABLESPACE DWH_O_CRT_CETELEM_TBS,
    --     SUBPARTITION P_RATING_CUR_MILES VALUES (60) TABLESPACE DWH_O_CRT_MILES_TBS,
    --     SUBPARTITION P_RATING_CUR_BHI VALUES (80) TABLESPACE DWH_O_CRT_BHI_TBS,
    SUBPARTITION P_RATING_CUR_DF VALUES (DEFAULT) TABLESPACE DWH_O_CRT_DF_TBS))
    ENABLE ROW MOVEMENT
    NOLOGGING
    COMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    ALTER TABLE DWH_REP.P_RATING DROP COLUMN ID_PARTNER;
    ORA-39726: unsupported add/drop column operation on compressed tables
    can you checkwith following?
    SQL>alter table t set unused column x;
    SQL>alter table t drop unused columns;Tom explains it ->http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:69076630635645

  • How to Add column with default value in compress table.

    Hi ,
    while trying to add column to compressed table with default value i am getting error.
    Even i tried no compress command on table still its giivg error that add/drop not allowed on compressed table.
    Can anyone help me in this .
    Thanks.

    Aman wrote:
    while trying to add column to compressed table with default value i am getting error.This is clearly explain in the Oracle doc :
    "+You cannot add a column with a default value to a compressed table or to a partitioned table containing any compressed partition, unless you first disable compression for the table or partition+"
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_3001.htm#sthref5163
    Nicolas.

  • Cannot drop a column

    Hi,
    I am having a problem with dropping a column from a table. I am using 10g (10.2.0.1.0). Whenever I try to drop a column I got this error:
    ORA-39726: unsupported add/drop column operation on compressed tables
    Then I tried to drop it in a way that first make it unused and then drop it but this time I got the following erro: while unused operation was successful
    ORA-12996: cannot drop system-generated virtual column
    Well I restored this database from RMAN backups of my production system. One thing more that is, when I created a new table then from that table I can drop or add any column from/to it.
    Any help........
    Arshad.

    Well I have already tried this. As I explained in my first email that unused worked fine but as soon as I try to drop the unused column I got this error:
    ORA-12996: cannot drop system-generated virtual column
    Arshad.

  • How can I add a new column in compress partition table.

    I have a compress partition table when I add a new column in that table it give me an error "ORA-22856: CANNOT ADD COLUMNS TO OBJECT TABLES". I had cretaed a table in this clause. How can I add a new column in compress partition table.
    CREATE TABLE Employee
    Empno Number,
    Tr_Date Date
    COMPRESS PARTITION BY RANGE (Tr_Date)
    PARTITION FIRST Values LESS THAN (To_Date('01-JUL-2006','DD-MON-YYYY')),
    PARTITION JUNK Values LESS THAN (MAXVALUE));
    Note :
    When I create table with this clause it will allow me to add a column.
    CREATE TABLE Employee
    Empno Number,
    Tr_Date Date
    PARTITION BY RANGE (Tr_Date)
    PARTITION FIRST Values LESS THAN (To_Date('01-JUL-2006','DD-MON-YYYY')),
    PARTITION JUNK Values LESS THAN (MAXVALUE));
    But for this I have to drop and recreate the table and I dont want this becaue my table is in online state i cannot take a risk. Please give me best solution.

    Hi Fahed,
    I guess, you are using Oracle 9i Database Release 9.2.0.2 and the Table which you need to alter is in OLTP environment where data is usually inserted using regular inserts. As a result, these tables generally do not get much benefit from using table compression. Table compression works best on read-only tables that are loaded once but read many times. Tables used in data warehousing applications, for example, are great candidates for table compression.
    Reference : http://www.oracle.com/technology/oramag/oracle/04-mar/o24tech_data.html
    Topic : When to Use Table Compression
    Bug
    Reference : http://dba.ipbhost.com/lofiversion/index.php/t147.html
    BUG:<2421054>
    Affects: RDBMS (9-A0)
    NB: FIXED
    Abstract: ENH: Allow ALTER TABLE to ADD/DROP columns for tables using COMPRESS feature
    Details:
    This is an enhancement to allow "ALTER TABLE" to ADD/DROP
    columns for tables using the COMPRESS feature.
    In 9i errors are reported for ADD/DROP but the text may
    be misleading:
    eg:
    ADD column fails with "ORA-22856: cannot add columns to object tables"
    DROP column fails with "ORA-12996: cannot drop system-generated virtual column"
    Note that a table which was previously marked as compress which has
    now been altered to NOCOMPRESS also signals such errors as the
    underlying table could still contain COMPRESS format datablocks.
    As of 10i ADD/SET UNUSED is allowed provided the ADD has no default value.
    Best Regards,
    Muhammad Waseem Haroon
    [email protected]

  • How to drop a partitioned column in a table

    Hi All,
    I am trying to drop a column which is partitioned into 4 values.
    When I use the command
    ALTER TABLE TNAME DROP COLUMN CNAME;
    I am getting an error message stating that cannot drop a parttioned column.
    ALTER TABLE fn_dev_excpt DROP COLUMN THEATER_ID
    ERROR at line 1:
    ORA-12984: cannot drop partitioning column
    Appreciate your help on this,
    Thanks,
    Madhu K.

    Hi,
    Can you please drop the partition itself using the below command.Dropping of column which is partitioned is not alllowed.
    SELECT table_name, partition_name
    FROM user_tab_partitions;
    ALTER TABLE range_list DROP PARTITION s2k ;
    where table_name=range_list ,
    partition_name=s2k
    Best regards,
    Rafi.
    http://rafioracledba.blogspot.com/
    Edited by: Rafi (Oracle DBA) on Mar 25, 2010 12:58 AM

  • Compressed tables with more than 255 columns

    hi,
    Would anyone have a sql to find out compressed tables with more than 255 columns.
    Thank you
    Jonu

    SELECT table_name,
           Count(column_name)
    FROM   user_tab_columns utc
    WHERE  utc.table_name IN (SELECT table_name
                              FROM   user_tables
                              WHERE  compression = 'ENABLED')
    HAVING Count(column_name) > 255
    GROUP  BY table_name

Maybe you are looking for

  • Upgrade to Snow Leopard disabled iPhoto editing capabilities

    Upgraded to Snow Leopard, using iPhoto 8.1 (415). Problem: Scanned numerous photographs at color 600 dpi on Canon Pixma500, then exported scans to jpeg, then imported into iPhoto Result: Many will not edit. Here are the symptoms: (1) Using full scree

  • Blank external monitor - XP

    I have an external monitor - HP w2207h, flat panel. When booting into the Mac OS this monitor works fine. When Windows XP is running this external monitor is not available. However, when booting into XP, the initial Windows XP splash screen (the blac

  • Second computer using photoshop

    Hi, I am currently paying for photoshop on my laptop and would like to be able to use it on my desktop as well. I have installed the program, but its telling me I'm on a 30 day trial and I should buy a membership... Which I'm already doing. Do myou n

  • Billing in the intercompany (Urgent!!!)

    Dear SAPpers, In the intercompany Billing i hve to raise a individual Billing document. But the point is like the system says i am not able to do that and for this reason i have to go to Log(Protocol). In the Log i got the error message as the saes O

  • How to set value to a input list of values?

    Hi, I'm using Jdev 11.1.2.0 I'm using model driven input list of values in page. In inputtext of that list of values, When I entering the exact value(if only one value exists with that value)  say for example 100, then that value is getting set to in